Programming Is For Nighttime

I have lots of documentation to do, and some hardcore programming to follow. Too many interruptions during the day...

When will industry learn: Programming and Writing are Nighttime Activities.

Well, they don't buy that (and my spouse won't accept it either ;-).

-- ToddCoram


Could be worse; my spouse not only accepts it, she's applied it to her own projects. She's making all her deadlines, but I feel as if I haven't seen her in weeks.... -- PaulChisholm (leaving on vacation soon!)


It's become a fact of life for me. But at least I get to spend a few hours a day with my kids and wife that way! -- NicholasJacobs


Working from home, I find the real distractions hit in the evening. That would include TV and friends with conventional lifestyles. And it feels very weird to go watch a movie in the day time. Late at night works up to a point, but after about 4am I'm too tired to work regardless. And I hate trying to get to sleep after day break. The dawn chorus doesn't help, either. -- DaveHarris


Well, okay, so programming at nighttime is a dream from my younger days. However, I have adapted quite well to the notion that programming is for early morning and late evening. These days I get to my place of work around 6:30am. I get about 2.5 hours of programming done before people start pouring in. The workplace tends to die down around 6:30pm, so that is also a good time for some deep coding. -- ToddCoram


When I started out in this game, the mechanics of programming occurred on a multi-user MainframeComputer, so there was no question but that ProgrammingIsForNighttime as that was when the CPU cycles were available. Not very long after getting married it became obvious that a 5 AM bedtime was not very consistent with having a life (or staying married), and danged if it didn't turn out that programming is as time-flexible as any other activity.

I would add this: to really be creative, I go for a walk, though the same process can hit in the shower or the middle of the night. The bulk of the hard part of programming/design I do in a quiet place far from a computer, usually with pen and paper, in loose prose, sentences, or (rarely, actually) pictures. Not, in any case, in a ProgrammingLanguage. The part that involves converting the resulting ideas into code on a computer and getting it to run is pretty mechanical, I find, and perfectly amenable to being done in the daytime in an office environment.

-- JimPerry

Many of my system ideas come to me while I'm in the shower. -- BGreen

Me too; it's because of the tiles in bathrooms. One minute you're absent-mindedly scrubbing your back and looking for patterns in the random arrangement of the bathroom tiles, then suddenly you think of a neat way of optimizing that pesky inner loop. I'd also add (to the general point of this page) that I divide my work time between home and office. Typically 3:2 (home:office). Before I started doing that, and was at the office full time, people were afraid to approach me to ask questions, because I would invariably snap at them (they were "stealing my time.") Now I spend ALL the time in the office communicating with people, stopping people for discussions in hallways, helping newbies out with their pointer arithmetic and abstract base classes. And I spend ALL the time at home coding, documenting, doodling designs, with no interruptions from collegues. The improving effect this clean separation has had on the way I treat people at work cannot be overstated. -- DanielEarwicker

I don't like designing/coding in the office environment (too noisy, always distracted). This is where a discman helps (just insulates me from the outside world). Anyhow, the best designs were done on my bed or on the back of fast food papers. But I don't think that working at night is so good. The body needs rest, the people you live with need care (as you do too). This is like any device; you need to take care of it. (This was learned the hard way; my previous wife was not that patient...) A good trick is to stop watching TV stuff, which is plain boring and eats time like hell. And if you plan one hour of study a day, then you get physiologically used to it, and it eases the learning process. Still, I *LOVE* designing... Am I an addict? (Another good trick is to have a palm recorder in the car, so if something strikes you, you can record it. Be sure that you won't remember when you'll get home... and playing with pen and paper in a car is quite difficult).

-- PhilippeBack


Yes and no. Sometimes an occasional nighttime burst can be useful, the office is nice and quiet and you can sit being heroic in your little cone of light. On the other hand, in a previous job, the lead developer used to stay up late and have "bright ideas," which meant that everyone else arrived in the morning to find their stuff broken. One of my colleagues referred to this as NegativeCode?. -- SteveFreeman

Did you at least have version control?

Perhaps the concept is not negative code but BuggingSoftware?. This name is not mine but was derived by the logic that if taking bugs out is debugging then the process of writing the bugs must surely be bugging. -- AlanChristiansen

Shouldn't that be buggering?

Not unless you want to get a straight face from people. 'Hi, boss. Sorry for being a bit late, I've been buggering our software'... or maybe 'My hand hurts. I was up buggering all last night'.

I suggest 'bugging', as it is already used by intelligence services to mean placing a bug on/in something, as in 'bugging a phone'.

Which is precisely why it's confusing, as not all bugs result in the program's users being easily monitored. I don't think "buggering" is right either; maybe "enbugging" would be better...


I think the main reason programming maintains its nighttime connotations are:

  1. Resource availability. Many resources only become available in deep nighttime, such as CPU cycles. This problem is going away, however, as silicon invades our lives.
  2. Less distraction. When you have an idea, you don't want to be disturbed. No one is up late at night but you, and the world outside your window isn't distracting you with light or noise.
  3. Phase shifting. Often you acquire a thought at random times, say late at night, or you are in the MentalStateCalledFlow and stay there until your mind is too exhausted to continue, usually well past your regular bed time. This slowly, or quickly, makes you shift phase from your regular sleeping schedule. (I'm infamous for not having a sleeping schedule.)

Now combine all of these to acquire the loser adolescent cracker image, especially in the eighties and early nineties:

  1. Long distance. Since many targets or BBSes were long distance calls, and the only decent time to play was from 11pm to 8am.
  2. Parents. Parents lead normal lives, so they will be asleep when you are on your box at 3am. Parents don't like you "playing games" (playing h4x0r) on that thing all day long. Nag, nag, nag.
  3. Summer holidays. You can phase shift during the summer. You can also phase shift during high school if you are really 31337 because high school is beneath contempt.

So, as you see, this isn't necessarily a programming phenomenon. Get some sleep.

Also a holdover from MainframeComputer/timesharing days: better response, sometimes cheaper, as well, for timesharing. For corporate mainframes, it may have been the only time available for testing. Computing history did not start in 1985.

Actually in many environments these days, it may be the opposite. People have gotten into a habit of running all the heavy batch jobs, cleanups, backups(!) etc. "in the night when there's free cycles / bandwidth". Servers that don't take a usage hit during the day might actually be much less loaded then.


Not sure that ProgrammingIsForNighttime. We try to do PairProgramming, which of course would be a strain, and to maintain a FortyHourWeek, which means we wouldn't be here at all during the day. :-) But seriously, most of my programming happens away from a keyboard, arguing, and in front of a white board. I suspect a lot of people make the classic mistake of thinking that programming is the last bit you do when you type it into the computer. ProgrammingIsMoreThanCoding. -- AlainPicard

That would be just about every manager I have ever had.


I am not sure if people with disturbed circadian rhythms self-select for programming jobs or if the job creates disturbed circadian rhythms. (Effect of monitors?) Anecdotally, computer jobs seem to have more people with DelayedSleepPhaseSyndrome?.

http://www.sleepdisorderchannel.net/dsps/

Our natural circadian rhythm is slightly longer than a 24-hour day. Light and social cues operate each day to reset your rhythm. Perhaps programmers are on the whole less able to respond to social cues.

I HaveThisSyndrome? and had it before I started programming. -- EricHodges

Likewise, due to another syndrome. There may be some interrelation between the apparent break in the phase-locked loop of sleep cycle to day cycle and the ability to code. But I work better in the daytime - when I remember not to leave chat programs running. -- RobRix

I remember regularly fitting 6 days into a 7-day week when preparing my diploma thesis. But now, being married, I learnd to prefer and enjoy a NineToFiveJob?. -- GunnarZarncke

The horrendous amounts of caffeine and sugar that some developers live off must be considered to be a contributing factor too.


See also HackingAtNight, CoreHoursIsNotNineToFive. Contrast with ProgrammingIsForMorning.


EditText of this page (last edited July 8, 2007) or FindPage with title or text search