
According to the proverb, programmers are devices that convert caffeine into code.
If you ask the first programmer to find out when he is the most productive, he will most likely call the night. Someone early, someone later. A popular option is to get up at 4 am and do the work before the start of the daily turmoil. And some prefer
to go to
bed at 4 in the morning.
The purpose of all this is to get rid of distractions. But you could just close the door ... What is so special about the night?
')
I think it all comes down to three things: the creator's schedule, the sleepy brain, and the bright computer screen.
Schedule creator
In 2009,
Paul Graham wrote about the "
maker's schedule ". According to him, there are two main types of schedules in the world. In the traditional "manager's routine," the day is divided into separate hours, and a ten-minute disturbance costs a maximum of an hour of lost time.

Another option Graham calls the creator's schedule - the one who creates something, creates, produces. Work on large abstract systems requires you to place them entirely in your head. This can be compared with the construction of the house of
crystal : it is worth distracting how everything is showered and smashed to smithereens.
Therefore, programmers are so annoyed when they are distracted.
Because of this huge mental contribution, we simply do not start working until we can count on a couple of hours of rest. It makes no sense to build in the head a comprehensive model of the system only in order for someone to break it in half an hour.
In fact, after talking with company executives, you will find out that they simply cannot finish any work during the day. Constant interference cannonade: important matters ™ that require attention, and letters that require an answer - simply do not allow anything to be done. Therefore, they do most of the work at night when everyone else is sleeping.
Sleepy brain
But even programmers need to sleep at night. We are not any supermen. Even programmers are more attentive during the day.

Then why do we perform the most difficult mental work when the brain wants to sleep, and simpler tasks when the mind is sharp and clear?
Because fatigue makes us better coders.
As with Balmer's peak, fatigue makes us pack up because the tired brain just has
to concentrate! He simply does not have too much strength left to afford to lose concentration.
For example, my productivity is minimal after an excessive amount of tea or an untimely energy drink: they make me hyperactive, and then I check twitter, then I read Hacker News - in general, I just jump here and there.
It would seem that I should work better - so much energy, such an overclocked brain. However, instead, I myself am confused at my feet, because I cannot concentrate for more than two seconds.
On the other hand, when I'm a little tired, I just flop at the table and
write . With a slightly weary head, I can write code for hours without even thinking about looking at Twitter or Facebook. The Internet seems to cease to exist.
I think this is true for most programmers. Our mental powers are redundant for ~ 80% of the tasks: agree that implementing an interesting algorithm often requires writing another ten times more of the auxiliary code. Even if you are engaged in the most complex machine learning that you can imagine, a big piece of work is just preparing the data and displaying the results in a beautiful view.
And when the brain does not work at full capacity, it is looking for something to do. Fatigue dulls the mind so much that one current task becomes enough for it.
Bright computer screens
Everything is simple here. Continue to stare at a bright light source in the evenings, and your
sleep pattern will begin to linger. You forget about fatigue until three o'clock in the morning, then you wake up at 11, and when evening comes - you are simply not tired yet, because you are only eleven in the morning!

After several repetitions, this approach will easily take you to another time zone. Interestingly, the shift is not infinite, and once you hit the equilibrium bedtime between 3 and 4 o'clock, you will usually stay there.
Or maybe it’s the alarm clock that raises us in the morning, because society calls us lousy lazy if we start breakfast at two o'clock in the afternoon.
Conclusion
So, programmers work at night, because it does not require you to stop working for a certain time (which allows you to work more relaxed), the brain is not distracted, and the bright screen drives sleep away.
Note translator : the first comment on the original article complements it well:
The real reason is that we are dragging time all day long, and by midnight we go to the “Ahhh! # $%! Work!"