Sleeping at work — Yes. Do that.

Development is rarely a clear and repeatable task that fits neatly in a Gantt Chart. It takes us time to work a problem, imagine solutions, test our ideas and cut code. That development pattern is similar to the stages of sleeping.

The best sleep happens during REM sleep and its only 20–25% of a good night sleep. REM sleep starts about 90 minutes after you fall asleep and it lasts from a few minutes up to an hour at a time. Developers are the most productive when they achieve an REM-like state of deep mental focus — let’s call it Rapid Coding Time (RCT). When developers reach RCT, they are in the zone.

Interrupting sleep has serious consequences. Our ability to think clearly is impaired when we are sleep deprived. We have trouble remembering facts, processing information and making decisions. As much as we need REM sleep, developers need RCT. Coding deprivation can be a severe problem. It reduces our ability to think through problems clearly, and it puts a strain on our mental stamina. In fact, it only takes one day of interrupted RCT to wreaks havoc on our mood and energy levels.

We’re playing with power tools, and no one should operate power tools when sleep deprived — think on that.

P.S. Feel free to bother developers after their nap with all the M&M’s you like, (meetings and managers) — because snacks are best after naps.