Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've noticed that while I'm programming, I divide my work into tasks and until a task is complete I cannot stop, even if it takes hours.

However, once that task is complete, I find it very hard to move onto the next task. I feel the urge to spend some time having a break, surfing the web, etc, and before you know it the rest of the work day has gone by. Sometimes if it only took 1-2 hours to complete a task, this still happens.

Has anyone else experienced this? How do you deal with this so you stay in the zone till all your tasks for the day are done?

share|improve this question
5  
I'm glad I'm not the only one... –  Rachel Mar 31 '11 at 19:16
3  
I'm doing this right now. –  Steve Tjoa Apr 1 '11 at 3:43

7 Answers 7

up vote 4 down vote accepted

I feel this too, but I would advise against leaving out the break completely. You really should take a moment to regenerate your mind and body. However not by immersing yourself into websurfing - after so long of mindwork stand up, go outside of building -if possible- to get a fresh air, stretch a bit, drink, maybe a light run to clear your mind AND to speed up your blood circulation -> more energy for brain etc.

In my opinion after this your urge to do nothing should really be reduced.

And maybe think about the fact that the other employees are working too so you shouldn't stay behind :)

share|improve this answer

To be perfectly honest I think you're more productive if you take that break between tasks. At least for me, I find I can focus much better and am more productive after I've taken a short break or time surfing.

You just have to constrain it some, so you don't spend the whole afternoon distracted or the majority of time "between tasks".

Much, of course, depends on the size of the tasks - after short tasks I have neither urge nor need to take some time out.

share|improve this answer

Take a short break. 15-20 minutes, do something else. I often go to StackOverflow and give back - answer questions. Or I read blogs, or download a new tool to try out and play in my programming sandbox (always have a sandbox application you can play with when you are inspired or want to try something out).

The key is to focus on something not related to your tasks, but something that can still be related to your career and being productive in the long run. Do a code review on something a fellow employee checked into source control; go through your own check in comments to make sure the code you checked in days or weeks ago still makes sense; spend 15 minutes reading about something you haven't done with your language yet, a new language feature or whatever.

Then, get back to the next task :-)

Oh, and if you're like me, play a little guitar for 15 minutes :-) Having your own office or being able to telecommute has its advantages :-)

share|improve this answer
    
what kind of programming sandbox do you mean? –  Click Upvote Mar 31 '11 at 19:14
    
The sandbox idea is excellent. I usually have at least three sandbox applications (web, Windows, commmand-line) where I work through different ideas. This also helps me ensure any concrete solutions I come up with are well encapsulated. –  JeremyDWill Mar 31 '11 at 19:19
    
Same with me Jeremy. I am doing a lot of Silverlight now, so there's always a Silverlight Sandbox, a WPF Sandbox, and then a command-line sandbox. –  Chris Holmes Mar 31 '11 at 19:27
1  
@Click Upvote Just an application that doesn't have a specific purpose, so you can try stuff out. A proverbial "sandbox". Example: Suppose your language of choice is C# .Net and you want to know how a Duplex WCF Service works; you can use your sandbox to code an actual, working solution with some really simple data. When you learn how that tech works, you can either save that sandbox under a specific name (Like WCFDuplexSandbox) or you can just nuke the sandbox and start over. It's a playground for programmers :-) –  Chris Holmes Mar 31 '11 at 19:29
    
lol I have a sandbox Folder that has ton's of projects, everything from Haskell to C++/Assembly. Literally when I need to play with code that's where I stuff it. –  Darknight Mar 31 '11 at 20:16

Yeah that happens to me. I try to force myself to start the next task even though I don't feel completely focused at the moment. But by doing so hopefully I come across some interesting aspect of the problem at hand that brings me back into the zone and if not then I go back to browsing the web or whatever but with that entry in my head and an easier way back to in it.

share|improve this answer

I take a walk, like others have suggested, but spend the first half in "wind down" mode, forcing myself not to think about programming at all, and the second half in "wind up" mode, starting to think about my next task.

Without a computer in front of you, it keeps you from feeling you have to devote your entire brain to it all at once, but by the time you get back, you have enough things in your head that you feel compelled to record them before they are lost, and it's easy to jump straight in.

This can be generalized to any meditation technique if you don't have time for a walk. Force yourself to empty your mind, then when you have achieved it, turn your attention but not your body on your next task, then begin the physical work.

share|improve this answer

I know exactly what you mean my friend. It happens not only to me but everyone else I work with.

Me personally, I just talk to my boss when I experience this. He ALWAYS knows what to tell me to keep me motivated :)

share|improve this answer
1  
wish everyone had a boss like yours –  Click Upvote Mar 31 '11 at 19:15
1  
hahaha, it was ironical –  Bojan Skrchevski Mar 31 '11 at 19:17
1  
"Do you want to get paid this week?" –  Paulo Pinto Mar 31 '11 at 21:34

My strategy for combating this exact problem is to do two things:

  • I get everything ready for the next task before I take a break - and I mean everything except for actually starting. I look at my to-do list and make sure I know exactly what my first step will be, review relevant notes/e-mails, open my IDE and check out current files - whatever I need to do so that when I get back I can sit down and immediately start. Half the time I find myself "accidentally" starting anyway, and the rest of the time at least my brain is primed to start working subconsciously while I'm goofing off.

  • Taking it from the other side of things, I constrain each break by defining what I'll do during it. Physical activity is easy for this: I'll walk around the building, to the coffeeshop and back, etc. On the computer, it's often more like: read all the new stories on an particular news site, read my e-mail folder of newsletters, figure out a particular problem in a "fun" program, check new stuff on one social networking site. I've taken it so far as to start the day with a "to-do" list and a "to-do on breaks" list, which makes it easier to turn breaks into (very semi-) productive time.

Obviously it's hard for everyone - there's no way being on programmers is on any form of to-do list for me right now - but the overall idea is to make the mental barrier to getting back to work as low as possible, and to make your break activities as intentional as possible, so that it's easier to pull yourself out of goofing-off mode ... or even to take a satisfying break without ever getting into that mode in the first place.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.