5 Tips to get the most out of your coding time
- 11
- Add a Comment
Welcome Back! I hope you enjoy the content on this site. If you have not done so already, you may want to subscribe to my RSS feed or become a fan of this blog on Facebook. Thanks for visiting!
I remember seeing an add from Microsoft I believe for hiring programmers and the jist of it was “We give you an office with a door”.

Why you might wonder?
Well, it might take up to 20 minutes to refocus on the task at hand after you get distracted either by a phone call, by a coworker barging in or by a video someone posted on Facebook.
I will give you an example of a spiral I used to find myself in. I will be happily hacking at this new feature that we need to ship soon and an email notification shows up for an email that I was cc’ed in so I open the email read it and can’t remember what it was about so I end up reading the whole thread just to remember. Then I switch to my browser to see if there is anything new in my RSS reader, oh wonder if someone sent me something on Facebook. Off to Facebook I go.
An hour later I am back to visual studio and completely lost the thread to what I was doing. And that’s when bad stuff happens, bugs introduced and things get forgotten.
These are a few tips I use now to keep me focused and get the most out of my work hours.
1. Close your internet browser
As hard as it might seem, learn to open your browser only if you need it to research something related to the task you are doing.
What I like to do is to dedicate a couple hours before I start coding to research the references I need. So that when I get started it’s only coding and nothing else.
Try it for a week and see how much stuff you get done.
2. Close your mail client / instant messenger
Don’t worry, if something really urgent happens you would know about it. You don’t need to keep your mail client open at all times, and read each email as it arrives.
Think of how many emails you are CC’ed in just for the sake of it and to which you have no say in. And think of how many hours you waste opening those emails and getting distracted by them and having to refocus on what you were doing before.
Set specific times at which you read your emails. I find just before my lunch break and at the end of the day the best time. I find emails a good way to unwind :). I also end up writing better quality emails instead of the quickly I have to get back to what I was doing mess I used to send to clients.
If you don’t want to close just turn off the notification sounds and status bar alerts.
3. Unhook your phone (or put it in silent mode)
This follows on the no email theory. I ask all our clients that if something is really urgent to send me an SMS. They almost never do so I let the calls go to voice mail and I can check it later.
This tip is also good for keeping your clients happy and show your professionalism, you wonder how? Well when they leave a voice mail your already know what they want to talk about when you call them back. Say the leave the following message:
Hey Hatim, I wanted to know what’s the status of feature N° 156 and if we are still on for the system update schedule by the end of the week.
What you can do is go find out what the status of that feature, check with your team that everything is good and ready to go for the system update.
The phone conversation will take less time as you won’t have to stall them and scramble while you open your tracking application or IM the person responsible for the feature or your team to see what’s going on.
4. Buy good noise canceling headphones

I have a pair of Bose® QuietComfort® 3 Acoustic Noise Cancelling® Headphones. These are great for listening to music and also shields you from all the distractions. Coworkers talking in the hallway, the guy talking loud on his phone, … . They also work I just put them on without anything playing.
A nice plus is that they have great sound quality!
Of course you don’t have to use noise canceling heaphones they are just nice to have, regular headphones will do too, specially with some loud music!!
5. Make small and regular breaks
When I am coding I like to have a 5 to 10 minutes break each hour and a half to 2 hours. I either go get a coffee, talk to a coworker, check voice mail, walk in the hallway. The idea is when I get away from my screen I can have a better spatial thinking and find new ideas or solutions more easily.
It’s also revigorating and gives you a mental boost when you are working.
Oh I can finish this new screen and have my break.
A great book on how to manage time is Tim Ferris’s “The 4 Hour Work Week” you can get it for free as an audio book if you sign up for a free audible trial or if you prefer you can get the dead tree version.
I hope this was helpful and would to would love to hear if you have any tricks and stratagems to keep your self focused.
Hatim
11 Comments
Jack
March 12th, 2010
at 6:07am
I think following your point 1 and 2, we do will have double coding times:)
Joachim
March 12th, 2010
at 8:53am
Yepp, good list, but - dont’t mind, nothing new.
Ever since the key factor to become productive is FOCUS.
Every distraction is simpy bad.
And that’s where your list comes in
Concerning breaks, there is an very interesting book by the scientist Ernest Rossi dealing with mental capabilities and breaks (’The 20 Minute Break’, 1991).
He found out by solid research that to keep fresh best thing is to stop after 90 minutes and have a 20 minutes break. In his view that break should be filled with doing nothing to give your body and brain the most effective recovering time. A 90 minutes session is according to the natural bio-rythym.
What I think is really astonishing is that the companies, really don’t accept these simple facts, e.g. breaks are nearly always looked at something evel and communication on all channels is good - despite the distraction it brings.
Have a nice time !
Hatim
March 12th, 2010
at 11:07am
So true Joachim!!
In our company you can leave and come in when you want. Take as long of a break as you would like. We value the people that we work with and we want them to feel comfortable and not stressed at all times or tired. And guess what, it shows in the productivity of the team.
The hard thing I find is telling people that you are busy and that you can’t talk to them when they come into your office. But I am working on it
Justin
March 12th, 2010
at 12:56pm
I like your ideas. I wish I could close my email and shut off my phone. Sadly, I have to take emails and phone calls because I handle other ares of our small business like email, domains, internal software, and some support on the software I write.
It can be very distracting.
Dew Drop – March 12, 2010 | Alvin Ashcraft's Morning Dew
March 12th, 2010
at 1:43pm
[...] 5 Tips to get the most out of your coding time (Hatim Rih) [...]
Praveen
March 12th, 2010
at 9:00pm
Great list. My biggest distraction is feeds (which is why I’m here :D) but I do try to dedicate chunks of time during the day to things like blogs, FB, Twitter whenever I feel like taking a break. At the same time, I do agree to Joachim; a real break is when you’re mind is occupied with nothing.
Hatim
March 12th, 2010
at 9:42pm
Thanks Praveen, Google Reader is the first tab I open when I start my browser as well. So make sure you add my feed to your RSS
ESN
March 14th, 2010
at 9:16am
How true. I am with Praveen; my biggest distraction is also feeds aka google reader.
Husain Al-Khamis
March 14th, 2010
at 7:55pm
One word –> Wonderful!
Well, it is my little break
Great tips Hatim.
But I broke Tip#1. I just stopped coding to post my comment here
Hatim
March 15th, 2010
at 6:24pm
Hey Husain,
But it’s this blog only hehe
Reading this blog doesn’t count as a waste of time
Doug Rathbone
March 18th, 2010
at 10:42pm
I like this post.
not because it’s ground breaking or that i’ve never heard of these things.
Simply because now and then i need a reminder