Programmers love multitasking: Surfing the web while a time-consuming test suite is running. As usual there is a video encoding running too. And some number crunching program which will tell you the question to the answer when it’s done. This is great, right? Who knows, but I just wanted to mention which kind of multitasking I am NOT going to talk about.
Imagine the following: you got your working environment fired up and just encountered a bug. Must be somewhere in the controller logic because - oh, a new follower on Twitter! Let’s see who this is. Two minutes later you are back to work, looking for the right file. Your phone rings, you answer it. Half an hour later you know the latest gossip, got next Sunday evening planned but the bug is still there. And while you were talking you noticed some notifications telling you there’s new mail, so of course you check your inbox. Might be important. Oh, is it lunch already? Yummy, today is pizza day!
Are you sure about that? I know not every morning is wasted like this. But some are and nearly none is without any distraction. Think about it: when is the last time you worked for at least two hours absolutely focused? No RSS, no quick look at Facebook or Twitter, no IM or SMS, not even a glimpse at incoming e-mail. I bet you can’t remember. Computers are filled with all those tiny distraction-factories. Every mail client supports some kind of instant notification. Small red numbers (badges) on application icons scream for attention. And of course all your friends want to know what you are doing once in a while. Bye bye, productivity. Every time you get distracted for a second it takes you minutes to wrap your mind around the current problem again. Programming is a profession of creativity and thought. Focus or lose. Your choice.
Tell you a secret? No, you don’t. Yes, there might be that one e-mail claiming to earn you a million bucks, but you can read it later. It will stay in your inbox patiently, waiting for you to return. Bonus: you might have these annoying e-mails once in a while. Those containing work to do. Problems to solve. When I stopped responding to e-mails immediately, I was surprised to find lots of “never mind, solved it” messages in my inbox regularly. Enforcing disciplined e-mail habits saves time! I will talk about my experiences more in depth in a following article. Reading Twitter only once a day feels wrong. Deeply wrong. I am still struggling to force myself to reach that goal. But to be honest: when you click that funny link in the evening you won’t laugh less just because it has been tweeted a couple of hours ago. Switch off your phone and click the close buttons of the instant messengers. Great. Now there’s a reasonable chance to get some work done!
Oh right, sorry. Surely you can’t combine both. Well, of course you can. My suggestions may seem very drastic but they do work. Your goal should be to have a “focus time” each work day with the least possible distractions. Depending on you this might be in the morning, in the afternoon or at night. I’m currently trying to shut down all distractions for a couple of hours and eliminate the considerably needless ones permanently. There is just no use in checking e-mail more than twice a day. And yes, I do run my IMs for most of a day’s time as there is an apparent benefit - staying in touch with friends :)
To get started you might want to follow Everett Bogue’s advice in his article 7 Simple Ways You Can Disconnect for a weekend. I hope you found this article helpful. For updates subscribe via RSS, mail or follow me on Twitter. And please share your thoughts and experiences in the comments if you like.