“For me this is the most critical part. It's not enough just not to be interrupted. I have to feel like I couldn't be interrupted.
That's the great thing about programming at night. If everyone else is asleep (except other people who don't want to be interrupted) they won't even think of interrupting you.”
Most of the time, I love to talk and interact with people. Everyone has a story to tell and networking rarely hurts. As a current freelancer, it's fascinating to hear people say, "I need X. How can we make this happen?" My mind instantly fills with a wide variety of solutions, which are then filtered down to the best possible few. Then we talk back and forth and determine what is best for the both of us.
Now we get to the point of actually coding. I appreciate solitude when it comes to this. I need some time to get in the 'zone.' I need time to fix errors to create a great product. I ultimately need uninterrupted time to enter the world of brackets (I'm an iOS guy - you guessed it!) to create something that people will enjoy.
After this entire process is over, something new has been conceived and I get to continue to do what I love. It is the best job I could have for myself right now.
But oftentimes programming evolves from staying up late while still in grade school, hacking or gaming or what have you into the wee hours of the morning. At least, that's the pattern that I and many fellow developers I know follow.
Most people I know get more done when they aren't interrupted
If I could function better late at night, I'd switch my schedule in a heartbeat.
I get foggy and uninspired after 11pm, but in the morning I can fix the world.
The other factor is when you are supporting a deployed application, you will receive bug reports that require "urgent" attention so end up working late to identify it and either resolve it or detail a workaround until a permanent solution can be found.
Also there is an expectation that IT people will keep up with advances in technology, so many of us spend time at night researching and testing stuff out to keep abreast.