I can be described as a morning person, where waking up at 4:20 AM to catch a flight is no problem. My colleague on the other hand go to bed no earlier than midnight and often later than that.

We're both programmers, and if we're in a critical phase of a project, my colleague works until 3AM, and I start at 4AM. Still both times are in the middle of the night and we tend to get most work done at off working hours.

Question is why that is?

  • 3
    $\begingroup$ You're not alone. $\endgroup$
    – user5402
    Dec 29, 2013 at 21:16
  • 1
    $\begingroup$ Interesting question. This could depend on outer circumstances instead of being a biological phenomena though. For example, night is is much more distraction free from a sociological perspective. $\endgroup$
    – danijar
    Dec 30, 2013 at 0:09

2 Answers 2


Probably both a combination of being more tired and fewer distractions. Most other people will be asleep during the night. Programming is adversely affected by context-switching, thus night-time with stimulant-enhanced soda is more likely to provide you with long periods of interruption free coding.

Update: The above situation creates the conditions where Csíkszentmihályi's Flow is most likely to take place.


I answered a similar question some time ago on Programmers SE: Are developers more productive at night?

One interesting paper I ran into with a different perspective than the one provided in Justas's answer is "The Programmer Life-Cycle" by Russell Ovans (2004). It discusses the productivity of a programmer over time.

The sequence of phases is: euphoric, productive, irreplaceable, resentful, bored, and unproductive. Overall productivity is characterized by an initial six month period of intense interest, at which time productivity rates are often an order of magnitude higher than the oft-quoted 500 LOC/month average. After a short period of volatility, the programmer then enters a prolonged phase of steadily dwindling interest, resulting in productivity rates that mimic the average.

An important disclaimer to add: his perspective is based on his own observations and experiences over the course of six years while working as a senior software engineer.

Although perhaps not as relevant to you since you state you mainly work at night due to critical phases of a project, other programmers generally prefer working late at night. Taking Ovan's report into account, and considering that programmers usually work on individual projects at night, a simple reason could be that it's this 'euphoric' drive for short-term individual projects that makes them productive, causing the desire to stay awake and continue work.

Ovans, Russell. "The programmer life-cycle." ACM SIGSOFT Software Engineering Notes 29.3 (2004): 25-26.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.