Why do programmers like to work at night?

Why do programmers like to work at night?

Some people say that programmers are a kind of magical animals: they drink coffee and squeeze out code.

This is true. Ask any motivated programmer and you will find that most of them are active late at night. Some get up early, some go to bed late; some get up at 4 am, some go to bed at 4 am.

The point is to focus, but you can just sit there and meditate, and what's the difference between that and working in the middle of the night?

I think it depends on three factors: the creator's schedule, a sleeping brain, and a bright computer screen.

Creator's Schedule

Paul Graham wrote about the creator’s schedule in 2009: fundamentally, there are two main schedules in the world. The traditional manager’s schedule is divided into hours, and a 10-minute interruption will only waste one hour of your time at most.

But at the same time, Graham also summarized a "creator's schedule" - that is, the schedule that those of us who create follow. Working on a large abstract system requires all your energy to be invested in it - someone once compared this to building a house with expensive crystal glass. Once someone distracts your energy, the whole project will fall apart into countless pieces.

This is why programmers hate anything that interferes with their work.

Since this is a significant investment of mental effort, we can’t get started unless we can work for hours without interruption. It’s not worth it to build an entire model in your mind only to have it fall apart after half an hour.

In fact, if you have the opportunity to communicate with many business founders, you will find that it is difficult for them to get any work done during the day. Because during the day, they have to face various interruptions, deal with various important things, and respond to emails from all parties. Therefore, most people choose to do their work in the dead of night when everyone else is asleep.

Sleeping Brain

But even programmers need to sleep at night - programmers are human beings, and they feel more alert during the day.

So why do we do our most mentally demanding work when our brain is trying to fall asleep, and instead complete relatively simple tasks when our brain is most alert and awake?

Because the more tired you are, the better code you can write.

Similar to Ballmer Peak, fatigue can actually help us focus better for a simple reason: because your brain is tired, you have to focus! There is no extra brain power to distract you.

I tend to be least productive when I’m drinking too much tea or taking energy drinks at inappropriate times, which causes me to be hyperactive, checking Twitter or the news, with my mind always racing around and not being able to focus.

I thought I would be able to work better this way—with more energy and more brainpower. But on the contrary, I was constantly tripping over myself and unable to focus for more than two seconds.

Instead, when I’m a little tired, I focus on programming. Because my brain is a little tired, I can program for hours without being distracted by checking Twitter or Facebook , and it feels like the Internet has disappeared.

I think this applies to most programmers. We have too much brainpower for 80% of the work - let's face it, for every bit of code that lives up to its potential, you need to write 10x as much mediocre code to make it run well. Even if you're working on state-of-the-art machine learning (or anything else), a lot of the work is just cleaning up the data and presenting the results in a pleasing way.

When your brain isn't working at full capacity, it looks for other things to do. Fatigue slows you down, making you focus on the task at hand and not on anything else.

Bright computer screen

This is easy to understand. Staring at bright light sources at night will push your sleep cycle back. You will work tirelessly until 3 a.m. Then, you will sleep until 11 a.m. And when night falls, you will not feel tired because you just woke up at 11 a.m.

After enough repetitions, you essentially end up in a different time zone. What’s even more interesting is that this state doesn’t seem to rebound: once you’ve settled into a state of equilibrium where you fall asleep at 3 or 4 a.m., you tend to stay there.

Or, when people around us tell us that eating breakfast at 2 p.m. is too lazy, then we might let the alarm clock change our schedule.

To sum up, programmers work at night because in such an environment, there will be no restrictions on working hours, which gives you greater flexibility. In addition, your brain will not be repeatedly distracted, and the bright screen will keep you awake.

As a winner of Toutiao's Qingyun Plan and Baijiahao's Bai+ Plan, the 2019 Baidu Digital Author of the Year, the Baijiahao's Most Popular Author in the Technology Field, the 2019 Sogou Technology and Culture Author, and the 2021 Baijiahao Quarterly Influential Creator, he has won many awards, including the 2013 Sohu Best Industry Media Person, the 2015 China New Media Entrepreneurship Competition Beijing Third Place, the 2015 Guangmang Experience Award, the 2015 China New Media Entrepreneurship Competition Finals Third Place, and the 2018 Baidu Dynamic Annual Powerful Celebrity.

<<:  WeChat management lags behind: latecomers are victims of the system

>>:  Mobile phones are not only replacing wallets, but also driver's licenses

Recommend

Complete guide to Tik Tok operations and the law of attraction!

This article explains the operation of TikTok fro...

APP promotion: building user levels from 0 to 1

A useful or interesting APP user rating system ca...

The gorgeous fireworks you see are actually "electrons" dancing

During festivals or grand events, fireworks are o...

Common questions and precautions for the first release of Huawei AppGallery!

First FAQ Q1 What information do I need to submit...

Bemisia tabaci: How the world's only "super pest" came to be

Bemisia whitefly is recognized as the world's...