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

Let Them Write Code (Keynote, PyCon India 2019)

Ines Montani
October 13, 2019

Let Them Write Code (Keynote, PyCon India 2019)

Ines Montani

October 13, 2019
Tweet

More Decks by Ines Montani

Other Decks in Technology

Transcript

  1. Ines Montani
    @_inesmontani
    Explosion

    View Slide

  2. One not so weird trick for

    View Slide

  3. SPACY
    Open-source library for
    industrial-strength Natural
    Language Processing
    100k USERS

    View Slide

  4. View Slide

  5. PRODIGY
    Annotation tool for creating
    training data for machine
    learning models
    2.5k+ USERS

    View Slide

  6. View Slide

  7. View Slide

  8. EXPLOSION
    Software company specializing
    in developer tools for AI and
    Natural Language Processing
    6 DEVELOPERS

    View Slide

  9. View Slide

  10. DEVELOPERS
    GONNA DEVELOP.
    Good tools help people do their work.
    You don’t have to do their work for them.
    *

    View Slide

  11. DEVELOPERS
    GONNA DEVELOP.
    Good tools help people do their work.
    You don’t have to do their work for them.
    *
    Worst developer experiences: tools that
    want to be “fully integrated solution”.
    *

    View Slide

  12. DEVELOPERS
    GONNA DEVELOP.
    Good tools help people do their work.
    You don’t have to do their work for them.
    *
    Worst developer experiences: tools that
    want to be “fully integrated solution”.
    *
    BETTEr, CHEAPER, EASIER.

    View Slide

  13. But aren’t all libraries
    extensible? After all, people
    write code with them.

    View Slide

  14. But aren’t all libraries
    extensible? After all, people
    write code with them.
    Some more than others.
    Libraries don’t always provide
    composable primitives.

    View Slide

  15. View Slide

  16. are, going, swimming,
    should, go

    View Slide

  17. going, swimming, go

    View Slide

  18. go, swim, go

    View Slide

  19. go, swim

    View Slide

  20. View Slide

  21. go, swim

    View Slide

  22. Shouldn’t the library take care
    of things like this so users don’t
    have to repeat the same code?

    View Slide

  23. Shouldn’t the library take care
    of things like this so users don’t
    have to repeat the same code?
    The set of “things like this” is
    probably bigger than you think,
    and it keeps growing.

    View Slide

  24. .json .CSV .TXT

    View Slide

  25. .json .CSV .TXT
    MYSQL SQLITE

    View Slide

  26. .json .CSV .TXT
    MYSQL SQLITE
    Does it support
    MongoDB?

    View Slide

  27. .json .CSV .TXT
    MYSQL SQLITE MONGO
    Does it support
    MongoDB?

    View Slide

  28. .json .CSV .TXT
    MYSQL SQLITE MONGO
    Does it support
    MongoDB?

    View Slide

  29. .json .CSV .TXT
    MYSQL SQLITE MONGO
    Does it support
    MongoDB?

    View Slide

  30. View Slide

  31. View Slide

  32. THINK OUTSIDE
    THE FRAMEWORK
    Does your tool
    integrate with X? Can you integrate
    with X in Python?
    If developers can help themselves,
    they’re much happier.

    View Slide

  33. View Slide

  34. CALLBACKS
    PRACTICAL TIP #1

    View Slide

  35. FUNCTION
    REGISTRIES
    PRACTICAL TIP #2

    View Slide

  36. SINGLE-DISPATCH
    GENERIC FUNCTIONS
    PRACTICAL TIP #3
    PEP 443

    View Slide

  37. ENTRY POINTS
    PRACTICAL TIP #4

    View Slide

  38. AVOID I/O
    PRACTICAL TIP #5

    View Slide

  39. AVOID I/O
    PRACTICAL TIP #5

    View Slide

  40. AVOID I/O
    PRACTICAL TIP #5

    View Slide

  41. AVOID I/O
    PRACTICAL TIP #5

    View Slide

  42. View Slide

  43. function registry
    (and entry point)

    View Slide

  44. function registry
    (and entry point)
    let user do I/O

    View Slide

  45. function registry
    (and entry point)
    iterable of dicts
    (list, generator)
    let user do I/O

    View Slide

  46. function registry
    (and entry point)
    callback function
    iterable of dicts
    (list, generator)
    let user do I/O

    View Slide

  47. View Slide

  48. But this all looks way too
    complicated! Easy systems are
    much easier to demo!

    View Slide

  49. But this all looks way too
    complicated! Easy systems are
    much easier to demo!
    Try to invite their engineers to
    the demos. It’s a win-win for
    both sides.

    View Slide

  50. But we want to win over our
    customers and give them as
    many features as possible!

    View Slide

  51. But we want to win over our
    customers and give them as
    many features as possible!
    If you sell “all or nothing”,
    users have to go for “nothing”
    if they don’t want “all”.

    View Slide

  52. But we want our tool to be easy
    to learn. Why should users know
    all this other Python stuff?

    View Slide

  53. But we want our tool to be easy
    to learn. Why should users know
    all this other Python stuff?
    Background knowledge is easy to
    learn, it generalizes and there’s great
    resources. It’s tool-specific knowledge
    that’s hard.

    View Slide

  54. But isn’t this exclusive? What
    about people who can’t
    program?

    View Slide

  55. But isn’t this exclusive? What
    about people who can’t
    program?
    They can still benefit from an
    ecosystem if the tools are
    programmable.

    View Slide

  56. View Slide

  57. Machine Learning model builder
    Embedding layer Encoding layer Attention layer
    Output layer Training data BROWSE Evaluation data BROWSE
    Dropout 0.2
    Early stopping
    Update embeddings
    Save model to BROWSE
    CREATE & TRAIN

    View Slide

  58. View Slide

  59. CODERS VS.
    NON-CODERS?
    Making technology accessible to people
    who aren’t like you ≠ thinking of
    everything they might want and giving it
    to them.
    *

    View Slide

  60. CODERS VS.
    NON-CODERS?
    Making technology accessible to people
    who aren’t like you ≠ thinking of
    everything they might want and giving it
    to them.
    *
    Don’t divide the world into “coders” and
    “non-coders”.
    *

    View Slide

  61. LESSONS FROM
    OPEN-SOURCE
    Open-source tools have crushed closed-
    source software again and again (despite
    tremendous disadvantages).
    *

    View Slide

  62. LESSONS FROM
    OPEN-SOURCE
    Open-source tools have crushed closed-
    source software again and again (despite
    tremendous disadvantages).
    *
    Why? Because they’re programmable.
    *

    View Slide

  63. LESSONS FROM
    OPEN-SOURCE
    Open-source tools have crushed closed-
    source software again and again (despite
    tremendous disadvantages).
    *
    Why? Because they’re programmable.
    *
    It’s fine to make money and build closed-
    source systems. But learn this lesson.
    *

    View Slide

  64. Explosion
    explosion.ai
    Twitter
    @_inesmontani

    View Slide