Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Thinking Outside The Box

Thinking Outside The Box

Keynote for EuroPython 2013.

Armin Ronacher

July 01, 2013
Tweet

More Decks by Armin Ronacher

Other Decks in Programming

Transcript

  1. ThinkinG
    - =
    outside
    The box

    View Slide

  2. Hello, I'm Armin!
    I do Computers - with Python.
    Currently at Fireteam / Splash Damage.
    We do Internet for Pointy Shooty Games.
    c
    w

    View Slide

  3. q
    t
    t
    j
    j
    d

    View Slide

  4. the box is comfortable
    X

    View Slide

  5. the comfort is dangerous
    l

    View Slide

  6. the 9 dots puzzle
    0
    j
    5
    (and things of similar nature)

    View Slide

  7. h
    - W
    <
    å

    h

    U
    using exactly 4
    straight lines,
    without retracing
    or removing one's
    pen from the paper
    connect the dots
    j

    View Slide

  8. h
    - W
    <
    å

    h

    U
    using exactly 4
    straight lines,
    without retracing
    or removing one's
    pen from the paper
    connect the dots
    j

    View Slide

  9. g
    i know it's cliché
    Ç

    View Slide

  10. J
    the six thinking hats

    View Slide

  11. J
    the six thinking hats
    This

    View Slide

  12. the majority is always wrong:
    congratulations;
    you're now a cynical asshole
    7
    z
    “ ”

    View Slide

  13. a change of environment
    1
    z
    m

    View Slide

  14. c
    computer games

    View Slide

  15. ˚
    4
    * this graph is not very scientific
    h
    ≥ Online

    View Slide

  16. ˚
    4
    * this graph is not very scientific
    python!!!11
    h
    ≥ Online

    View Slide

  17. community influences
    your thinking .
    a
    -

    Î

    View Slide

  18. C++ good;
    Scripting Languages Bad
    u

    View Slide

  19. ... if it takes you 30 minutes to do a
    one line change then you obviously
    would not want to have runtime type
    checks ...
    E

    View Slide

  20. it's too easy to dismiss
    something on fringe or
    outdated experience alone

    View Slide

  21. • never underestimate how much your
    environment/community influences you
    1

    View Slide

  22. • never underestimate how much your
    environment/community influences you
    1
    (unfortunately that also includes things like “the GIL is not a problem")

    View Slide

  23. asking the right questions
    2
    j
    5

    View Slide

  24. the wrong questions
    are easy to spot on others
    a
    -
    ˚
    4

    View Slide

  25. how do I do something after return
    render_template(...) if I don't
    want to register teardown_request
    for all requests.
    J

    View Slide

  26. • he was looking for celery / message queue
    ©

    View Slide

  27. • first expectation was that the user wanted
    to change the HTTP response
    0

    View Slide

  28. • teardown_request would not have worked
    anyways
    O

    View Slide

  29. I don't want my user to wait while I do
    some processing on his data
    v


    better:

    View Slide

  30. t
    j
    the box was Flask

    View Slide

  31. how to ask the right
    questions2
    -
    5
    B

    View Slide

  32. • assume you already started out wrong
    • describe the •actual• problem
    =

    View Slide

  33. How do I use Websockets
    with Flask?
    z


    View Slide

  34. How do I notify my user about
    changes with low latency.
    6
    better:


    View Slide

  35. 5
    question
    leaves room
    for the answer

    View Slide

  36. (a) Server-sent events via WSGI
    (b) application <-> redis <-> persistent
    connection server
    Ô
    bit.ly/pypush

    View Slide

  37. f
    Jump on IRC
    help out other people
    < >

    View Slide

  38. questioning the right things
    3
    z
    m

    View Slide

  39. the worst parts in my libraries are the ones
    where I took the design from elsewhere
    O

    View Slide

  40. it's not because
    I know better ...

    Ò

    View Slide

  41. • most things have some design behind
    • as people copy it, the original design
    gets obscured and forgotten
    • the original design might no longer apply
    1

    View Slide

  42. • starting something new?
    • question everything!
    ˝

    View Slide

  43. not with the intention of proving existing
    design wrong;
    with the intention of understanding it.
    9

    View Slide

  44. 9
    paradigm shifts
    4
    F

    View Slide

  45. Many times we don't even realize that things
    were an example of thinking outside the box.
    (a) "echo" -> Request/Response objects
    (b) Interactive Interpreters
    9

    View Slide

  46. That's also what makes it hard to find
    examples now ...
    9

    View Slide

  47. every idea is a rehash
    don't get too excited when you feel all "obviously ..."
    sometimes all that's necessary is transposing a concept
    from one industry to the other.
    9

    View Slide

  48. 9
    interesting examples
    5
    F

    View Slide

  49. • Mill Processor:
    • Basic Block: One entry, one exit.
    • Break instruction bundles in half
    • Two decoders, one moves left from EBB
    entry point, one moves to the right
    =

    View Slide

  50. • Mill Processor:
    • Basic Block: One entry, one exit.
    • Break instruction bundles in half
    • Two decoders, one moves left from EBB
    entry point, one moves to the right
    =
    two independent units, two separate caches

    View Slide

  51. =a
    High-level Queues for Request Handling
    Stateful Frontend Servers
    Stateless Workers

    View Slide

  52. • Sending around signed data
    • Cookies
    • Access/Refresh Tokens
    • Activation Links
    • Offers
    ˆ

    View Slide

  53. • The Rust Programming Language
    • Memory ownership tracking
    1
    (and otherwise just steal from C++, C, Python, Ruby, Haskell and Scheme)

    View Slide

  54. • Spotify's Native/Web Bridge
    • spawns HTTP server on localhost:XXXXX
    • provides OAuth bridge
    • JavaScript authenticates with local
    server, sends commands and retrieves
    updates.
    c

    View Slide

  55. That's it;
    Now ask questions
    ?
    @mitsuhiko
    lucumr.pocoo.org/talks
    gittip.com/mitsuhiko
    y y
    y
    d

    View Slide

  56. calibration slide
    --
    2 2 2
    2
    2 2 c

    View Slide