Put down the keyboard and step away from the computer
Posted by
Brad Wood
Jul 17, 2008 08:30:00 UTC
Research shows that driving while extremely tired renders the same results as driving drunk. Following that same line of though, is coding while sleep deprived the same as writing your code in a drunken stupor?A couple weeks ago I was fiddling around with a SQL color coding script of mine to try and make the performance a bit more presentable before I blogged it. Through half-closed eyes I was pasting in Java StringBuffer's to see if I could rid myself of my endless String.concat() curse. Somewhere between 1 am and 3 am after dozing off repeatedly in my chair I gave up and went to bed. It seemed the code had quit running altogether for some reason.
I open the code back up tonight (I know, it's 1:30 am but I had a nice long nap today!) and instantly spotted my blunder. I was emptying my StringBuffer one line before I used its contents; thus creating an endless loop of doom. Tsk tsk tsk.
The next time you are trying desperately to hold your head up while scraping together some late-night code-- do us all a favor: Put down the keyboard and step away from the computer. It'll make more sense in the morning-- I promise!
Off to bed now before I unwittingly type something really embarrassing.