How to focus as a programmer?

How developer can improve everyday work?

In times of full connections and online life, we have a problem staying focused. We need to focus, to feel the flow. One of the most important feelings in our work time. Flow is the mental state in which we do some activity fully immersed and engaged in the process of the activity. It’s a very positive and energized feeling, which brings us a lot of satisfaction. But how can we have flow in a world full of distractions? Now, since a lot of us work from home, the situation can be even more challenging. This time, I would like to share with you some of my tips, which help me to stay focus and experience more flow.

How to stay focus? - Seven tips

1. A sheet of paper and pen

My main goal is to focus on current work. Everything else is a distraction and needs to be eliminated. If something pops up in my head like a shopping list, a new idea for dinner, or the next step in my current task, I move it to a sheet of paper. I don’t want to have all of these things in my head. When I have a clean mind, I can focus on what I’m doing right now. It’s just pure focus, nothing else.

2. Turn off the phone

The next big distraction, after my head, is my phone. I turn off WiFi, notifications, and phone sounds. I also put the phone with the screen facing the table. You can also use Airplane Mode if you like. I have my phone next to me, but it will not distract me. The phone should serve me, not the other way around.

3. Emails only at certain times

The best time for me to check emails is around noon. I’m after the first focus/flow session, so I already did something important in a day, and now I need a short break. Checking emails is a very simple task, so it does the job. It’s a kind of rest for my brain before the next focus session.

I set up my mail software to check emails every few hours. It prevents email notification to come in a regular basis. I get them only at a specific time. No distractions here as well. When I did my email break, I use the Inbox Zero rule.

Inbox Zero

It’s conscious of cleaning up your mailbox. We can say it’s similar to the real letter-box. You go out for your letters probably one a day. You take all of them and do some actions. Spam goes to the trash, invoices are scheduled to pay, and letters you read. The same goes for your mailbox. You go through all your emails and ask your self:

  • Do I need that information to keep? Do I need to remember it? - If yes, move it to your storage categorized by project or topic. If no, delete it.
  • Do I need some actions? - Mark a specific date in your calendar? Pay a bill? If this is short action you can do it right after reading a mail. If this will take more time, schedule a time for this task in the future.

4. One workspace = one application

I use Ubuntu LTS with an Ambiance theme, where I can have multiple workspaces. I have a rule that on each workspace (desktop), I run only one application. It also eliminates some distractions and helps me to focus. Right now, I use four workspaces.

  1. My mailbox - Thunderbird
  2. My browser - Google Chrome
  3. My text editor - VS Code
  4. My communicator - Slack

You can ask: OK, but where is your terminal? As a terminal, I use Guake Terminal. It’s a very nice tool, which allows me to use the terminal on any workspace just by clicking the F12 key. There is one more thing I would like to mention in this section. I don’t use multiple screens, just one. I notice that it provides fewer distractions for me.

5. Work triggers

To boost my productivity, I have some kind of mind trick. I call them the work triggers. I create a work atmosphere for myself. It’s what I do:

  • I have one specific workplace. I use it only for work. No food or entertainment there. Just separate space for work.
  • Headphones When I want to focus, I take my headphones. I don’t listen to music, but this is a sign for me and my team that I need to focus. I turn on music only when there are some noises outside, which distracts me.
  • Specific browser In most cases, I use two browsers. One is for work (Google Chrome). I open there only websites related to my current work, nothing else. It helps me to go into the focus zone. The second browser I use for fun (Chromium). I watch over there YouTube videos, use social media, do whatever I want for my relaxation and entertainment. This small trick is enough for me to keep focus when there is a time to focus and permitted me to relax when there is the right time for that. I don’t need special apps for blocking access to social media and so on.

6. Remove distractions

The most important thing to allow yourself to have a flow is removing distractions. Loud music, hanger, physiological needs, too bright light, everything that don’t allow you to focus should be eliminated. Of course, there are some cases, when you don’t influence external conditions, like renovation at the neighbors. Just try to take care of what you have under control.

7. Rules

Rules are something that helps me a lot when it comes to creating a space for efficiency. I recommend you create your own rules. They need to meet your needs. Below you have my rules:

  • I start from the most important task for the day.
  • I start my workday as soon as I can. The best time for me is 7 am.
  • I clean my workspace during the day. I remove not-needed papers, books, and so on. I check my notes, and I clean them up. I close unused tabs in the text editor or browser. The most important tabs are for me: time tracker, remote repository, tasks board, bug tracker, and CI.
  • I split my text editor into two vertical parts. One is for code, one for tests.
  • I try to don’t switch context too often. One task at one time. I try to group similar tasks. I also try to not switch between mouse and keyboard. Keyboard shortcuts in a text editor like VSCode are very helpful for that.
  • I don’t check my mailbox till noon.
  • 5 minutes rule. If something took less than 5 minutes to do, it is better to do that immediately. It can be put a meeting into a calendar, set up a new task for tomorrow, or just grab a snack.
  • After I finish my work, I create a list of tasks for the next day. So I decide the day before what is the most important in next day. It’s very useful. When I start my work in the morning the next day, I don’t need to decide what I should do. I already know that.
  • I log in to Facebook once a week. (In most cases, it’s Wednesday)
  • I use Instagram once a day.

Last but not least. There will be some days that even I did everything from that list, it’s still hard to focus. That’s fine. I give myself space for that. I do less important tasks. But I know because I give myself time, that the next day will be better. I will have more energy to focus.

Do you have more tips related to improving the way you focus? Please share them in the comments below. Let’s create a big list of tips and tricks about efficiency, not only in work.