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. …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.
  2. For software development, focus is simply more fragile than other

    tasks. And focus requires willpower to ignore distractions and stay focused, but…
  3. 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.
  4. 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.
  5. …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.
  6. 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.
  7. …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.
  8. …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.
  9. …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.
  10. 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.
  11. When you look at the world’s wealthiest countries, higher productivity

    correlates closely with working fewer hours. (OECD Data)
  12. …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.
  13. 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.
  14. 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.
  15. 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.
  16. You know that feeling at the beginning of a day

    when you look at your calendar and don’t have any meetings or distractions?
  17. Group meetings and other day- fragmenting tasks into a single

    day to save large contiguous blocks of time for deep work the other days.
  18. 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.
  19. …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.
  20. …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.
  21. Private. Quiet. (Or with headphones.) Natural light. (Or not.) Good

    air quality. Comfortable temperature. Plants. Reduce clutter. Minimize visual distraction.
  22. 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…
  23. Get to your development setup quickly. Spend less time open

    applications and browsing for files.
  24. 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.
  25. Start your day with big or challenging tasks. Don’t waste

    finite willpower on small or mindless tasks.
  26. 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.
  27. Plan a little at the beginning and end of your

    day. Start focused and prepare yourself for the next day.
  28. 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.
  29. 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.
  30. 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.
  31. 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.
  32. 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?
  33. 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.
  34. 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.
  35. 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.
  36. It’s easier said than done, but simply saying no to

    projects is the best way to reduce context- switching.
  37. 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.
  38. 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.
  39. 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.
  40. Break large tasks into smaller, related tasks. Your brain likes

    completing tasks. So completing a higher number of small tasks helps.
  41. 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.
  42. Avoid switching to cognitively different tasks. Try to keep your

    work on the same type of task or a closely related task.
  43. e.g. Don’t switch between writing code and manual testing. Or

    don’t switch between writing documentation and coding.
  44. Be slower to switch. Take a few moments to collect

    your thoughts and mentally save your working state.
  45. …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.
  46. You can’t avoid every mistake, but making fewer mistakes and/or

    recovering faster can give you more productive time.
  47. 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.
  48. 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.
  49. 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.
  50. 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.
  51. Make tools earn their keep. Just because a tool is

    supposed to increase productivity doesn’t mean it is.
  52. Always question the net productivity of your tools over the

    long-term. (But don’t confuse a learning curve with a lack of productivity.)
  53. 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.
  54. Move up the chain. Higher-level tools can save you from

    plumbing distractions so you can get more done.
  55. 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.
  56. Fix or fire unreliable tools. Be honest about whether a

    tool might be harming your productivity more than helping.
  57. …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.
  58. Learn your tools forwards and backwards. When you use a

    tool regularly, the more second nature it is, the less distracting it will be.
  59. 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.
  60. 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.
  61. Tools like Focus and tools that support the Pomodoro technique

    can help alternate between intense focus and short breaks.
  62. 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.
  63. 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.
  64. 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.
  65. Could you send an email and switch to a different,

    but still productive, task while you wait for the answer?
  66. 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.
  67. Frequently, the process of documenting and explaining your question will

    help you uncover the answer without interrupting someone else.
  68. …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.
  69. Fewer meetings means fewer instances of “What do I do

    with this 15 minutes before a meeting?” (Multiplied by the number of attendees.)
  70. Encourage a default of 15 minutes for meetings instead of

    an hour, and require that everyone seriously prepare for meetings ahead of time.
  71. Take care with commit messages and revision histories. More informative

    histories serve as key documentation down the road.
  72. 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.