Never underestimate the power of a good night's sleep

Further to my previous article regarding some practical habits to induce a better sleeping pattern, I'm making this post to help people realize and understand its importance. The trouble is that many of the programming "night creatures" may not even realize what they're missing in life if they haven't had a good night's sleep in a long while.


We humans are wired to feel and be energetic during the day and sleep at night, its a very basic biological pattern that you cannot simply wish away. The problem with "programming zone" is that it gets you too much focused into just one thing, sometimes you even fail to see a solution dancing in front of your eyes because you simply aren't looking there.

Taking breaks in between the zone clearly helps with that. You come back from the break and the solution "sparks" instantly. How many times does it happen that you're fiddling with a module import error in Python for literally hours, only to find later that the error was coming because of an incorrect filename.py you've given which clashes with a built-in module. You didn't realize that because you were looking in the wrong place (source code) whereas the fix was outside that (the file-system).

Using the same logic, just think that maybe there are other things you're missing in life such as having a good night's sleep! We programmers should indulge more and more in this sort of "out-of-box" or "out-of-zone" thinking, only then we'll be able to solve problems in a better way - both technical and non-technical problems.

Why not simply decide one fine day that "today onward, I'll be sleeping at 11:00 PM whatever happens". Whether its a matter of just one function or class to fix or you're awaiting an important email from someone, it doesn't matter. Your client generally understands that you need sleep, I've never met one until today who'll ask you to compromise with your sleeping pattern to complete a deadline.

Another dangerous bane is the social media. People have this habit of posting things on reddit/twitter and then patiently wait for the notifications/comments/upvotes/etc. from unknown netizens. You need to realize that those netizens aren't more important than your health. Its not necessary to check the notifications, right now - they can wait until you come back to the desk tomorrow morning.

Positive things have a great and profound implication on our lives, once you feel that energy and feeling that you can do just about anything, it'll be a great positive reinforcement and you'll make efforts to sleep early from next day also. But the problem with positive things is that they also require some initial effort and will-power, the cost-reward ratio isn't that profitable in the initial stage and many humans are lazy and lethargic creatures!

If you are one of those night owl engineers, I just hope that you'll be able to make those efforts and have those good night sleeps which you so rightly deserve.

Comments