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

Increasing focus. (For software developers.)

Wildbit
September 24, 2018

Increasing focus. (For software developers.)

Struggling to stay in the zone? Meetings. Chat. Interruptions. Distractions. Open offices.

There has to be a better way. So we wrote a book focused on helping developers like you get into and stay in the zone so you can get more done with less time.

Wildbit

September 24, 2018
Tweet

More Decks by Wildbit

Other Decks in Programming

Transcript

  1. Productivity insights
    for software developers.
    (Probably useful for others too.)

    View full-size slide

  2. …the problem-solving nature of
    programming and testing tasks make
    them more vulnerable to interruptions
    compared to architecture and UI design
    tasks. 1
    1 Abad, Z. S. H., Karras, O., Schneider, K., Barker, K., & Bauer, M. (2018). Task Interruption in Software Development Projects (pp.
    122–132). Presented at the the 22nd International Conference, New York, New York, USA: ACM Press.

    View full-size slide

  3. For software development, focus is
    simply more fragile than other
    tasks.
    And focus requires willpower to
    ignore distractions and stay
    focused, but…

    View full-size slide

  4. You have a finite amount of
    willpower that becomes
    depleted as you use it. 2
    2 Newport, Cal. Deep Work: Rules for Focused Success in a Distracted World (p. 100). Grand Central Publishing. Kindle Edition.

    View full-size slide

  5. As the day goes on, it’s naturally
    more difficult to focus.

    View full-size slide

  6. A programmer is likely to
    get just one uninterrupted
    two hour session in a day 3
    3 Parnin, C. (2013). Programmer, interrupted (pp. 171–172). Presented at the 2013 IEEE Symposium on Visual Languages and
    Human-Centric Computing (VL/HCC), IEEE.

    View full-size slide

  7. …for a novice, somewhere around an hour
    a day of intense concentration seems to be
    a limit, while for experts this number can
    expand to as many as four hours—but rarely
    more. 4
    4 Newport, Cal. Deep Work: Rules for Focused Success in a Distracted World (p. 100). Grand Central Publishing. Kindle Edition.

    View full-size slide

  8. So, really, 1 to 4 hours of
    productivity per day.

    View full-size slide

  9. How can you maximize your
    productive time to get the most out
    of each day?

    View full-size slide

  10. Disclaimer: You may need manager
    support and advocacy for some of
    these tactics.

    View full-size slide

  11. Take care of
    yourself and your
    team.

    View full-size slide

  12. Proper nutrition, sleep and exercise
    lead to activate a state of optimal
    mental health, resulting in an
    enhancement of brain function. 5
    5 Altomare, R., Damiano, G., Palumbo, V. D., Buscemi, S., Spinelli, G., & Cacciabaudo, F. (2017). Feeding the brain: the importance
    of nutrients for brain functions and health. Progress in Nutrition, 19, 1–5.

    View full-size slide

  13. …diet alone is not enough to maintain a healthy
    brain, but it is important that it is accompanied by
    constant exercise and regular sleep. Proper rest and
    the benefits of sport further strengthen the brain
    synapses, greatly improving the cognitive abilities of
    individuals.6
    6 Altomare, R., Damiano, G., Palumbo, V. D., Buscemi, S., Spinelli, G., & Cacciabaudo, F. (2017). Feeding the brain: the importance
    of nutrients for brain functions and health. Progress in Nutrition, 19, 1–5.

    View full-size slide

  14. Get and encourage rest.
    You need rest to be at your best.

    View full-size slide

  15. …we observed a difference of about 44% in the
    engagement with the task of developers who forewent one
    night of sleep and developers under normal sleep condition.
    Moreover, the results showed that sleep-deprived
    developers performed 54% more fixing addressing syntactic
    mistakes compared to developers who slept regularly. 7
    7 Fucci, D., Scanniello, G., Romano, S., & Juristo, N. (2018). Need for Sleep: the Impact of a Night of Sleep Deprivation on Novice
    Developers’ Performance. IEEE Transactions on Software Engineering, 1–20.

    View full-size slide

  16. Make time to exercise.
    It’s good for your brain.

    View full-size slide

  17. …evidence for the benefits of exercise on
    both affective experience and cognitive
    performance points to exercise as an effective,
    low-cost intervention for improving both
    affective and cognitive health. 8
    8 Hogan, C. L., Mata, J., & Carstensen, L. L. (2013). Exercise holds immediate benefits for affect and cognition in younger and
    older adults. Psychology and Aging, 28(2), 587–594.

    View full-size slide

  18. Take a walking break.
    Your brain keeps working even if you’re not.

    View full-size slide

  19. Walking substantially enhanced creativity by two different measures.
    For the three alternate uses studies, 81%, 88%, and 100% of
    participants were more creative walking than sitting. For the BSE,
    100% of those who walked outside generated at least one novel high-
    quality analogy compared with 50% of those seated inside. Walking
    worked indoors on a treadmill and outdoors at a bustling university. 9
    9 Oppezzo, M., & Schwartz, D. L. (2014). Give your ideas some legs: The positive effect of walking on creative thinking. Journal
    of Experimental Psychology: Learning, Memory, and Cognition, 40(4), 1142–1152.

    View full-size slide

  20. Work less.
    Focus on productive time, not hours in your seat.

    View full-size slide

  21. When you look at the world’s
    wealthiest countries, higher
    productivity correlates closely with
    working fewer hours. (OECD Data)

    View full-size slide

  22. Stay hydrated.
    Water isn’t just for athletes.

    View full-size slide

  23. …mild hypohydration, resulted in an increase in errors during a
    prolonged, monotonous drive, compared to that observed while
    performing the same task in a hydrated condition. The
    magnitude of decrement reported was similar to that observed
    following the ingestion of alcohol resulting in a blood alcohol
    content of approximately 0.08 % (the current UK legal driving
    limit), or while sleep deprived. 10
    10 Watson, P., Whale, A., Mears, S. A., Reyner, L. A., & Maughan, R. J. (2015). Mild hypohydration increases the frequency of driver
    errors during a prolonged, monotonous driving task. Physiology & Behavior, 147, 313–318.

    View full-size slide

  24. Eat well.
    Brain foods are real.

    View full-size slide

  25. the brain, which represents 2% of
    our body weight, consumes about
    20% of the calories we eat each
    day. 11
    11 Altomare, R., Damiano, G., Palumbo, V. D., Buscemi, S., Spinelli, G., & Cacciabaudo, F. (2017). Feeding the brain: the importance
    of nutrients for brain functions and health. Progress in Nutrition, 19(3), 1–5.

    View full-size slide

  26. The best studies of the consequences of skipping
    breakfast have been conducted among children , but
    the same principles apply to all of us . Hunger at any
    time has been shown to reduce a child’s ability to pay
    attention , absorb information , and respond appropriately
    to the environment. 12
    12 Schwartz, Tony. The Way We're Working Isn't Working: The Four Forgotten Needs That Energize Great Performance (p. 94).
    Free Press. Kindle Edition.

    View full-size slide

  27. Blueberries
    Nuts
    Avacados
    Salmon 13
    13 WebMD: Eat Smart for a Healthier Brain

    View full-size slide

  28. Another sore point for the health of the
    brain is the consumption of junk food,
    high in saturated fats which are seriously
    detrimental to the welfare [of the]
    brain. 14
    14 Altomare, R., Damiano, G., Palumbo, V. D., Buscemi, S., Spinelli, G., & Cacciabaudo, F. (2017). Feeding the brain: the importance
    of nutrients for brain functions and health. Progress in Nutrition, 19(3), 1–5.

    View full-size slide

  29. Defend your day.
    Protect uninterrupted blocks of time.

    View full-size slide

  30. You know that feeling at the
    beginning of a day when you look
    at your calendar and don’t have
    any meetings or distractions?

    View full-size slide

  31. Group meetings and other day-
    fragmenting tasks into a single day
    to save large contiguous blocks of
    time for deep work the other days.

    View full-size slide

  32. Check email or chat less
    frequently.
    Dedicate time for checking and responding to email.

    View full-size slide

  33. E-mail interruptions have a negative time impact
    upon employees and show that both interrupt
    handling and recovery time exist. A typical task
    takes one third longer than undertaking a task
    with no e-mail interruptions. 15
    15 Marulanda Carter, L., & Jackson, T. W. (2012). Effects of e-mail addiction and interruptions on employees. Journal of Systems
    and Information Technology, 14(1), 82–94.

    View full-size slide

  34. Reduce interruptions—reduce
    stress.
    Less stress means more happiness.

    View full-size slide

  35. …interrupted work is performed faster. We offer an interpretation.
    When people are constantly interrupted, they develop a mode of working
    faster (and writing less) to compensate for the time they know they
    will lose by being interrupted. Yet working faster with interruptions has
    its cost: people in the interrupted conditions experienced a higher
    workload, more stress, higher frustration, more time pressure, and
    effort. So interrupted work may be done faster, but at a price. 16
    16 Mark, G., Gudith, D., & Klocke, U. (2008). The cost of interrupted work (pp. 107–110). Presented at the Proceeding of the
    twenty-sixth annual CHI conference, New York, New York, USA: ACM Press.

    View full-size slide

  36. Value and support happiness.
    Happiness and productivity go hand-in-hand.

    View full-size slide

  37. …our results show that unhappiness
    makes developers take shortcuts in
    the process, often leading to low
    code quality. 17
    17 Graziotin, D., Fagerholm, F., Wang, X., & Abrahamsson, P. (2017, January 11). Unhappy Developers: Bad for Themselves, Bad for
    Process, and Bad for Software Product. arXiv.org. IEEE.

    View full-size slide

  38. Reduce your TTF.
    (Time-to-flow.)

    View full-size slide

  39. The faster you can get into the
    zone, the better.

    View full-size slide

  40. Create your ideal focus
    environment.
    Many factors influence your ability to concentrate.

    View full-size slide

  41. Private.
    Quiet. (Or with headphones.)
    Natural light. (Or not.)
    Good air quality.
    Comfortable temperature.
    Plants.
    Reduce clutter.
    Minimize visual distraction.

    View full-size slide

  42. Build habits and rituals.
    These signals can help you start faster.

    View full-size slide

  43. Build a strong and consistent ritual
    for starting your day that helps you
    work towards getting in the zone
    faster. Let’s look at an example…

    View full-size slide

  44. Get to your development setup
    quickly.
    Spend less time open applications and browsing for
    files.

    View full-size slide

  45. Write scripts and use other tools to
    reduce the time it takes to get the
    right applications open. Text editor.
    Terminal. Version control.
    Automated tests.

    View full-size slide

  46. Start your day with big or
    challenging tasks.
    Don’t waste finite willpower on small or mindless
    tasks.

    View full-size slide

  47. Starting your day with a big task
    primes your brain so it can
    continue working on the problem
    even if you switch to something
    else.

    View full-size slide

  48. Plan a little at the beginning
    and end of your day.
    Start focused and prepare yourself for the next day.

    View full-size slide

  49. Wrap up your thoughts at the end
    of the day to help you pick up
    where you left off when you get
    started the next day.

    View full-size slide

  50. Leave something broken.
    Give yourself a clear focus to start your next session.

    View full-size slide

  51. Our brains don’t like to leave things
    unfinished. Leaving something
    broken can make it easier to dive
    right into work when you’re back at
    your computer.

    View full-size slide

  52. Reduce context-
    switching.

    View full-size slide

  53. A programmer takes between
    10-15 minutes to start editing
    code after resuming work from an
    interruption. 18
    18 Parnin, C. (2013). Programmer, interrupted (pp. 171–172). Presented at the 2013 IEEE Symposium on Visual Languages and
    Human-Centric Computing (VL/HCC), IEEE.

    View full-size slide

  54. Carefully curate and reduce
    notifications.
    They are rarely as important as we like to think they
    are.

    View full-size slide

  55. Studies have shown that responding to notifications
    impedes the efficient resumption of interrupted
    tasks and negatively impacts task performance. A
    proposed solution is to relinquish notifications and
    allow users to seek for information at their own
    convenience. 19
    19 Iqbal, S. T., & Horvitz, E. (2010). Notifications and awareness (pp. 27–30). Presented at the the 2010 ACM conference, New York,
    New York, USA: ACM Press.

    View full-size slide

  56. Identify and monitor
    distractions.
    You can’t reduce what you’re not aware of.

    View full-size slide

  57. Use Rescuetime to learn your
    distraction triggers and quantify
    productivity. Pay attention to what
    does and doesn’t work. What
    creates problems? Can you make
    changes?

    View full-size slide

  58. Don’t keep your phone in your
    work area.
    Or at least turn it off.

    View full-size slide

  59. Don’t distract yourself.
    You can be your own worst enemy.

    View full-size slide

  60. We also found that individuals seated
    in open office environments self-
    interrupted at a substantially higher
    rate. 20
    20 Dabbish, L., Mark, G., & Gonzalez, V. M. (2011). Why do i keep interrupting myself? (pp. 3127–3130). Presented at the the 2011
    annual conference, New York, New York, USA: ACM Press.

    View full-size slide

  61. Clear your mind of other tasks.
    It’s difficult to concentrate with other tasks nagging
    your brain.

    View full-size slide

  62. Your mind only has so much
    working space. This is why one of
    the main goals of GTD (Getting
    Things Done) is recording things to
    get them out of your head so you
    can focus.

    View full-size slide

  63. Do fewer simultaneous projects.
    Less bouncing between projects.

    View full-size slide

  64. Context-switching within a project or
    to a similar type of task on a different
    project can work, but minimize
    switching frequently between
    significantly different projects by
    working on few projects at any given
    time.

    View full-size slide

  65. Do less.
    Don’t spread yourself thin.

    View full-size slide

  66. It’s easier said than done, but
    simply saying no to projects is the
    best way to reduce context-
    switching.

    View full-size slide

  67. Automate more.
    Reduce the need to switch tasks at all.

    View full-size slide

  68. You’re not automating a 15 second
    task. You’re reducing the 15
    minutes of context-switching
    overhead for each time you
    perform the task.

    View full-size slide

  69. Automate tasks that are painful.
    Reducing unhappiness is a
    productivity win.

    View full-size slide

  70. Get better at
    context-
    switching.

    View full-size slide

  71. You can’t remove 100% of
    interruptions or distractions, so get
    good at handling them efficiently.

    View full-size slide

  72. In only a small percentage of sessions did developers resume
    coding in less than a minute. Developers consistently spend a
    significant portion of their time doing non-editing activities
    before making their first edit in a session. During this
    time period, developers are performing a variety of
    activities that relate to rebuilding their task context. 21
    21 Parnin, C., & Rugaber, S. (2010). Resumption strategies for interrupted programming tasks. Software Quality Journal, 19(1), 5–
    34.

    View full-size slide

  73. Switch strategically.
    Sometimes you just need to switch gears.

    View full-size slide

  74. Sometimes you hit walls. Recognize
    when switching gears to a different or
    related task can help you see things
    from a fresh perspective and find the
    solution to a problem. Your brain will
    still work on the problem in the
    background.

    View full-size slide

  75. Break large tasks into smaller,
    related tasks.
    Your brain likes completing tasks. So completing a
    higher number of small tasks helps.

    View full-size slide

  76. The feeling of accomplishment
    encourages you to keep going, and
    you have more natural stopping
    points to recharge. Your brain is also
    less overwhelmed and thus less
    inclined to need a break at the wrong
    time.

    View full-size slide

  77. Avoid switching to cognitively
    different tasks.
    Try to keep your work on the same type of task or a
    closely related task.

    View full-size slide

  78. e.g. Don’t switch between writing
    code and manual testing. Or don’t
    switch between writing
    documentation and coding.

    View full-size slide

  79. Be slower to switch.
    Take a few moments to collect your thoughts and
    mentally save your working state.

    View full-size slide

  80. …a brief interruption lag of a few
    seconds can facilitate resumption, by
    allowing an opportunity to lay the cognitive
    groundwork for returning to the primary
    task later. 22
    22 Trafton, J. G., Altmann, E. M., Brock, D. P., & Mintz, F. E. (2003). Preparing to resume an interrupted task: effects of prospective
    goal encoding and retrospective rehearsal. International Journal of Human-Computer Studies, 58(5), 583–603.

    View full-size slide

  81. Reduce error-
    based
    distractions.

    View full-size slide

  82. You can’t avoid every mistake, but
    making fewer mistakes and/or
    recovering faster can give you more
    productive time.

    View full-size slide

  83. Slow down.
    Working faster increases mistakes.

    View full-size slide

  84. Add automated tests.
    Catch mistakes while your mind is still thinking about
    the problem.

    View full-size slide

  85. There’s simply some things computers
    are really good at, and automatically
    checking for errors on your behalf is
    one of them. Writing tests also helps
    you analyze your code. Then the
    computer can do the tedious part.

    View full-size slide

  86. Don’t deploy on a Friday.
    Weekends are for recharging. Don’t risk losing that.

    View full-size slide

  87. It’s bad enough having to fix a broken
    deploy on the weekend, but this is
    also cutting into your rest that you
    need to be at your best. Take rest
    seriously and maximize your chances
    of getting enough by not deploying
    before time off.

    View full-size slide

  88. Get good at debugging.
    Build context faster and find the problem faster.

    View full-size slide

  89. Avoiding mistakes is great, but
    fixing them quickly and seamlessly
    is the next best thing. The better
    you are at debugging, the less time
    you’ll spend searching for answers
    when something breaks.

    View full-size slide

  90. Always be refactoring.
    Cleaner and more readable code benefits everyone’s
    productivity.

    View full-size slide

  91. While refactoring can slow you down in
    the short-term, if you’re in the middle
    of work and notice a meaningful
    opportunity for refactoring, set aside
    some time after you complete your
    task to make improvements.

    View full-size slide

  92. Make the most of
    tools.

    View full-size slide

  93. Make tools earn their keep.
    Just because a tool is supposed to increase
    productivity doesn’t mean it is.

    View full-size slide

  94. Always question the net
    productivity of your tools over the
    long-term. (But don’t confuse a
    learning curve with a lack of
    productivity.)

    View full-size slide

  95. Cut tools ruthlessly.
    Fewer tools means fewer areas for issues.

    View full-size slide

  96. While you can’t always be switching
    tools, removing tools can reduce
    the surface area for things to
    break. You're never adding just one
    thing to your stack but all of the
    dependencies as well.

    View full-size slide

  97. Move up the chain.
    Higher-level tools can save you from plumbing
    distractions so you can get more done.

    View full-size slide

  98. Just like a high-level programming
    language can be more efficient
    than Assembly, taking the time to
    migrate to and learn higher-level
    tools can improve efficiency as
    well.

    View full-size slide

  99. Fix or fire unreliable tools.
    Be honest about whether a tool might be harming your
    productivity more than helping.

    View full-size slide

  100. …developers found especially unpleasant those interrupts
    caused by failure or insufficient knowledge of development
    tools. Even though few such interrupts occurred, the
    developers spent much effort handling them. Therefore,
    they suggested focusing special attention on keeping the
    tool environment running and providing adequate tool training.
    23
    23 van Solingen, R., Berghout, E., & van Latum, F. (1998). Interrupts: just a minute never is. IEEE Software, 15(5), 97–103.

    View full-size slide

  101. Learn your tools forwards and
    backwards.
    When you use a tool regularly, the more second nature
    it is, the less distracting it will be.

    View full-size slide

  102. If you are a heavy user of a given
    tool, make time to watch tutorials
    and learn more about how you can
    use the tool better with less effort.

    View full-size slide

  103. Use tools to improve efficiency.
    Get thing things done faster and with fewer
    keystrokes.

    View full-size slide

  104. Creating convenient bookmarks for
    frequently-accessed URLs and
    tools, and use tools like
    textexpander and Alfred to improve
    efficiency and reduce the need to
    look up frequently used resources.

    View full-size slide

  105. Use tools to help with focus.
    Tools can help build and strengthen habits.

    View full-size slide

  106. Tools like Focus and tools that
    support the Pomodoro technique
    can help alternate between intense
    focus and short breaks.

    View full-size slide

  107. Improve
    communication.

    View full-size slide

  108. Go asynchronous.
    Chat is the anti-productivity tool.

    View full-size slide

  109. Be slow to rely on chat. It's more
    productive for you in the moment,
    but it's likely counter-productive
    for the recipient of the chat.

    View full-size slide

  110. Turn to email instead of chat or
    phone calls whenever possible.
    This frees the recipient to handle
    and respond at a time that doesn’t
    break their concentration.

    View full-size slide

  111. Respect each other.
    Strive to reduce distractions for your team members.

    View full-size slide

  112. Don’t slide into someone’s DM’s
    with “hey.” Provide a detailed
    description of what you need so
    they can decide whether it’s urgent
    relative to what they’re working on.

    View full-size slide

  113. Could you send an email and
    switch to a different, but still
    productive, task while you wait for
    the answer?

    View full-size slide

  114. We found that external interruptions
    experienced in the previous hour
    significantly increase the incidence of
    self interruption in the subsequent hour.
    24
    24 Dabbish, L., Mark, G., & Gonzalez, V. M. (2011). Why do i keep interrupting myself? (pp. 3127–3130). Presented at the the 2011
    annual conference, New York, New York, USA: ACM Press.

    View full-size slide

  115. Extensively document your
    question or challenge.
    You’ll often answer your own question.

    View full-size slide

  116. Frequently, the process of
    documenting and explaining your
    question will help you uncover the
    answer without interrupting
    someone else.

    View full-size slide

  117. Improve documentation.
    When documentation answers questions, people don’t
    have to interrupt others.

    View full-size slide

  118. …approximately 25 percent of all interrupts were
    caused by issues related to knowledge or experience,
    such as discussing program structures or explaining
    technical details. Further, 20 percent were caused
    by documentation issues, such as documentation review
    and inadequate or nonexistent documentation. 25
    25 van Solingen, R., Berghout, E., & van Latum, F. (1998). Interrupts: just a minute never is. IEEE Software, 15(5), 97–103.

    View full-size slide

  119. Shorten, consolidate, and
    reduce meetings.
    Meetings are multipliers since they involve multiple
    people.

    View full-size slide

  120. Fewer meetings means fewer
    instances of “What do I do with this
    15 minutes before a meeting?”
    (Multiplied by the number of
    attendees.)

    View full-size slide

  121. Encourage a default of 15 minutes
    for meetings instead of an hour,
    and require that everyone seriously
    prepare for meetings ahead of
    time.

    View full-size slide

  122. Take care with commit
    messages and revision
    histories.
    More informative histories serve as key
    documentation down the road.

    View full-size slide

  123. Version control commit messages
    and histories are their own form of
    historic documentation that can
    great increase understanding when
    team members need to make
    modifications in the future.

    View full-size slide

  124. In summary…

    View full-size slide

  125. Take care of yourself.
    You can’t focus if you can’t function.

    View full-size slide

  126. Focus faster.
    Take steps to reduce friction for getting into the zone.

    View full-size slide

  127. Reduce context-switching.
    The less you switch, the easier it is to focus.

    View full-size slide

  128. Get better at context-switching.
    You can’t eliminate it, but you can be better at it.

    View full-size slide

  129. Reduce error-based
    distractions.
    The more you can focus, the less you’ll have to fix.

    View full-size slide

  130. Become one with your tools.
    Ditch the counter-productive ones and get great with
    the important ones.

    View full-size slide

  131. Improve communication.
    Become more efficient, and minimize interrupting each
    other.

    View full-size slide

  132. Like how we
    think?
    Read the whole book for free.
    Or come check out Conveyor.

    View full-size slide