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

Get off the tightrope

Tom Stuart
November 16, 2017

Get off the tightrope

Do you feel stressed when you’re trying to hold a big problem in your head? Do you get frustrated when someone interrupts you and you have to start all over again? Those emotions are inevitable if you’re in the common habit of treating each programming task as a long, precarious, all-or-nothing tightrope walk. But it doesn’t have to be that way! In this talk I’ll explain why the tightrope walk is so harmful and show you some practical techniques for avoiding it.

Given at RubyConf 2017 (http://rubyconf.org/). A video and transcript is available at https://tomstu.art/get-off-the-tightrope.

Tom Stuart

November 16, 2017
Tweet

More Decks by Tom Stuart

Other Decks in Technology

Transcript

  1. https://codon.com/get-off-the-tightrope
    GET OFF
    THE TIGHTROPE

    View Slide

  2. A very common
    problem.

    View Slide

  3. CTO,
    FutureLearn

    View Slide

  4. It
    affects
    everyone.

    View Slide

  5. BAD NEWS:
    it’s serious.
    GOOD NEWS:
    it’s fixable.

    View Slide

  6. THE PROBLEM
    THE SYMPTOMS
    THE CAUSES
    SOME REMEDIES
    WHY IS THIS IMPORTANT?

    View Slide

  7. THE
    PROBLEM

    View Slide

  8. Trying to do
    a big thing
    all at once.

    View Slide

  9. A large task,
    all in your head.

    View Slide

  10. One long, precarious,
    all-or-nothing
    tightrope
    walk.

    View Slide

  11. THE
    SYMPTOMS

    View Slide

  12. It’s stressful
    and hard to
    get right.

    View Slide

  13. You disappear
    down rabbit holes.

    View Slide

  14. You get too invested
    in your early mistakes.

    View Slide

  15. You learn to hate
    interruptions & distractions.

    View Slide

  16. (Tech culture
    reinforces this view.)

    View Slide

  17. http://heeris.id.au/2013/this-is-why-you-shouldnt-interrupt-a-programmer/

    View Slide

  18. https://twitter.com/phil_wade/status/896010517617180672

    View Slide

  19. View Slide

  20. It takes a long time
    to pick up your thread again.

    View Slide

  21. irritability about questions and meetings
    worrying you’ll forget what to do next
    typing “git status” and seeing twenty files
    modified
    a big long branch with lots of commits
    saying “WIP”, “fix stuff”, “changed my
    mind”, “redo this later”

    View Slide

  22. THE
    CAUSES

    View Slide

  23. Eager to
    make progress.

    View Slide

  24. Unsure
    how big
    it’s going to be.

    View Slide

  25. Unsure
    how far
    you have to go.

    View Slide

  26. Belief that
    programmers are special.

    View Slide

  27. This is flattering,
    but misguided.

    View Slide

  28. Opportunities for
    empathy &
    collaboration.

    View Slide

  29. SOME
    REMEDIES

    View Slide

  30. Planning
    ahead.

    View Slide

  31. Story mapping

    View Slide

  32. CUSTOMER BUYS PRODUCT
    View
    product
    page
    Add product
    to basket
    Enter
    payment
    details
    View
    basket
    page
    Confirm
    order
    Ship
    product
    Enter
    shipping
    details
    Cancel
    order

    View Slide

  33. CUSTOMER BUYS PRODUCT
    Remove
    product
    from basket
    Update old
    payment
    details
    Save product
    for later
    Request
    refund
    Browse
    related
    products
    Search all
    products
    Update
    product
    quantity
    in basket
    Add product
    to wishlist

    View Slide

  34. CUSTOMER BUYS PRODUCT
    time

    View Slide

  35. CUSTOMER BUYS PRODUCT
    time
    ? ??
    ?

    View Slide

  36. CUSTOMER BUYS PRODUCT
    Charge
    credit card
    Refund
    credit card
    Send refund
    confirmation
    email
    Send order
    confirmation
    email
    Filter
    search
    results
    Enter
    voucher
    code
    Sort
    search
    results
    Apply
    3-for-2
    offer

    View Slide

  37. CUSTOMER BUYS PRODUCT

    View Slide

  38. CUSTOMER BUYS PRODUCT

    View Slide

  39. CUSTOMER BUYS PRODUCT

    View Slide

  40. Story mapping
    breaks down your big problem
    into small, achievable subproblems.

    View Slide

  41. History
    hygiene.

    View Slide

  42. Make small, focused commits.

    View Slide

  43. Write commit messages
    that explain your thinking.

    View Slide

  44. Keep your branch
    in good shape.

    View Slide

  45. Don’t diverge
    too far from master.

    View Slide

  46. origin/master
    my-branch

    View Slide

  47. origin/master
    my-branch

    View Slide

  48. my-branch
    origin/master

    View Slide

  49. Cherry-pick
    preparatory work
    onto master.

    View Slide

  50. origin/master
    my-branch

    View Slide

  51. origin/master
    my-branch

    View Slide

  52. my-branch
    origin/master

    View Slide

  53. Use interactive rebase,
    early and often.

    View Slide

  54. Introduce Foo
    Clarify text in UI
    Rename Foo to Bar
    Improve performance

    View Slide

  55. Introduce Foo
    Clarify text in UI
    Rename Foo to Bar
    Improve performance

    View Slide

  56. Introduce Foo
    Clarify text in UI
    Rename Foo to Bar
    Improve performance

    View Slide

  57. Introduce Foo
    Clarify text in UI
    Improve performance
    Rename Foo to Bar
    Introduce Bar

    View Slide

  58. Practice switching away.

    View Slide

  59. Test-
    driven
    development.

    View Slide

  60. Learn to switch between
    the mental modes of
    red-green-refactor.

    View Slide

  61. Remember that
    red-green-refactor
    is a powerful mind hack.

    View Slide

  62. Work outside-in
    with acceptance tests.

    View Slide

  63. Write tests
    that really do check
    what you care about.

    View Slide

  64. Notes and
    conversations.

    View Slide

  65. Take notes
    and write down questions
    as you find them.

    View Slide

  66. Practice explaining
    your train of thought.

    View Slide

  67. Talk to other people about
    what you’re doing
    and why.

    View Slide

  68. Planning ahead.
    History hygiene.
    Test-driven development.
    Notes & conversations.

    View Slide

  69. Make your
    own solutions.

    View Slide

  70. Notice the risk,
    then break it down.

    View Slide

  71. Some resources.
    http://jpattonassociates.com/user-story-mapping/
    User Story Mapping
    https://about.futurelearn.com/blog/telling-stories-with-your-git-history
    Telling stories with your Git history
    http://www.growing-object-oriented-software.com/
    Growing Object-Oriented Software Guided by Tests
    https://pragprog.com/book/rspec3/effective-testing-with-rspec-3
    Effective Testing with RSpec 3

    View Slide

  72. Ashley Ellis Pierce,
    Git Driven Refactoring

    View Slide

  73. Valerie Woolard Srinivasan,
    How I Learned to Stop Worrying and Love Unit
    Testing
    Noel Rappin,
    High Cost Tests and High Value Tests

    View Slide

  74. WHY
    IS THIS
    IMPORTANT?

    View Slide

  75. Great developers are
    great at this.

    View Slide

  76. Great developers
    are persistent,
    have strategies,
    and apply them
    methodically.

    View Slide

  77. This gets easier
    with practice.

    View Slide

  78. https://codon.com/get-off-the-tightrope
    THANKS.
    @tomstuart

    View Slide