Here in the wee hours of the morning, I seem to accomplish things at 3 times the pace I do during the day, and with fewer bugs to boot. You might think to yourself, "Who cares why? If it works so much better for you, just work at night instead of during the day!". Well if that's you, than you either aren't married or you are and you don't want to stay that way.
Seriously though, I can't be staying up into the middle of the night all the time, and I already have a good 8 hour block every day set aside for development, so I'd really be excited about being able to capture that productivity boost at will. With that in mind, here are a couple of my ideas as to just what makes the night such a great programming environment:
This may be the biggest part of it, honestly. When the sun is down, nobody is calling you, texting you, IM-ing you, or sending you emails (and if they are, you can safely ignore them without offense because, hey, you were in bed, right?). For me, that's a big deal-maker that I've noticed even in my old day job's environment; days when I was left alone for a while were days when I was able to do serious damage to those endless defect lists.
The world slows down
Tell me if this sounds familiar:
"OK, I've got a few things I need
to get done here, but I also
need to be leaving in half an
hour to get to that meeting on time,
so I need to work on something I
can knock-out quick.
When the moon is up, there are no meetings or conference calls, or really anything scheduled in the near future, so you don't have to keep surfacing to check the time. Theoretically, it takes very little effort to look at the clock, but for me (and maybe this is ONLY me) if I'm looking at the clock it means I've momentarily stopped thinking about what I was working on, and even though it's for only a very brief time I've still lost some momentum.
It feels pretty badass
Perhaps not everyone feels this way, but to me there seems to be a sort of "badge of honor" that comes with working on something late into the night. It's something that resonates with other hackers; we like telling stories about how late we were up hacking as much as we do about cracking some bug we were after for 3 days, or about crashing a production application with a bit of untested code, or about losing weeks of work in a hard-drive failure. We can all say "yeah, I've been there", and that makes it a common bond in this psuedo-sub-culture of hackerdom. So maybe I'm more productive at night for the same reason that I can work-out harder and for longer when I'm listening to high-energy music: the attributes of my environment unconciously cause me to more closely conform to a strong personal narrative.
Extracting the essence
So based on my possible reasons above, here are some ways you could recapture some of that midnight-power for the daylight hours.
1. Minimize interruptions during hacking time. Maybe even turn off your cell phone and close your email client, it'll all still be there when you resurface.
2. Keeping up to date with industry news is important, but probably not as important as actually contributing to the industry. That's right, close the news reader, it too will be around when you are ready to take a break.
3. Find the next thing on your schedule for the day (hopefully a few hours off) and set a timer or an alarm that will go off in time for you to prepare for whatever it is. Hopefully by knowing that the alarm will go off before you need to do anything you'll be able to leave the time management up to the device and focus all your brain-cycles on the task at hand.
4. Not sure about this one. I guess I could say that the more attributes of your environment that remind you of awesome hackerness, the more awesome of a hacker you will be (my english prof would probably cringe at that sentence). Maybe you should grow a beard and take off your shoes? ; )