Sign inorRegister Site is for SALE!

Why do programmers work at night?

imageAccording to some saying, the programmers are human devices that convert caffeine into the programming code :)

If you ask any programmer when the most productive time to work, most likely that will be the night time. Someone may start earlier, somebody else could start later, and some people prefer to go to bed at 4 am. However, the most popular one to get up at 4 am and do the job before the daily turmoil will start.

The purpose of all this is to get rid of distractions during the day. What is so special about the night?

I think it all comes to three things: the maker’s schedule, sleepy brain and the bright computer screen.

Maker’s schedule

Paul Graham wrote about the maker's schedule in July 2009. According to him, there are two basic types of schedules in the world. The first one is manager's schedule. It is embodied in the traditional appointment book, with each day cut into one hour intervals. You can block off several hours for a single task if you need to, but by default you change what you're doing every hour.

imageAnother one is the maker’s schedule. It's the schedule of command. But there's another way of using time that's common among people who make things, like programmers and writers. They generally prefer to use time in units of half a day at least. You can't write or program well in units of an hour. That's barely enough time to get started. This can be like building the house of lead glass: once you get distracted everything gets shattered.

For someone on the maker's schedule, having a meeting is like throwing an exception. It doesn't merely cause you to switch from one task to another; it changes the mode in which you work.

Therefore, most programmers do not like when they get distracted. They do most of the work at night when everyone else is asleep.

Sleepy brain

However, even the programmers need to sleep at night. They are not any supermen. Some of the programmers pay more attention during the daily hours.

imageHere comes a question: Why do they perform the most complex mental work when the brain wants to sleep and more simple tasks when the brain is sharp and clear?

Here comes the answer, the tiredness makes them better coders.

According to the Ballmer Peak, the tiredness makes a tired brain to concentrate! It cannot afford just lose the concentration, because it is very important thing.

For example, my productivity is minimal after drinking a lot of tea or energy drinks: they make me hyperactive, so I check Twitter or I read Hacker News, I just jump back and forth all over the Web.

It would seem that I should work better, because I have so much energy and refreshed brain. But instead, I get confused myself, because I cannot concentrate for more than two seconds.

On the other hand, when I get a little tired, I just sit down at a table and write. With a slightly weary head, I can write the code for hours without even thinking to look at Twitter or Facebook.

I think this is true for most programmers. The intellectuality is redundant for ~ 80% of the tasks. The realization of interesting algorithm often requires writing in ten times more of the auxiliary code. Even if you are doing the most complex machine learning, a great piece of work will be just the data preparation and output of results in a nice form.

If the brain does not work at full capacity, so it looks for some exercise or information. The tiredness stupefies the brain, so that it gets enough just one current task.

Bright computer screens

Here everything is simple. Keep staring at a bright light source at the evening, and your circadian rhythm will linger. You forget about tiredness until three o'clock in the morning, then you wake up at 11 am, and when evening comes you just have not get tired yet, because you woke up at 11 o’clock in the morning!

imageThis approach will easily take you in another time zone. Interestingly, this time shift is not infinite, and once you get into that equilibrium point of going to bed between 3 and 4 o’clock in the morning, you tend to stay there.

Perhaps, it all depends on alarm clocks that are waking us up that late in the morning :), because a society calls us lazy slobs, if we start a breakfast at two o'clock in the afternoon.


So, the programmers work at night, because they do not like to be distracted (which allows working more relaxed), the brain does not get distracted, and the bright screen drives away the sleep.

Enjoy working at night!

Sparks 29 january 2012, 19:24
Vote for this post
Bring it to the Main Page


+2 itsravie February 2, 2012, 11:44
Excellent article. true for me, since a decade
0 Geri February 3, 2012, 2:03
my brain lags so mutch at night, i can code the slave-work witout even recognizing that i am working.
0 PNRStatus February 3, 2012, 9:58
Great post! Yes, like many others I need bigger chunks of focused time to output something meaningful without having to switch contexts too many times. Turning off email and keeping away the phone during focus hours can enhance productivity.

Leave a Reply

Avaible tags
  • <b>...</b>highlighting important text on the page in bold
  • <i>..</i>highlighting important text on the page in italic
  • <u>...</u>allocated with tag <u> text shownas underlined
  • <s>...</s>allocated with tag <s> text shown as strikethrough
  • <sup>...</sup>, <sub>...</sub>text in the tag <sup> appears as a superscript, <sub> - subscript
  • <blockquote>...</blockquote>For  highlight citation, use the tag <blockquote>
  • <code lang="lang">...</code>highlighting the program code (supported by bash, cpp, cs, css, xml, html, java, javascript, lisp, lua, php, perl, python, ruby, sql, scala, text)
  • <a href="http://...">...</a>link, specify the desired Internet address in the href attribute
  • <img src="http://..." alt="text" />specify the full path of image in the src attribute