Why Programmers Code At Night?

Why Programmers Code At Night?

A Personal Reflection & Experience


5 min read

When I had just started coding, I used to see a friend of mine who had been coding for some years embrace night-time and kept wondering what pushed him throughout the night and why that time of the day?

Honestly, I would spend about 20 -30 minutes trying to night-code and that is because I had no serious projects or work I was embarking on. So, when I started real projects, I also gained momentum and I found it easier to code throughout the night than wake up early to code.


🌟 My Story

My personal journey as a night coder has been great so far because I feel at peace, incredible when everyone else is sleeping and am just up to code (programmeπŸ™‚).

Sometimes I would find myself coding at night to ease the shame of accomplishing nothing during the daytime 😜.

I personally love dark mode and that's why the default colour of this blog is dark. Please go ahead and toggle the light mode on your top-right menu if that is what you prefer. (Ain't religious)


Every time I am using new software, I try to find out if there is a toggle button that can switch from light to dark mode. This has ushered me into loving the night more than anything else and I don't know about you but I feel more alive and clear with minimal light and even during day coding, I try to close all windows and curtains to achieve the same.

Working at night is great because I can guarantee you that there is no chatting, no meetings, no phone calls, and no boss wanting a status report from the day gigs unless you work remotely for a company that is not in your timezone.

One more bug to solve. One more feature to add, one more code revamp, etc.. has led me to gain momentum in the night and code for even 6 hours straight (which is not healthy) but I find myself doing it and nowadays. I feel more alive at night than day.


Sometimes my coding can seem like gaming. one more ....to add.

And also, it helps me on concentrating on one thing and one thing only. My monitor, my code, my bugs, my code features, my google, the problem and its solution. Everything else like social media, catch-up, emails, etc seems less relevant and those can wait to see the light of day.

Usually, when I sleep at around 4 AM or 5 AM, I end up waking up at around 9 or 10 in the morning and that's If I now am not going anywhere and I wake up feeling awesome even though I might have slept off with unfinished bugs.

Some of my triggers for night coding are deadlines; I really suck at them and I usually end up pulling all-nighters.


Another interesting personal fact is that I have found out that there is indeed less internet traffic at night. Sometimes I would hop on this public Wifi to utilise the internet speed and bandwidth at that time when everyone is leaving for bed.πŸ€“

🌟 Take-home benefits

So from my little sharing, you can summarise the following benefits of being a night owl;
πŸ“Œ Free distraction zone.
πŸ“Œ Better flow and momentum.
πŸ“Œ The darker, the better.
πŸ“Œ Better internet speeds. πŸš€
πŸ“Œ The peaceful quiet.

🌟Take-home advice

And also maybe a little advice If you are to embrace night coding;
πŸ“Œ Set a start and end time.
πŸ“Œ Take in-session breaks.
πŸ“Œ Set a goal for the night.
πŸ“Œ Try not to multi-task.

In the professional world, most coding happens during the day and yeah... you guessed it right, no one would hire you for night sessions or night shifts unless you are a remote and digital programmer.


Some programmers may tend to use other boosters to stay up with the night or be productive with some resorting to caffeine, alcohol, wine, mid-night snacks etc... I don't use any!

The Ballmer Peak is a theory that computer programmers obtain quasi-magical, superhuman coding ability when they have a blood alcohol concentration percentage between 0.129% and 0.138%.


The discovery of this effect is attributed to Steve Ballmer

🌟 Notes & Research

According to Healthline, Short sleep β€” usually defined as fewer than 6–7 hours β€” has been repeatedly linked to a higher body mass index (BMI) and weight gain.

One analysis of 20 studies including 300,000 people found a 41% increased obesity risk among adults who slept fewer than 7 hours per night.

But also research shows that night owls have higher IQs than early birds. In 2017, British researchers found out that people who are night owls are more intelligent than those who go to bed and wake up early.

Tweet by Fact (3).png

Read more about the following to embrace night programming.
πŸ”Έ The Stockholm Sleepy Brain | Open Neuro
πŸ”Έ Sleep/Wake Cycles | Johns Hopkins Medicine
πŸ”Έ Ballmer's Curve | XKCD

🌟 Summary

So, are you also a night-owl or? What do you prefer? I am waiting for your feedback in the comment section.

If you are a newbie and this night thing doesn't make sense, please continue with day coding. You are not obliged or required to do so to be a pro-programmer and neither is it conventional or a standard.

This article is targeted at all programmers in general. No particular niche is special and you are all covered whether you are into mobile apps, web apps, cloud computing, Web 3, AI/ML , etc.


Good programmers can code at any time. So, it is neither daytime nor late at night. Just choose what is best for you!

🌟 Conclusion

Once again, hope you learned something today from my little closet.

Please consider subscribing or following me for related content, especially about Tech, Python & General Programming.

You can show extra love by buying me a coffee to support this free content and I am also open to partnerships, technical writing roles, collaborations and Python-related training or roles.

Buy Ronnie A Coffee πŸ“’ You can also follow me on Twitter : β™₯ β™₯ Waiting for you! πŸ™‚