Tips on Dealing with Distractions for Software Engineers

Focusing on the same task for a long time has always been a big challenge for me. Based on my online research I've convinced that I might suffer from ADD, though I find many in the software industry who look like suffering from ADD, OCD, or both.

Whether we suffer from ADD or developed a similar behavior as a symptom of our lifestyle, we can build new habits that not only keep us calm and relaxed but also improve our productivity and quality of work that leads to creating better software and ultimately a better world!

In this post, I'm going to share my experience, methods, and habits that helped keep myself calm, focused, and available, especially at my job as a software engineer particularly, in this pandemic situation where we work remotely.

Social Media

You probably already know enough how social media affects mental health negatively. I've limited my social media surfing time to the bathroom breaks and it's mostly the news on Twitter. I do not have a Facebook account and made it harder to check out Instagram and TikTok by removing their shortcuts from my phone home screen. I tried my best to keep my Twitter account geeky enough that nothing viral or distractive will happen on my timeline unless it teaches me something new or contributes to my career.

Limiting social media activity seems to be the first step toward having a calm and focused mind.

Taking a Break vs Context Switching

We get bored when a task is not challenging, loses its cool factor, or when it takes longer than anticipated. That's when we tend to switch to something more attractive and most likely start seeking for instant gratification. The worse part is the fact that it's an addiction, the more you do it the more your brain demands.

The best approach is to take a break regularly but focusing on the same context until it's finished. Ideally, the tasks should be small enough that we don't need breaks in between, otherwise, Pomodoro can help.

Of course, checking on social media is the worse kind of break. Checking work emails is as bad as social media. You'll find a new quick and appealing task out of an email, you'll switch and it turns out bigger than what it looked it and the same scenario repeats. You need to dedicate some time for checking the emails at an appropriate time where you're ready to switch the context, not as a break.

Best breaks are involving physical activities, especially nowadays that we have to work from home. A quick set of squats, take a quick walk, or even garbing a cup of tea or coffee.

Focused vs Diffuse Thinking

You might have had this experience of getting stuck right when you know you're really close to finishing a task. You'll come up with some ideas and start implementing quick solutions here and there, one after another until you realize you subconsciously changed the design to something worse. It might pass the very short list of requirements you were focused on, however, you probably have sacrificed a lot from other parts.

Don't confuse it with Agile where it happens through a proper feedback loop and in the context of a team. Those laser-focused solutions end up being just a local optimum. The exact same thing happens in neural networks and optimization algorithms known as Local Minima. That actually happens where we're too focused.

We need to be consciously distracted to stay creative and think out of the box. This is a subtle skill and like every other valuable skill needs learning and practicing.

Taking breaks and looking at the problems from a higher level at regular intervals is the best way to avoid local optimums. These regular small breaks also keep your brain aware and creative as long as they're not among those instant gratification breaks like social media.

Tasks vs Projects

Anything that takes more than one action to be completed is not a task. Project, story, or whatever you call it, they have to be broken down to actionable tasks.

Small tasks allow you to switch between different contexts and depth of thinking without getting disrupted. You can think about the big picture after finished a task without losing focus.

If you're using Jira and Kanban, for example, you can simply define sub-tasks under stories. Stories will be high-level enough for non-technical people to understand but sub-tasks are yours. That good feeling of moving a sub-task to one column forward, not only keeps you on track but also allows you to take appropriate breaks and context switch if needed.

Communication Channels

We all have already been using instant messaging apps at work. Now more than any time in human history due to COVID-19.

You can simply close it or disable the notifications when you're in focus mode but sometimes, especially nowadays, you need to be reachable if something goes wrong. Particularly, in a small and fast-paced environment, you might be needed urgently for a blocking issue.

The reality is we're supposed to be focused the whole time at work and we need to reduce the distractions as much as possible. Since everyone's responsibility to reduce the distractions we have implemented a simple rule to allow two levels of availability. When we need to be focused at a deeper level and probably for a long time, we simply change the Slack status to "Focus mode, call me on WhatsApp if urgent" so everyone knows we're in a slightly deeper focus mode so they need to think twice before reaching out. More importantly, we keep another less noisy channel open. This channel can be anything as long as it's not muted yet we receive fewer distractions from, such as phone, SMS, etc.

Different communication channels should be used based on time constraints and priorities. Not everything needs to go through an instant messaging app. Another great channel is email. Email is the best for anything that's not real-time or needs more context and offline analysis.

The good thing about email is that you have to put slightly extra time and effort so that it provides a deeper level of knowledge about the context. It is worth it particularly when we need to solve an issue or design an element at a fundamental level with the highest quality.


To make it easier to focus and have a calmer:

  • Minimize your social media usage
  • Take regular healthy breaks
  • Switch between focused and diffuse thinking mode when you need to be creative
  • Break down tasks to smaller actionable ones
  • Use different communication channels and define how and when to use each within your team