your daily code for breakfast

10 ways to stay focused

“I really want to learn more and I love coding, but I’m having trouble concentrating.  Do you have any advice?”. 


I’m receiving a lot of questions like the one above and there’s one thing I should mention: yes, I know how you feel! Don’t worry, it’s normal. I know there are a lot of distractions when it comes to working on your computer, the internet is always there. Keeping yourself focused can be hard sometimes, especially when you’re a programmer (or an author, a designer, a blogger…actually this applies to everyone spending a lot of time working in front of their PC).  To help you out:

I’d like to share these 10 ways to stay focused (and to become more productive).

1. Get rid of distractions
2. Turn your phone off
3. Take regular breaks
4. Find the right music
5. Learn how to focus
6. Find your purpose
7. Set realistic goals
8. Have an organized workspace
9. Find peers
10.Complete one task at a time


1. Be about actions, not distractions. 

Make your computer “distraction-free”. Start with closing all the software on your computer that you don’t need for your work or for your project. For example: close your e-mail, messenger and your browser. If you don’t need WiFi or internet, turn it off. Clean your desktop and delete (or move) files you don’t need. Another thing that could help, is to change your wallpaper into something clean and simple. The less distracting, the better.

In my case I always need the internet and it’s actually not enough for me to *just* close the tabs I don’t need. Chances are high that I’ll reopen them as soon as I can. Fortunately, there is a solution for those who are like me and don’t trust themselves with this, it’s the magic of internet-blocking software! I often use SelfControl, this is an app for Max OS X that blocks distracting websites, mail servers, or anything else on the internet, for a certain amount of time. Best part for me: you can’t turn it off. You have to wait until the timer runs out. If you don’t have a Mac, you can use a similar app for Windows called Freedom.

2. Sometimes you just need to turn your phone off.

Another major distraction can be your phone. Leaving your phone next to you computer can constantly have your attention drawn away from your code or blog.  If possible, leave your phone in another room, out of reach. If you have a job that requires constant access to your phone, you could turn on ‘Do Not Disturb‘ on iPhone or download a ‘Do Not Disturb app for android (or other).  If you add the number of your office to a ‘white-list’, these calls will come trough. While all of the others won’t.  Most of the time, I just use ‘Airplane mode’ so nothing can distract me.

Tip: If you own a Macbook, you could also use the ‘Do Not Disturb‘ feature to turn of any iMessage notifications on your Mac.

3. Take regular breaks: the Pomodoro technique. 

Breaks are important. There’s a time management technique you can use, it’s called Pomodoro. This method is developed in the late 1980s and it uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks (3-4 min). These intervals are called pomodoros. After four pomodoros you can take a longe break (15 – 30 min) and start again. The method is based on the idea that frequent breaks can improve mental agility. I frequently use the app ‘Tomato Ticker‘ on my Mac, but you could also use a stopwatch or timer. Of course it’s possible that this technique isn’t working for you. This is a matter of personal preference. Still, don’t work for hours straight, but take some breaks. Frequent breaks keep your mind fresh and focused.

4. Good music calms your soul.

Find the right music. This is something I find very helpful. When I was younger and I had to study for my exams, I couldn’t listen to music, it was way too distracting. But I recently discovered that music without lyrics really helps my productivity. This is a matter of taste, of course. I find that music with lyrics distract me from writing, mostly because English isn’t my first language. So writing in English and listening to songs in English at the same time can be confusing for me. So I organize my music library accordingly. At the moment, I love listening to playlists like Piano Classics, Meditation Music or Relaxing Techno (I know, who knew Techno could be relaxing!  ;))

5. Learn how to focus and how to avoid distractions.

Concentrate your mind on a single thing and don’t let anything distract you. Of course, this sounds way easier than it really is. Meditation is something that could help you accomplish this. Daily meditation relieves stress, frees your mind on distracting thoughts and helps you to stay relaxed. For this, I use an app called Buddhify. This app has over 80 guided meditations for wherever you are and whatever you’re doing, like working or going to sleep. It’s been a great help for me so far.

Of course it’s possible that meditation is not your thing. If so, there are other alternatives. You can check out these ‘6  Alternatives To Meditation For Those Who Can’t Stand It‘.

6. Find your purpose 

In case of learning how to code, think of an end goal. Why are you learning to code? What do you want to be? Keep that in mind and it will keep you motivated and focused. Part of the reason we lose focus is because we can’t see the point of whatever task we have to get done and would rather be doing something else. Write down your dream, reward or end goal and put it on your wall or somewhere where you can see it often. I find this very motivating and it helps me to stay focused.

7. Be patient and be aware of unrealistic expectations.

When you have a bigger goal set, please keep in mind that it takes time to get there. Often when we look at a project before actually starting it, we’re overflowing with good intentions. The biggest barriers to productivity are unrealistic expectations. Make a list of one or two goals you want to accomplish. It’s okay to have great expectations, but be realistic about them.  Check your goals once in a while and decide if you’re on the right track to accomplish them.  If not, adjust your goals. Don’t be overwhelmed by your tasks and please avoid things you ‘have to do’ in any way. I prefer to have things that I want to accomplish. The fact that I want to accomplish something is more rewarding for me then telling myself that I have to (although this could be different for you).


8. Clean your desk or workspace.

 This one is probably obvious, but it’s important to keep an organized space. A clean place can help you focus and get your work done with much more concentration. It’s the same as with your desktop: remove everything that you don’t need, isn’t relevant or that distracts you from your desk. Leave only things that help you with your project or task. If you do this every day, you’ll get used to having an organized workspace and it will take you less and less time to clean up.

9. Find peers. 

People with similar goals can help you to stay focused. You can motivate and support each other, help each other and remind each other about the goals you want to achieve. You are not alone.

10. No multi-tasking!

There’s no such thing as multi-tasking.  You may think that you can accomplish a variety of tasks at once, but that’s not the case. When we try to focus on multiple tasks or thoughts, it becomes difficult to regain focus and remember where we left off in each of those tasks. It confuses your brain and slows you down, and therefor making you less productive. If I try to multi-task when it comes to this blog, I tend to leave all of my tasks for 80% completed.. In this case: mini-goals are your friend, make sure that you complete one task at a time. There are some app that can help you with sticking to one task, like OneTask.


If you know better ways or have something to add, please share your experience :-)