Coding in your sleep.

Pithy words of wisdom, often appear mundane. So I’m going to be quick. The secret of successful coding is sleep.

I recently found myself in the hazardous situation of having too much work booked at the same time. My post-summer holiday bank balance allowed me to become seduced by the dark side. I counted that twilight world after 1:00AM as a friend. In reality the hours between 1:00 AM and 5:30 AM are cruel and the full of mischief. Time becomes distorted, decisions become unreliable. The walls between illusion and reality become a thin and fragile membrane through which errors of judgment can seep. When coding this can be dangerous. Sometimes it results in the odd harmless typo, here and there; easy enough to correct. Sometimes, it can lead to a full fledged haemorrhage.

It strikes me that our culture doesn’t much like sleep. I spent a few minutes trying to find pro-sleep quotations on Google and yet from the greatest minds and thinkers throughout history, it seems that sleep is rarely given the credit it deserves. Most references appear to offer the opinion that the fool / peasant sleeps while the genius works through the night. I remember hearing a labour politician talking admiringly about Tony Blair’s work ethic, indicating how impressed we should all be in the meagre two hours sleep Tony allowed himself when he was Prime Minister. Is this a good thing? Oh the irony, of John Prescott sleeping like a baby during a health debate at the Labour Party conference in 2005.

We all accept that healthy minds and bodies depend on a good night’s sleep and yet how often we feel compelled to push ourselves beyond comfort into late nights and fatigue.

Whether it be a result of capitalism or some kind of “propaganda without portfolio”, the reality is obvious. We cannot think clearly without sleep. Not only does our productivity and efficiency drop to very low levels as the night wears on but we are often robbed of the following day as well.

I almost lost a good client, not because I couldn’t do the work or deliver it on time, but because I was too knackered to programme properly.

So the next time you find yourself burning the midnight oil remember that a lot more than a deadline may be at stake. One all-nighter can ruin a week and if you are unlucky enough like me to have spent a week from hell vainly trying to repair the damage caused by decisions made during such a session, be warned, you may loose a lot more than sleep if you persist in burning the candle at both ends.

Leave a comment

name*

email* (not published)

website