How to Maintain Focus at Work for Software Developers

Focus Comic by MonkeyUser

Human brain evolution was critical for our species survival. Whether was it to find food or avoid predators, we are wired to respond fast to sudden changes and interact with them.

Despite it helping us to survive, it’s a source of mental exhaustion in the 21st century where there are unlimited sources of notifications and alerts surrounding us.

This noise makes our willpower debilitate very fast and it becomes hard to do our job efficiently and effectively during the workday.

And for us, software developers, it’s much harder. We have to jump between, meetings, ad-hoc calls, emails, and our main task which is coding.

With all of these distractions, we will try to abstract some processes to lower the effect of these distractions and to live with them as they will not disappear any time soon since it’s part of our job description.

Lifestyle Changes

Photo by Kelly Sikkema on Unsplash

We all know that good well-being leads to a good functioning brain which means a higher ability to focus.

There are three aspects that you must make sure are balanced:
Sports, Nutrition, and Sleep.

Sports

You can go for a walk during lunch breaks. You move your body and get some sweet vitamin D. Another option which I personally do is to buy home-cycling equipment and do sport during lunch breaks. You will get your body moving and circulate your blood.

Nutrition

Make sure you have a good diet for your body type and genetics. Of course, I am not a dietitian in any way but for me at least having a full bottle of water next to me and avoiding sugar and sweets.

Sleep

I can’t stress how critical a good enough sleep is for a human being. What has worked for me, is having a sleeping ritual consisting of a quick TV show, brushing my teeth, and then winding down with some Headspace sounds. Also, I make sure that my bedroom has the right temperature for myself; I have a thermometer and I have narrowed down the right temperature for my body.

Golden 2-Hours

Photo by Nathan Dumlao on Unsplash

You might have heard about the idea of batching work to get as many tasks done as possible with a more sharp focus.

For us, the most focus-heavy task is coding. Every day, I must have a 2-hour time slot where I snooze all notifications, silence my phone, set Spotify to a nice playlist, and start coding!

I was able to find the sweetest spot for me which was from 7–9 in the morning. Everyone is sleeping, there are potentially way fewer Slack messages if none.

It will be different from one person to another, you will need to experiment with what works for your focus and work schedule. If you have 2 hours after lunch, you can coordinate with your team that your response to messages will be slow.

Ad-hoc calls and Instant Messages

Photo by Pankaj Patel on Unsplash

Whether it’s Slack or Google Hangouts, the problem is the same which is consistent random interruptions that throw the mind further away.

Many people depend on our responses and help during work time like other coworkers, designers, product managers, and so on.

Besides snoozing the notifications during your golden 2-hours, there are other tips to help you still be productive the next 6 hours.

First, divide your 6-hours into 12 Pomodoro cycles of 25+5 minutes each and dedicate these 5 minutes to answer non-urgent messages. Urgent messages of course do it immediately but the reset either do it in these 5 minutes or dedicate a complete 25 minutes to help.

You might get a pressuring feeling to answer immediately, but remember that when you leave the task at hand and return back you will waste more time trying to remember what were you doing.

Work with Intention

Photo by Kelly Sikkema on Unsplash

Before you start your workday, always make a list of 3 main tasks you need to finish by the end of the day. They can be either meeting preparations, coding tasks, interviews, ..etc.

Although you might think three is not enough, there are two reasons: when you finish them you feel good about yourself and increase your confidence and secondly, it sets a direction for the day and does not just keep wandering all day trying to find something to do.

Also, plan how you are going to finish them and if there are any blockers. Like if it’s a task that needs testing or you have more questions about it.

Discipline Yourself

Photo by John Schnobrich on Unsplash

Discipline is the ability to do the required tasks regardless of how your mood to reach an ultimate goal.

All of the above advice will become worthless if you never try to discipline yourself to get at least 1% better every day towards the goal of becoming a more productive developer who is also enjoying a healthy work-life balance.

The easiest way to start discipline is to set a few KPIs and start tracking them. You can use online tools like Habitica or just some pen n’ paper to track your progress and what makes you more focused and what makes you get distracted and note them.

You can put now the first items on this list:

  • 2 hours focus work
  • Drink a full bottle of water
  • Do quick sports during lunch break

Final Thought

Photo by Pierre Châtel-Innocenti on Unsplash

The process I am using at the moment has taken almost 3 years to build and didn’t come up in one day (Rome wasn’t built in a day!)

My single piece of advice is to make small changes every day. Just get better by 1% every day, it will accumulate in the end.

Start with small lifestyle changes like having a 7-minute exercise and find the golden 2-hours as a start and build on it.

Hope you enjoyed this article and it has added value to you!

Find me on: Twitter, YouTube, LinkedIn, Instagram, and GitHub

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abdu Tawfik

Abdu Tawfik

109 Followers

Web Application Developer. Knowledge hungry always learning. Aspiring to become a Web Unicorn. Find me @abduvik on social platforms.