The Biggest Enemy of Focus and Flow
Tags: softwareengineering, productivity, career
Published: 2024-03-14 04:29:50

Bill Gates once said: _Most people overestimate what they can do in one year and underestimate what they can do in ten years._

I like to paraphrase it as _Most developers overestimate what they can do in 10 minutes and underestimate what they can do in 1 hour._

Interruptions are a productivity killer. You can do barely anything in 6 blocks of 10 minutes but do a lot during an uninterrupted 1-hour focus session.

Even minor interruptions can be costly. For instance, when debugging intricate bugs, you need to build and hold a complex state in your head. A simple question from a colleague can destroy it and force you to restart your debugging session from scratch.

Here are the most common sources of interruptions with ideas on how to deal with them

### Notifications

Nowadays, every application wants to grab our attention. Just the basics, like email, text messages, or work chat, send many notifications per hour. It's impossible to stay focused and respond to these notifications. The truth is that most, if not all, of them can wait.

Turn off most notifications on your phone and laptop if you can. For the remaining ones, disable the sound entirely, or at least for the duration of your focus session. Consider leaving your phone in a different room and putting your laptop in the focus mode.

Check your email or work chat between focus sessions. Attend to messages that need to be answered and decide what to do with the remaining ones - likely, almost none will require action.

### Teammates

If you work in the office, your teammates are a blessing but also a curse. While spontaneous brainstorming sessions, ad hoc design discussions, and the ease of receiving help to solve on-call issues are gold, they are also a source of constant distraction.

My first strategy to avoid these distractions is to… hide. I found a nice area in my building a few floors away from my team, which I can use to prevent interruptions. I often go there if I need to finish something important urgently. Occasionally, I work from home to get work done, which I view as an ultimate form of hiding.

Another option is to use noise-cancelling headphones. I don't even play the music - I use the headphones to isolate myself and signal to other team members that I don't want to be interrupted. It is not as effective as hiding, but it works fine most of the time.

### Internet

It is hard to tell what is more difficult: coding with or without the Internet. On the one hand, a significant part of coding is searching the Internet for solutions to more or less trivial problems. On the other hand, it is so easy to fall into the downward spiral of checking "just one more thing."

My way to combat these temptations is to use a dedicated virtual desktop for my coding session. The only programs open on this desktop are my developer tools, such as IDE, terminal, or a simulator, and a dedicated browser window, where I am not allowed to open any website unrelated to what I am working on. (I gave up on a multi-monitor setup long ago when I realized I used the other monitor(s) for things whose only purpose was to distract me, like email). Some people also use programs like Cold Turkey to block the Internet and avoid distractions.

## Ultra focus mode

Long plane trips can trigger the ultra-focus. They definitely do it for me. Because the environment is restricted, there are few chances for interruptions. Ever since I experienced it for the first time, I have been trying to recreate it on the ground. If you have yet to discover it, take the opportunity on your next long flight.