views:

728

answers:

11

When programming how often should I take a break? How long should that break be? What should I do and avoid doing during that time?

+3  A: 

While that depends on the individual person, a sure sign that you should take possibly 10 to 15 minutes break is when you start messing up the most simplest thing. After writing

strng mySring = Myfuntion{smeParam);

for the fifth time, that should raise a flag signalizing that giving your eyes and hands some rest is approproate :-)

In Video Game Manuals, the recommendation is 15 Minutes for every hour played, but I think it is for legal reasons as well, but I actually would recommend 10-15 Minutes every 2 hours, depending if you are "in the Zone" or not.

Michael Stum
+22  A: 
  • Try not to work for longer than 40 minute blocks. 5 min breaks every 40 sounds reasonable.
  • Do not sit in front of your computer. Stand up! Walk around. Stretch.
  • Do not look at a monitor or read books during breaks.
  • Chit-chat with the guys/gals at the coffee machine.

Should suffice.

Ishmaeel
+4  A: 

To reduce eye strain it is often suggested that you should look away from your screen every fifteen minutes and to focus your eyes on something in the distance.

David
+3  A: 

I try and get 10-15 minutes every 2 hours. Definitely stand up and wander around. If you aren't too far from a door I'd highly recommend stepping outside and having a quick wander. Fresh air, sunshine and a stretch every couple of hours is a great way to keep stress levels down.

Wolfbyte
+7  A: 

Along the lines of Michael Stum's answer, I always make my self stop after I start a couple OO Perl subroutines with

my $self = shit;

Typos are bad enough, but when my subconscious starts hating on me it's time to stretch my legs =).

jj33
+2  A: 

I'm going to go with a very touchy-feely answer and say "the first time you lose focus". Hopefully, if you don't completely hate your job, you can slip into a nice focused state of coding after working for a bit. I generally go for a short walk, drink some coffee, or check my e-mail whenever something happens to snap me out of that state. If it's a good day, it'll be an hour or two between interruptions like that.

C Hogg
A: 

I find myself so passionate with what I'm working on, I usually don't even take lunch breaks, and often stay up later than is healthy. When working in groups, I take breaks once every 45 minutes, but this is no fixed rule, we take breaks on as-needed bases.

wvdschel
+1  A: 

I have a general rule - when I reach for my coffee cup to find I emptied it five minutes ago, or worse that it's stone cold, I've been working for too long :)

Ross
Whahaha, that's SO me!
Jrgns
*looks at his cup of cold coffee* Dang.
Lieutenant Frost
Then it is time to ask your colleague to fill it up
Petteri Hietavirta
A: 

Some great suggestions here, but it can be particularly hard when you work from home. Too many times I've found myself coming out of "The Zone" to find it's gone dark!

Now I'm in a shared office it's easier - one of my colleagues even has an app installed that prompts him to take a break...

James Marshall
+2  A: 

I try to take a break and strech my legs at least once per hour. Somtimes productivity/stress keeps me working way longer, that's when I fire up this tool: workrave

It is a linux (gnome/kde) Desktop app, and remembers you to take mini and large breaks every so and minutes. It monitors your activity on the keyboard/mouse, so when you take a break for coffee yourself it is counted as a break.

It was devlopedto help RSI people, but I find it works very good for me.

HuibertGill
A: 

Ask your wife to sms you every half hour ... then you will have ur break

Dapeng