Fog Creek Software
Discussion Board

The importance of rest in productivity...

How important do you find getting a good 8 hours of sleep a night for your productivity?  I've started concientously (I wonder how bad I srewed that word up) tracking this and I've noticed a drammatic effect.  Suprise, suprise, right?

Well while I wasn't suprised by a drop in my ability to think clearly and thus be productive, I was suprised by how sharp the dropoff was.  For example, we all have to do boring sub-tasks in software projects that no one wants to do, even for the really cool projects that you are excited about.  IMO, it's your ability to drag through these menial yet important tasks that have a profound effect on your bottom line productivity (ie, spending all your time on all the cool stuff vs spending time on stuff that needs to get done). 

I find when my mind is tired, my productivity probably falls by orders of magnitude when I'm working on that "fun" string manipulation function, while the drop is much less significant when I'm laying out user interfaces (depending on how tired I am).  Enough babbling from me.  Anyone else thought about deeper connections between rest vs productivity in the programming industry or how hours of sleep per night affect you?

Thursday, February 6, 2003

I notice that I'm productive and my mind spits out the code in a continuous flow of 1's and 0's if the task is something that I am interested in.  I mean sometimes I have to literally pry myself away from the computer.  I really want to see that function or program or whatever I'm on working on work.

OTOH if the task is monotonous and boring, then I tend to take frequent breaks and help co-workers or have a snack or chat about programming or whatever.

If you are referring to sleep... well in the military I was told 'Sleep when dead.'  I don't think that applies here though as I always feel better and am more productive no matter the task when I get a good nights sleep.

Forest Chump
Thursday, February 6, 2003

Well first I only get stressed out if there's too much work. And most time-consuming work can be optimized to a certain reasonable degree. So with those things you can't do a thing about they stay boring and it's hard to stay awake paying attention to repetitive and dumb tasks. I don't think this is a problem with just our industry. All we can do is minimize it to the extent possible and always keep an eye out for improvements.

I personally have periods where I can't concentrate. A little after lunch I get knocked out and it's hard to do even interesting things. I usually give up and take a 15 minute nap break in the sitting position or at least go walk around a bit and come back. I have tried staying at the station despite the "low period" but find it only drags on for two hours without fail. More often than not I really need that 2 hours of clarity to get the day's work done so I opt to take the nap route usually. At first I never knew I could take short naps (when I was a kid I would take naps that last through out the afternoon), but when you have projects waiting and meetings waiting your responsible side of the brain learns to wake your body up after a reasonable period of rest. For me that reasonable period is 12 minutes to 17 minutes. I still use a watch or tiny clock just in case.

Regarding naps: In general Americans and Canadians don't have a habit of taking work naps, or hide it out of shame--the Europeans and the Asians companies recognizes the importance of naps and actually build nap rooms for their customers and employees. For example when I was in Taiwan and visiting Hong Kong last year I find people resting with those airline neck pillows during lunch. No noise will wake them at all! They just really needed that short break. All these guys with neck pillows sitting in their chairs sure look funny, but in Asia apparantly its the norm.

I don't take naps everyday, but after a big meal or after a particularly boring day I find it quite refreshing, and the cost of 15 minutes is minimal when it gives me back so much clarity. You never know what your right brain wants to tell you in that 15 minutes! :-D

-- David

Li-fan Chen
Thursday, February 6, 2003

When I don't get enough sleep over an unhealthy length of time it usually results in chronic insomnia. It's usually really hard to cure--not to mention painful or at least very unpleasant.

Napping during the day won't help. According to some sleep experts (I am trying to remember this hehe) long naps will make the effects of insomnia somewhat bearable but in the end it will only make it even worst--especially long naps that strives to replace hours of missing sleep.

All of us are working longer hours for less pay so I don't really know if anyone has any tricks to this. How do you guys sleep well with so much over-time and worries about life?

-- David

Li-fan Chen
Thursday, February 6, 2003

I used to be someone who hated going to bed.  I always wanted to stay up late to read, to write, or to watch TV.

I'd stay up until 1 a.m. when I needed to get up at 7 a.m.  Since I wouldn't get to sleep until 1:20 a.m. or so, I would be getting less than 6 hours of sleep.  I can "make it" on that amount of sleep for an indefinite period, but it's not fun.  I wear out in the afternoons, and when I go home I am dead.  All I want to do is sit on the sofa.  (However, even if I am very tired, going to the gym always perks me up.)

Now, I have taken on another part-time job, on top of my 40-hour week as an analyst.  I have started going to bed earlier, getting 8 hours of sleep.

I love it.  I feel much more rested and energetic throughout the day.

Thursday, February 6, 2003

I can corroborate your non-scientific findings with my own self-actualizing observations.

If I occasionally (1 or 2 consecutive days) drop below or deviate from my normal average pattern of 7 hours of sleep between 12am to 7am then I am ok; independent of the type of work details I’m doing.

However, if I start to get less then 6 hours of continuous sleep night-after-night or even if I start deviating from my regular sleep time-zone (between 11pm and 8am) then my concentration, work-quality, work-interest, and more importantly general mood starts to degrade dramatically. 

The observation that I find most interesting is that my overall mood _seems_ to be a significant factor over every other observed independent variable.  My overall _like_ or _dislike_ for the domain of work also _appears_

Being married to a clinical-psychologist does appear to influence the observation-feed-back-loop that makes a difference on what I tend to observe.  Or could it just be that I’m deluding myself with all the cool-psycho-babble-info written in the DSM-IV???

I better stop here otherwise I might create a self-actualized paradox and observer myself out of existence!

Heston Holtmann
Thursday, February 6, 2003


Your post describes me to a tee.  I have the exact same reactions to that pattern, which I guess shouldn't be a huge suprise as I suspect many people do.

What IS a suprise is that basic rest has never been brought up as a contributing factor in productivity of software engineers.  Maybe it's one of those things that's too obvious to be worth mentioning.  I dunno.  I think a study that correlates productivity (however you measure that) to amount of rest in the software industry could yield some interesting answers.  Perhaps part of that order-of-magnitude difference in productivity between OK programmers and so-called super-stars can be explained by something as simple as getting your zzz's? 

This seems like such an obvious thing to me and as far as I know, none of the big honchos like Brooks et. al. have ever mentioned something as simple as this in increasing productivity.

Thursday, February 6, 2003

Rest -- both in terms of sleep, and time away from work, does make a big difference.  If you don't naturally wake up out of bed in the morning (ie you need an alarm clock to wake up), you aren't getting the sleep your body mind and needs.  The alarm clock should only be there as a safety measure -- if you get enough sleep, you'll usually wake up before it goes off.

There are times when I've spent hours beating my brain on something, only to come in the next day and solve it with 2 minutes of thought.  Sleep and time away from work are very important to productivity.

Study after study has shown that you can't get more than 40-45 net productive hours per week from a programmer on a sustained basis.  Progress can be made with 60-80 hour weeks for short bursts like 2-3 weeks, but after that the net productivity tumbles - you make more mistakes and spend time correcting those mistakes, and your ability to come up with simple and elegant solutions is diminished, to the extent that you're netting less than 30 hours.  I am lucky to work for a company that finally realizes this.  In the mid-90s (before I joined them) they had a zillion dollar project that ran for about 3 years with 60-80 hour weeks as a rule.  The code was a mess that took nearly a year to stabilize after its initial release, and they lost many good employees.  Recently they completed another large project, in the same language, with 40 hour weeks most of the time, building more functionality in less time with better quality and fewer people.

T. Norman
Thursday, February 6, 2003

Crimson wrote:

<<What IS a suprise is that basic rest has never been brought up as a contributing factor in productivity of software engineers.  Maybe it's one of those things that's too obvious to be worth mentioning.>>

Actually, one of the tenets of XP is the 40-hour work week. While this doesn't address sleep directly -- they don't mandate 40 hours of sleeping during the work week :-) -- it does place strong importance on being fresh and not burning out.

Chris Winters
Friday, February 7, 2003

Enough about how much sleep a person needs how about how a person needs rest during a week, to recharge. Like the weekend. I've heard some interesting things that say people need at least one day out of seven for pure rest to be most efficient.

Cam Smith
Wednesday, May 26, 2004

*  Recent Topics

*  Fog Creek Home