CatWatchDog ˁ˚ᴥ˚ˀ - Custom Software Solutions, Expert Project Management.

Distraction recovery

Author: Dmitry Ro
Updated: 2023-05-24

Many non-tech people struggle to understand why distractions can have a significant impact on a programmer's productivity and not even consider as a distraction of what they are doing. There have been a few scientific research studies and experiments conducted to examine precisely how distractions affect their daily routine and the resulting outcomes they receive.

There is a few things to mention
  • Flow state
  • Memory
  • Distraction recovery time

Common conclusion is that if you being interrupted for 5 minutes you need up to 60 minutes to get back into flow state.

Flow state

According to Mihaly Csikszentmihalyi, flow state - a state of concentration or complete absorption with the activity at hand and the situation. It is a state in which people are so involved in an activity that nothing else seems to matter. The flow state is colloquially known as being in the zone or in the groove. It is an optimal state of intrinsic motivation, where the person is fully immersed in what they are doing. This is a feeling everyone has at times, characterized by a feeling of great absorption, engagement, fulfillment, and skill—and during which temporal concerns (time, food, ego-self, etc.) are typically ignored.

Csíkszentmihályi described flow as

“being completely involved in an activity for its own sake. The ego falls away. Time flies. Every action, movement, and thought follows inevitably from the previous one, like playing jazz. Your whole being is involved, and you're using your skills to the utmost.” — Mihaly Csikszentmihalyi
“Inducing flow is about the balance between the level of skill and the size of the challenge at hand” - Mihaly Csikszentmihalyi

There are several components / triggers of the flow state:
  • Present moment concentration
  • Immediate feedback
  • Clear goals
  • The Challenge-Skills Ratio

Challenge and skill ration is the hardest one to achive because we always tend to take more difficult challenge, at the same time here is the point when we grow, expanding skills to the challenge.


The worst time for interruptions is during points of high memory consumption, such as:

  • Editing multiple files and structures.
  • Creating complex database structures with dependencies.
In other words, the larger the task or workload you are handling in your mind, the greater the impact of an interruption.

There is a few types of memory:

  • Prospective Memory: This type of memory relates to remembering to perform tasks or actions in the future. It helps you remember to do something at a specific time or in a specific situation.
  • Attentional Memory (sometimes referred to as Working Memory): This type of memory involves actively maintaining and manipulating information in your mind. It plays a crucial role in tasks that require focused attention and temporary storage of information.
  • Associative Memory: This type of memory involves linking or associating different pieces of information together. It helps you remember relationships between items or concepts, making it easier to retrieve related information when needed.
  • Episodic Memory: Episodic memory is responsible for remembering specific events or episodes from your personal experiences. It enables you to recall past events, including details about the time, place, emotions, and associated contextual information.
  • Conceptual Memory: Conceptual memory encompasses the storage and retrieval of abstract knowledge, ideas, principles, and concepts. It allows you to understand and apply general rules, categories, and theories.

Each of these types helps to recall what was before you were distracted, but you can also assist in that process. The common recommendations in this regard are:

  • Use TODO comments in the code.
  • Commit frequently and use snapshots (if you work on really hard task with high complexity rate)
  • Imagine being interrupted in the middle of a git stash or git rebase and getting back to work after a 15-minute-long call.
  • Recovery from distraction

According to various research studies, it takes an average of 23 minutes and 15 seconds to get back to a task after being interrupted. Additionally, software developers typically have only one uninterrupted 2-hour session per day. What non-tech people think happens when they make a call with developer who already working on something is illustrated on this figure below

Interruption recovery
They think like right after a call developer will start “fixing issue”, “do that stuff“, “make it works“


To mitigate the negative effects of interruptions, some programmers adopt strategies such as blocking off uninterrupted work periods, utilizing focus-enhancing techniques like:

  • the Pomodoro Technique, it’s very famouse and simple, everybody can try that
  • Creating a distraction-free work environment.
  • Blocking off time, - put event blocks of time in calendars which you’re prefer to not be interrupted. (Some of corporate services already implement that feature)

Note to non-tech people

How can you tell if a person is busy and does not want to be distracted?

  • Headphones on their head (even if they are not listening to music).
  • Check their calendar; they may have designated Do Not Disturb (DND) time blocked.
  • Look at their instant messaging statuses (Slack, Teams, Mattermost, most platforms have this feature since the ICQ DND days ;-) ).
  • Keep in mind that software development is not solely about writing code itself. Approximately 60% of the time is spent thinking about how to write it.
  • Programmers often contemplate problems, even when they are simply relaxing on a park bench outside. Therefore, it's essential not to judge based on visual appearance or make assumptions.
  • Body language: Pay attention to their body language. If they appear focused, engrossed in their work, or avoiding eye contact, it could be a sign that they are in the midst of something important.
  • Engaged in deep work: If you notice someone deeply engrossed in their work, displaying a high level of concentration and productivity, it's best to avoid interrupting them unless absolutely necessary.
  • Closed office door or private workspace: If the person has a closed office door or works in a secluded area, it often implies that they require uninterrupted time to focus on their tasks.
  • Prioritizing tasks: If you know that the person has multiple responsibilities or deadlines, it's likely they are juggling various tasks. Respect their priorities and avoid unnecessary interruptions.
  • Prior communication: If the person has communicated beforehand about their need for uninterrupted time or indicated that they are in a critical phase of their work, it's crucial to honor their request and avoid distracting them.


Share your toughts on that Leave a comment