Sunday, September 23, 2007

Late Night Programming

I've just concluded a session of late night programming. I've gotta say, its one of the best coding experiences I regularly participate in. Its just so awesome to sit down and tackle a problem that can be completed in one night. I'm not always sure it results in the best code (and I try to never submit code that I've done at night until I can get a code review), but the feeling of accomplishment is awesome. Also the amount of work you can do in one go is just incredible. Day to day, I think its difficult to see how much the rest of your job interferes with you actually coding. Rather it be talking with teammates (something I think is strictly a good thing), going to meetings (bad), going to lunch (good), or just being distracted by incoming email (bad and good), my day life is pretty interrupt driven. When you have all these distractions, it can be difficult to really hunker down and get in the zone.

So, sometimes (especially when I'm excited about some project), I just come in on the weekend or late at night. Everything is quiet. There are no emails, no teammates, and no Air Conditioning (they turn it off). Just you and the code (and music, if you're me). For me, it all comes together when you get done and you send your victory email. For me this normally takes the form of a code review request. Once I've decided I'm ready, I switch over to the email client for the first time in many hours, and I get to enumerate what I've been able to accomplish to someone. Its great.

Recently, I've been starting to obsess about these interrupt issues during the day. I've unsubscribed from several high-traffic email lists, and I try to force myself to not even look at the email client more than once every 10-20 minutes. But given what I feel like now, even that is not enough, so sometimes I work at night :).

Working at night can also lead to some bad things. For instance, you don't have the resources you do during the day. You can't ask your CSS master officemate questions, you have to look up answers. While this can make you better (much better) at solving your own problems or working around them (you quickly start ignoring things that touch other teams, for instance), it can waste an enormous amount of time. You sorta have to know when you've ratholled too long, and start thinking about ways of skipping that part of the problem until you can discuss it with others.

I'm not going to stop this behavior anytime soon, though... Its quite a rush.

2 comments:

Anonymous said...

I think this ties into your post regarding arrogance in coders in general. The kind of rush you're describing is allure of programming in distilled form; you get to spend hours in the simple act of creation/solving, and afterward you get to crow (even if only to yourself), "Look at what I have created!"

How can you be any good at this and not get at least a little arrogant?

Ben said...

Adam!!

Yes, I completely agree... Even the name of the "victory email" as I called it is fairly arrogant... And I definitely agree that the sort of man vs. computer warfare (if you will) that programmers engage it is definitely a breeding ground for arrogance in all its forms.