When is the best time of day to write code?

Musicians and vampires usually do their best work after the sun goes down. But does that also apply to programmers?

By  

Musicians, so the stereotype goes, don’t like to get up early. When the Rolling Stones were recording Exile on Main Street at Keith Richards’ house in France, famously, they wouldn’t even begin trying to play until the evening (when Keith got up), then they’d record through the night. When the Beatles were filming the rehearsals for Let it Be, they had to be in the studio early each morning, which didn’t please John Lennon at all. “We’d be there at eight in the morning. You couldn’t make music at eight in the morning,” he later told Rolling Stone.


If Keith Richards wrote code, he wouldn't do it before 8pm

Image credit: REUTERS/Paul Hackett

Naturally, when you think of rock and roll musicians, you think of... programmers. Or at least I did recently, for some reason, and it got me to thinking about what time of day is better for writing code. Maybe you can’t make music at eight in the morning, but can you write (good) code at that time of day? Or does the best code only get written late at night when there are fewer distractions?

[6 good things about being a programmer and 7 frustrating things about being a programmer]

The answer, of course, is that it depends. If you’re an early bird, you’re probably more likely to prefer getting into the office before other people and digging into the code while all is relatively quiet. You night owls, on the other hand, may operate more like those rock and rollers (in more ways than one) and do your best coding later in the day or at night, maybe at home when the kids are asleep.

Other factors will play into your optimal coding times too, of course. Do you have a lot of meetings in the mornings or afternoons? Do you have an office, where you can close the door and focus, or an open space or cube where it’s easier to get distracted during normal hours? Do you pair program, in which case your options for coding times will be more limited? These things can limit your choice of when you can put on some music, tune out all the distractions and get your best work done.

Follow Phil on Google+

Phil Johnson is a writer and editor for ITworld.com, after having survived 17 years in the corporate wild as a software/web developer, technical lead and project manager. Along the way he also used to write monologue jokes for David Letterman, Jimmy Fallon and Jay Leno.

 

In his spare time these days, when he's not chauffeuring his daughters to and from school, lessons and Justin Bieber movies (ugh), he enjoys drawing cartoons, tweeting about his life and taking pictures of cranes.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

Ask a Question