[This essay has been expanded into a book, you should read it, here]

A chimpanzee brain at the Science Museum London

Image via Wikipedia

A popular saying goes that Programmers are machines that turn caffeine into code.

And sure enough, ask a random programmer when they do their best work and there’s a high chance they will admit to a lot of late nights. Some earlier, some later. A popular trend is to get up at 4am and get some work done before the day’s craziness begins. Others like going to bed at 4am.

At the gist of all this is avoiding distractions. But you could just lock the door, what’s so special about the night?

I think it boils down to three things: the maker’s schedule, the sleepy brain and bright computer screens.

The maker’s schedule

Paul Graham wrote about the maker’s schedule in 2009 – basically that there are two types of schedules in this world (primarily?). The traditional manager’s schedule where your day is cut up into hours and a ten minute distraction costs you, at most, an hour’s worth of time.

Prim clockwork of a wristwatch, watchmaking ex...

Image via Wikipedia

On the other hand you have something PG calls the maker’s schedule – a schedule for those of us who produce stuff. Working on large abstract systems involves fitting the whole thing into your mind – somebody once likened this to constructing a house out of expensive crystal glassand as soon as someone distracts you, it all comes barreling down and shatters into a thousand pieces.

This is why programmers are so annoyed when you distract them.

Because of this huge mental investment, we simply can’t start working until we can expect a couple of hours without being distracted. It’s just not worth constructing the whole model in your head and then having it torn down half an hour later.

In fact, talking to a lot of founders you’ll find out they feel like they simply can’t get any work done during the day. The constant barrage of interruptions, important stuff ™ to tend to and emails to answer simply don’t allow it. So they get most of their “work work” done during the night when everyone else is sleeping.

The sleepy brain

But even programmers should be sleeping at night. We are not some race of super humans. Even programmers feel more alert during the day.

Ballmer's peak

Ballmer’s peak, by XKCD and shame on you if you don’t recognise the style

Why then do we perform our most mentally complex work work when the brain wants to sleep and we do simpler tasks when our brain is at its sharpest and brightest?

Because being tired makes us better coders.

Similar to the ballmer peak, being tired can make us focus better simply because when your brain is tired it has to focus! There isn’t enough left-over brainpower to afford losing concentration.

I seem to get the least work done right after drinking too much tea or having a poorly timed energy drink. Makes me hyperactive and one second I’m checking twitter, the next I’m looking at hacker news and I just seem to be buzzing all over the place..

You’d think I’d work better – so much energy, so much infinite overclocked brainpower. But instead I keep tripping over myself because I can’t focus for more than two seconds at a time.

Conversely, when I’m slightly tired, I just plomp my arse down and code. With a slightly tired brain I can code for hours and hours without even thinking about checking twitter or facebook. It’s like the internet stops existing.

I feel like this holds true for most programmers out there. We have too much brainpower for ~80% of the tasks we work on – face it, writing that one juicy algorithm, requires ten times as much code to produce an environment in which it can run. Even if you’re doing the most advanced machine learning (or something) imaginable, a lot of the work is simply cleaning up the data and presenting results in a lovely manner.

And when your brain isn’t working at full capacity it looks for something to do. Being tired makes you dumb enough that the task at hand is enough.

Bright computer screens

This one is pretty simple. Keep staring at a bright source of light in the evening and your sleep cyclegets delayed. You forget to be tired until 3am. Then you wake up at 11am and when the evening rolls around you simply aren’t tired because hey, you’ve only been up since 11am!

A city

Image via Wikipedia

Given enough iterations this can essentially drag you into a different timezone. What’s more interesting is that it doesn’t seem to keep rolling, once you get into that equilibrium of going to bed between 3am and 4am you tend to stay there.

Or maybe that’s just the alarm clocks doing their thing because society tells us we’re dirty dirty slobs if we have breakfast at 2pm.


To conclude, programmers work at night because it doesn’t impose a time limit on when you have to stop working, which gives you a more relaxed approach, your brain doesn’t keep looking for distractions and a bright screen keeps you awake.

You should sign up by email to receive tips and science about productivity and keeping your sanity as a developer, here.

Enhanced by Zemanta

You should follow me on twitter, here.

  • Fesa

    also, studying math or physics or other technology/science subjects works great for me when its late (as long as it’s not the night before exam, ten shit goes FUBAR and nothing will be learned)

  • Totally agree about the no distractions = zen part, but I’m the complete opposite with regards to being tired and coding on caffeine. When I’m tired I can’t focus at all, anything but the most mundane tasks just seems like it will be too much effort so I don’t do it. And caffeine makes me a monster (in a good way), it hypes me up but not to go check Twitter etc but just to bash out some serious code.

  • No

    Data taken from actual measurements shows virtually the opposite.

  • Just curious

    What data?  I would like to read some studies on the topic.

  • rawr

    indeed, what are you pulling this data from?  i’d love to know.

  • funny how true this is. Although from experience the ballmer peak tends to only be true in my inebriated mind; I’ve woken up a few times and looked through some of the most awful code ever written which I could have sworn was ground-breaking beauty the night before.

  • Raymond

    people are always aghast when I tell them I woke up around 4-6pm today but then I remind them that I’ll probably be working til 11a or 12p tomorrow

  • Awesome post! I’m a programmer and I think you’ve explained pretty much all the reasons why I’m up this late. Do you mind if I make a translation on my blog? I’d keep a link to this one and credit you as the author 🙂

  • I used to work long nights, once I spent three months going to bed at 6am and starting to work at 2pm.

    For me nights always had one extra thing besides not being interrupted, and it’s you can’t interrupt yourself, because nothing else happens outside.

    Normal people sleeps, stores are closed, so you don’t have the chance to interrupt yourself into other things, and you just focus.

    That’s my case anyway.

  • Not only programmers. The stereotype of the writer who stays up all hours had to come from somewhere.

  • I work 10pm-5am most days here in the UK. The side benefit is everyone interesting in the US is awake and usually working these hours too 🙂

  • Dad

    A trick I learned about my brain long ago is that putting on very familiar music can help me focus.  I “attach all the non-programmer parts of my brain to follow the music” and all that’s left is the programmer brain which can then get into flow and go for hours and hours.

  • thelim3y

    I adore working nights. It almost doesn’t matter how tired I am, come 11pm my brain goes into code mode. Do those of you that enjoy the later vs day working consider yourselves artistic or more scientific?

  • Anonymous

    5am here and finished coding about 45 minutes ago. Can’t sleep straight after finishing as have too much in my head so a bit of reddit/hackernews before lights out. Your post really struck a chord with me and seems to makes a lot of sense.

  • How true is this that programmer is treating as machine not human and that’s the code which written in night takes sleep of another night of  programmer  who uses that. NoClassDefFoundError

  • I dont like tow ork with a bright screen but the rest is pretty much how I role :-). Thanks!

  • Anonymous

    I struggle to stay awake all day but when I get home I have restless energy and don’t want to sleep. That’s been true since I was a kid.

  • Lars Marius Garshol

    I definitely agree with this, and will send it to my wife, since it explains a couple of things she should know. 🙂

    However, note that you’re violating the xkcd license by not saying where that comic is from and not including a link to xkcd.

  • Awesome.

  • Jeremy MInnick

    That’s so wild.  I’m not surrounded by programmers so I just thought I had trouble sleeping.  so to have someone I don’t know completely explain my odd schedule and accurately predict my productivity is pretty awesome.

  • Glenn Wolters

    Great post! Though I really wonder how much of this post is scientifically true versus what we as programmers want to hear.

    Don’t get me wrong, I’m a coder and work best during the evening, but I somehow feel that this is might also be an excuse for bad habits?

  • thelim3y


  • Guest

    “Programmers” work at night, because you have poor sleeping habits, that’s why. Why do you always need to drag other people into this? Perhaps if you stopped glorifying your ineptitude, then maybe you’ll be able to start working on fixing things.

  • This is bang on for me; thank you for sharing… something I can send to friends to justify my obscure sleeping patterns…

  • Wow, so many comments and such a positive response! I’d love to be able to respond to everyone, but I honestly can’t even read everything (there’s almost 400 comments on reddit as well).

    Glad everyone is enjoying the post. Everybody who essentially said “Yeah me too! How did you guess all these things!?” -> yeah me too, that’s why I guessed 🙂

    To everyone who commented this isn’t a scientifically supported hypothesis -> it’s not, it’s an essay-ish thinking of what I believe to be possible explanations. No real science involved.

  • Trolling is easy, _why_ do we have poor sleeping habits? That’s the question!

    Somebody flagged you, but because you managed to raise a point in only a slightly arseholeish way I’m letting the comment stay.

  • guest

    “raised a point in only slightly arseholeish way, I’m letting the comment stay”..that rhymes! 😛

  • Midnight Writer

    I’m a beginner when it comes to coding (hope to really dive into that in the coming weeks/months as I have a major project that will require it). I am a writer, though, and I feel most of my best work is done after 2 AM. Sometimes, I get so tired it’s all I can do to finish before passing out. And I’ve even passed out on my keyboard a time or two.

    But what bothers me more than anything is how people are always telling me I need to change my sleep patterns and the fact that I’m on a completely different schedule from my friends and family. They seem to think I work 24 hours a day, 7 days per week. Sometimes it feels like it, but really, I’m just on a flipped, block schedule — work 2 – 6 AM, sleep 6 AM – 12 PM, work 2 – 9 PM. 

  • Mr Mala

    “scientific way” does mean “experimenting and writing down conclusions” ….
    And honnestly , regarding the number of coders around me having read this note and just shaking heads saying “true .. soooo true” , I can tell it’s really kind of proven theory ! :-p

  • I’m an advertising creative / voice over / writer

    Perhaps the theory of the sleepy brain nails it. I0ve worked also with designers, and we all get more creative at night. True, distractions are kept at minimum, and yes, also, having all the concept/idea on RAM (accessible) helps a lot when developing, coding, or in any language related work (graphic, code or just words).
    But the main reason perhaps is… cause WE CAN.  Creators can get away with showing up later at the office, and some other acceptable behavior, like going out for a little walk, have fresh air, or play a video game for a while to freshen up and refocus.

  • alble

    I’m guessing you don’t work at night. That’s ok too,  the author’s points don’t make you any less of a programmer, now troll along.

  • WUT

  • Guest

    YES YES YES !!!
    It’s totally the same for me !
    (And when i was in school i was usually learning at night for the same reason)

  • Dolgion

    Brilliant post! I can totally relate to that as I’m in exactly that cycle, going to bed around 3am and getting up at 11am. My family is telling me to go to bed earlier and have a normal person’s rhythm, but I really really can’t get anything done during the day. There’s just no guarantee that I will be left in peace for at least 3 hours straight. Also interesting point about the tired brain and bright screen, I had never thought about that.

  • Greg Jorgensen

    Rings 100% true to me. It’s 3:45 am and I just finished 6 hours of programming with no distractions. I’ve always shifted into all-night mode when I have something hard to do.

  • Pingback: Why programmers work at night « Wisdom Bytes: The journal of a System Administrator & InfoSec Jedi Padwan()

  • Guest

    Haha, this is so true, i cant help myself on holidays from going to sleep at 10AM, and waking up at 10PM.
    My body just shifts time zone.

  • Guest

    Have never heard of the Maker’s Schedule before so I’m glad it’s not “just me” who believes that’s the reason!

    I’ve always likened it to writing a letter; you know in your mind what you want to say but you have to put all the “a”‘s down on paper first, then the “b”‘s etc.  If you get interrupted at the right time you can occasionally say “okay, I’m done with the M’s; on the the N’s next” and pick up where you left off but more usually your’er on the second sentence of paragraph three just F’s buzzing around your head – lose your train of thought and you have to start all over again.

  • Juanjo

    It’s funny. If you have employees that are programmers they will say you that they work best on the morning and without a pause for eating (so that they have concentrated free time). So they lie, as I already knew because I am a programmer.

  • Alexander Steshenko

    Wow. I’ve been thinking about it for quite a while.
    >> We have too much brainpower for ~80% of the tasks we work on 
    So true. While might sound rather appealing it actually makes me sad from time to time. 


  • Estevez Halivud

    Peaceful, silent night 🙂 

  • Anonymous

    Spot on! … Never really thought about blaming the bright computer screen for my bad sleeping rhythm, but it makes all sense now.

  • 1Veertje

    image author atribution: you’re doing it almost right, but almost right is still wrong. 

  • You should check this post. They are resonate with each other.

  • Raphi

    nice 🙂

  • To everyone complaining that I didn’t attribute XKCD properly. Look, it’s xkcd, everyone knows it’s xkcd and that Randall Munroe is the author. I thought wordpress would take care of linking to the source, but it didn’t. You wouldn’t expect me to correclty attribute the Mona Lisa … 

    This article is now (and has been for many hours) a static page and I’m not about to go changing it, since that would likely bring my blog down again.

  • Lovely, enjoyable article really.

  • Thestenslands

    And here I thought it was to drive you parents crazy when in school and then carry on with your manager at work. I feel so enlightened.

  • Tolgakatas

    ummm I work good in 2-3 day marathons….  if I can past 10am the next day, I get my second wind 😉

  • Anonymous

    I totally agree. I’ve been a programmer for over 5 years now and have always done my best work during night times. I guess it’s just the fact that no one can bother me during these times and I can concentrate that I keep this schedule. Believe me I tried working day times and no matter how I try I can never concentrate. Caffeine + Night + sleep deprived brain = coding machine

    It’s a bad habit and someday I know I’ll pay for it but I’m trying to even it out by eating healthy food and getting as much sleep as I can when I can.

  • Dha

    Great Article,
    for my boyfriend the “common” hours is the time he gets nothing done, so he’s in bed by 3 am. I on the other hand tend to get up between 3 and 4 am to seize the quiet hours for my coding before I have to deal with all the distracting tasks so that he might stay in bed until 11 and we have all afternoon to ouselves 🙂
    Specially in winter thats a plus, since everybody else comes home when it is already dark.

  • Dominic Amann

    It would have been nice (and much fairer) to make the tiny unreadable cartoon a link to the original.

  • r4z0r

    Awesome article. I Could never fully grasp why do I do my best work between 12 and 4 in the morning until now.

  • Brinebarger

    Check out f.lux at http://stereopsis.com/flux/ for a program that changes monitor settings based on sun rise/set.  I have found those late nights to be easier on the eyes.

  • Elliott

    This worked exceedingly well for me when I was going a lot of writing as a student, too.

  • Johnwcurry

    I am usually at my machine by 4AM.  This morning it was 3AM.  I seem to do my best work when it’s dead quiet in the morning:  no phones, no obligations to think about until at least 8AM.

    I’m usually asleep by 9PM.  It all seems to be just my natural cycle:  I work at home, and can select the hours I want to work.

    Glad to know I’m not alone in working atypical hours!!


  • Anonymous

    Haha, way to fall out of your tree over a simple request for source attribution! XD
    And although very popular, XKCD is hardly the Mona Lisa – it was fair enough of people to ask.

  • Ekuser7

    Late night + Music = Bug Free Software 

  • John

    Right click on it and select “View Image” (at least in Firefox).

  • Mr-Yellow

    I seem to cycle past the 4am quite often. The sun and kookaburra’s (birds) were at one stage the warning system to sleep. Then broke past this and was no longer afraid of the sun keeping me up and would crash at 11am and sleep to late afternoon. Once did 6-8 months where I’d work for 2 days and sleep for 1. The 2nd day of work was amazing productivity.

    It’s important to keep vitamin D, B12 and calcium up or your teeth can suffer decalcification while sunlight (UV) kills bacteria including cleaning your blood.

  • Mr-Yellow

    oh a tid-bit… I read there was a scientist on the atomic bomb program at Los Alamos who used to do a 28 hour cycle religiously. He’d be seen doing his mid-day walk at all hours and noone could really work it out.

  • erionpc

    You nailed it man! I’d happily wake up at 11 a.m. every morning and go to bed at 3 a.m. delighted with my juicy algorithms. Too bad I also have to work during the day (writing software) from 8:30 a.m. to 6:30 p.m. and then go home to my wife and two kids who are looking forward to see me (and I’m looking forward to see). A real hardcore programmer shouldn’t really have a family, … but I’m happy I’m not one 🙂

  • Ruhil

    I am also love work on night till 4 🙂 ,that help me make more innovative and productive 

  • Cbenac

    Excelent article. I totally agree. I have been telling the same thing to people around me for years. Now  I’ve the proof.
    ( I mean the part where we cannot be interrupted or the entire crystal house goes down)

  • Ejoell

    Even though you let the comment stay I still can’t read it.  What did he say?

  • Philip

    I don’t buy the whole “you have to be tired” thing, not at all. As far as I am concerned, the reason why I prefer to work at night is because distractions come from inside just as well as outside.

    Sure, distractions from the outside can be incessant, to the point where they become downright infuriating when you have real work to do, and you have very little control over this. Unless you hide, that is. See, if it were that simple, I bet a lot of us would go back to working days and simply hire strong and able assistants to keep the world at bay.

    But there will always be one source of distractions I cannot hide from: me. I have to return Bob’s call… I should take the time to go visit… I must not forget to… blah blah blah… At night, there are very few people I can call. There are even fewer places where I could possibly feel the need to go. It’s me and my computer, and nothing else matters…

    So, in the end, it is more about finding yourself in a place and time where interaction with the rest of the world is impossible than anything else.

  • Computer screens are the opium to the programmer…

  • I wish my girlfriend understood this… she gets so ill when she sees me “get on that computer” again.  Pays the bills.

  • Ejoell

    I would like to know how you guys can get away with reporting to work in the middle of the afternoon.  We have these “Core Hours” between 9AM – 3PM which we have to be in the office.  We have to do our work on the client site because of the contract differential.  And we have to be available to the client whenever they need us.

    On the railroad I spent 11 years working either the 4PM to 12 am or the 12 am to 8 am shifts. This was great because when you had some errors to run you could go to the store or take the car to the shop without losing time from work.  Everytime you got up the sun was shining and you had time to hang around waking up before you had to go to work.  Now days 20 years later, I still have issues with getting up at 6 am to get to work because it is just “wrong” to wake up in the dark.  I would love to do my work at home in the evening.  The way things are now because I spend my day fighting with this klunky Navy NMCI network, (This page will probably lock up three time before I finish posting this comment.  In fact it would not let me even initiate a comment string because the comment block keeps showing “Pleas wait…” )  The last thing I want to do when I get home is look at a computer screen.  By 8:30 PM, I can’t keep my eyes open and its time for bed.

    I can pull all nighters when the contract allows and I have a deadline to meet, but I notice that when my code and SQL scripts are full of the most stupid errors.  So I don’t think I could do that on a consistent basis and produce usable code.  Another thing I’ve noticed though is that my best code is early in the week when I am fresh from the weekend and my worst code is on Thursday and Friday when I am tired and exhausted and just want to go home and crash.

    So for me and most of my co-workes, everything is exactly the opposite of what this article states.  The only one I seen do stuff like this is my boss who goes home from working all day and codes until midnight, then is up at 4 am do code some more before getting the kids ready for school and going to work.  If I had a schedule like that I would be dead in a month.   

  • Ejoell

    Actually I’ve never seen the cartoon, before never heard of XKCD, wasn’t able to see it anyway so never even looked at it.  So while I really could care less about it, I understand people’s point about proper attribution in a published piece.  Though I also understand your concern about wordpress not being able to handle it.  Maybe if you weren’t so tired when writing the article you would have done s 😉

  • I agree with sending it to the wife.  This article can serve as talking point in a marriage counseling session.  “Why do you get so frustrated when I interrupt you?”  Uhhh… read the article babe.

  • Christian

    Very well written – was actually quite interesting reading

  • Dagvadorj

    It’s maybe because we have this loosely obsessive idea that what we have in mind should better be implemented immediately. So we think about it and excite ourselves by thinking that we are implementing it and stuff. 🙂

  • This sounds familliar.

    People have ALWAYS complanted that i stay up to late and do work, but what they don’t understand is that i only get the “good” work at night.

  • Nice but self delusional. The ACTUAL reason is we procrastinate all day long and enter “i-didn’t-do-shit-panic-mode” by midnight. Add to that the reduce in distractions, and the actual work begins.

  • totally agreed with you … and today i came to know i am not the only person having break fast with father who is having lunch… 😉

    i was thinking on this from last 1 year why can’t i code in the day time when i am most energetic…

  • Boyd Parkinson

    Why is it that people assume that what is true for them is true for every one.  I suppose that it is the self centric nature of our universe but it is still annoying.  I know that  different people have different things that work for them.  It also depends on what is going on in your life at the time.

  • Zaid

    Totally relates to me. I do very little coding (more software architecture) and I do it well working late from hope. My management tolerates me as I deliver great work. Cant get much done with distractions in the office.

  • M Mohsen92

    I used to work at nights too.
    but nowadays I become tried at days and I had to sleep in attractive silent lovely nights unfotunately…

  • The Mona Lisa is not an active web site with an artist depending on it for income. You need to put a link or you’re screwing them. How would you feel if I copied this blog post and put it on my blog and said I wrote it? That’s basically what you’re doing.

  • Price95gh

    my be yes may be no 

  • Raaj

    Super article. Dalai Lama says the same. You need to be thoughtless to be wise

  • Richard

    It would also have been “nice” to obey the license terms of the original site and tell people where it’s from!

    Original comic: http://xkcd.com/323/
    License terms: http://xkcd.com/license.html

  • Richard

    The license terms on the site are *very* specific, and not particularly difficult to understand:

    “…you are free to copy and reuse … (noncommercially) as long as you tell people where they’re from.”

    Just because “everyone knows” where it comes from doesn’t mean you can ignore the license.

  • Pingback: Simon Watiau (simonw) | Pearltrees()

  • Scott Srogers

    I think people in general are making too big a deal out of ‘coding’.  Coding is much like any knowledge work and much of the same patterns apply; keeping things in your head, the cost of an interruption, quiet working space, etc…  

    I have coded professionally in CL, RPG, C (AS/400, Solaris, Linux, OpenBSD), PHP, J2EE (Struts was still popular), C++ on Windows.  I have coded as a hobby in Lisp, Scheme and the Android and iOS environments.  I still use Emacs and VIM weekly. 

    Now I prepare Power Points, spreadsheets, business plans, org charts, strategy docs etc… and it’s the same… except now my job requires the continuous interruptions.

    I think the coding community (of which I still consider myself a part) needs to focus less on ‘coding’ and more on approaching their job focused on the value they provide to the organization.

    My 2 cents. 

  • poggy

    i thought i was the only one who sleeps at 5 oclock and wakes up 12 to find others having dinner… 😛
    i think our families should read this and understand that this is normal for people like us and stop yellin at us… i really hate when they say “why r u so lazy”.. they dont know how much work we do at night while those lazy asses sleep… dumb idiots……….

  • Early mornings – much better.
    The brain has had a chance to sleep – and actually work on problems while it sleeps.
    You wake up a little bit tired, so it has the same benefit as late evening, but instead of getting more tired, you start to wake up whilst your programming, which can lead to a lot of Eureaka! moments.

    I get my best work done between 5am and 9am.
    The problem I couldn’t solve the night before, that bugged me for hours as I tried to sleep?
    Solved – my brain worked on it while I slept.
    The crappy code I created in the office whilst being distracted?
    Fixed in the early hours.

    Besides, I like to have a glass of cider or two in the evening to unwind, so coding after that is foolhardy.

  • Count me in! Always do my best writing from 11am to 3pm.

    With regards to the bright computer lights, I recommend checking out F.lux.. it makes the computer screen’s colours become “warmer” when the sun goes down (it tracks where you are and automatically adjusts).

    Definitely helps reduce those late-night hurting eyeball!

  • Nick Harris

    I think this blog post is also directly relevant to this topic:

    The author says that programmers can improve their productivity by an order of magnitude by being motivated by curiosity (rather than money, or fear of their boss) and by not being interrupted for a minimum of two hours; four hours is even better, beyond that fatigue sets in. He also talks about the relative ease with which tasks can be scheduled when they are short, or inherently interruptible. This strongly echoes your deductions about working at night when everyone else has gone to bed. Further to this is:


    This fits with my experience. I have done my best work in long focused stints from 11pm-3am resulting in Flow:


    However, it is my view that the trivia done during the afternoon: email, fora, research, hacker news is necessary to feed my subconscious and for me to fully rehearse and be able to articulate my unexpressed decisions. Dilemmas that might hold me back when I am engaged “IN FLOW” don’t trip me up because of the familiarity and growing confidence I have gained from my reading. It is as if one part of the day is for input and the night is for output. I also think that it would be a mistake to think that I could just “work” during the day even if I had no distractions as my febrile mind is sufficiently distracting to make it only suitable for surfing and light blogging – and that is without Caffeine. So, you are right to say that “being tired makes us better coders”.

    Such great insights – thanks for this…

  • Cb4cpp

    Now, did you write this non-sense at night or during your daytime?

  • Kevin Sheppard

    I, too, agree thoroughly with this article and I would like to add that the frustrations experienced from distractions from other people are amplified almost exponentially when it’s your boss asking you to stop coding to “have a look at this proposal and fill in the sections that are blank” or “can you change this logo’s color in Photoshop, please”.

    I feel like spontaneously exploding every time this happens

  • None

    I cant enlarge and read the comic you embedded, no clickable link, what??

  • A programmer

    Yeah, I recognize myself in your artcile. Well written

  • Richard
  • SpaceDoc

    My schedule when I was working on my PhD was to go to work from noon till 5 pm allowing me to take care of all of the non-real-work related tasks that my advisor or department required of me and then go home and spend time with my wife and eventually kid and then work from midnight till 5 am on the real stuff and then sleep till noon and start it all over again. 
    It was a great way to get a lot of stuff done, do all of the work and social interactions that where required and in the lateness, quite, and darkness of the night do all of the “cool” software stuff required to complete my research.

  • Scott Miller

    Right-click and open in a new tab.

  • Scott Miller

    Someone who gets it! Thank you! Now if my boss would only understand…

  • wow that was super cool…
    now i get some answers i havent got till now..

  • keefah

    Why do programmers all understand this stuff? Wanting blocks of time to construct something in your head? I don’t think it will help to let loved ones read this, they still won’t get it. I love the “poorly timed energy drink” reference. I can TOTALLY relate to this article, thanks.

  • Rico

    I used to work “shifted” hours in my younger days programming, usually 10:30 or 11 AM to 8 or 9 at night, sometimes later.  But for my own sanity (and the fact that I now want to talk to normal people on occasion) as well as my current job, I work 9-5:30.  It wasn’t easy. My mind still wants to sleep until 9:30 and be up at 2AM.  But I’m not in my 50’s and sleep is more important. I can’t function on 4 hours of sleep anymore.

  • Guest

    The idea of being “too smart” to do something, so you need to become tired (and in turn “dumbed down”) in order to do it better, strikes me as very odd.

    The problem might indeed be getting distracted and letting other people / things distract you, but that has nothing to do with being too smart. (Why don’t you have to check twitter at night? It’s not like the world stops tweeting when you should be in bed…)

    Getting / being focused is an ability that can be trained and needs to be trained, just like any other.
    Being able to block out the world when you really need to is just as an essential skill as knowing how to use your programming tools efficiently.

  • Agreed! I love coding at night, because at night there is no sense of time, like look outside at 11 AM and then at 4 PM, you’ll notice everything’s changed, the sun is gone somewhere else and birds are returning home, but at 11 PM and 4 AM it’s same, just the same silent, infinite darkness outside.
    I think I made my point, if I write anything more it would look more like a poetry than a comment :p

  • Yes, but I guess almost everyone reading this article has already seen that xkcd :p
    (Still, it should have a link)

  • Consider the possibility of having undiagnosed ADHD. You should be able to focus during the day. If not, get noise cancelling headphones.

  • Anonymous

    I think I can only agree with this. I find that a day of work sitting in front of a computer dulls my senses with the constant influx of email and IM between coworkers, and once the kids are in bed at night, it’s the perfect combination of motivation and tiredness that gets me into the “zone”.

  • Ejoell

    One think everyone seems to be forgetting is that you are not writing code to be writing code.  Your are writing code to meet your customer’s requirements.  Now everyone knows that customer’s requirements are constantly changing, no matter what “safe guards” are in place.  So in order to keep from delivering beautifully written code that has has no relationship to what the customer wants you need that constant interaction with the customer.  A number of the developers for web apps here are not only not in their company’s office, but when they are working from home, they are not available during the day at all.  The customers here on site are so extremely frustrated due to a complete lack of responsiveness to change requests and failure to meet stated requirements, that management is considering not picking up their option when that comes due.  I would not want my bosses to realize that they lost a contract because I was not available to the customer.

  • Confused

    Looks like you need to spend more time learning how to write, judging from the evidence you have supplied.

  • Confused

    I wouldn’t hire you to write code for me. You can’t organise a decent sentence: “The only one I seen do stuff like this is my boss “

  • Pingback: Man borde inte sova när natten faller på… « Skogsrå bloggar()

  • Harald Walker

    I am also one of those 11am to 3am guys. If I don’t force myself to wake up earlier I quickly fall back into such pattern. Working at home helps me to be more producting during regular office hours without many of the typical distractions of an office environment. If you google for morning vs. evening/night people you’ll find some interesting results. Studies have obviously shown that evening people are smarter and more creative, and have a better sense of humor. According to this http://www.inc.com/news/articles/2010/07/research-says-morning-people-are-more-proactive.html article it also evolves over a person’s life cycle: Teenagers are evening types; between the ages of 30 and 50, people are evenly split between morning and evening types; and people become morning types as they pass through their fifties.

  • Pingback: Shorts of Sorts: Article 1: Brain Plasticity « Revelations in Art()

  • Guest

    Or you could find other things to do besides riding someone for their typos.

  • Jwkim5050

    Well, be your own boss and tell’em leave the message after the beep while you are sleeping!

  • Minhajulshaoun

    I was frustrated as i tried to live like a normal person…, who works at day and sleep at night. I forced myself to sleep at night when there is no work pressure. But when there is pressure, if find myself reversed automatically. Your nice article explain everything.


  • Alfonso J. Ramos

    Hi, I want to expand a bit from my experience.

    One of the reasons to do not lock oneself up is because of unexpected noise. Be it music, the tv, people chatting, whatever, if it is unexpected it drags attention. One way to mitigate this is to wear some headsets and listen to well known music. What kind of music? Music without lyrics or with lyrics you know by memory, and of the type of music wont make you stand up and dance, both classic and rock works for me. Still it doesn’t replace the night but that is what I do when I get to “i-didn’t-do-shit-panic-mode” @google-b67913b0148ffcb3e9bfd35179a786bc:disqus mentions, when that happens I need the day to catch up [I wonder if that did ever happen to him]. Interestly enought part of my brainpower goes to the music, that makes sure I have no idle-thinking around taking me to check mail or something. A fast computer is vital here, if your machine is slow you start to have idle-thinking wandering around… in those “wait” moments (for example when the computer is loading something, or whatever) I can just listen to the music and be with it, I will get back to work faster that if for example I went to check mail.

    It is not about being sleepy, it is about being in the present. If you have time to expend your brain start thinking about what happened or what you will do letter, of somebody sended you a message or not, and so on. You need to get back to the present. At night you are not sleepy because you have tweaked your day like that, still it is correct it is about efficient use of brainpower, it happens just because you learned to do not put it somewhere else… there learning is where beings sleepy helps, the first days you were sleepy and that made you focus (because you had to) and you learned to think that way, later on you are no longer sleepy because you adapted youself and you are still efficient because that’s a new habit you learned.

    In fact, when you are sleepy you learn better, somehow you get in contact with your subconscious mind and that’s excelent to pay attention… but not too much to react, you are sleepy anyway… you are listening, but hey! you are sleepy… so being sleepy is not good to make things, but it is to learn.

    Yes, the awake-sleep cycle seems to get an equilibrium around 3am – 4am, it last for months, but gets disbalanced sometimes. Sometimes intentionally becuase you got to be present at xyz presentation, meeting or something. Sometimes it just happens, it will drif towards going to sleep at 6am, and after that you rather stay up one day without sleep get it right again or you will end up going to sleep at 2pm.

    Lastly, I don’t drink coffee, you’ll see, cooking recipes are algorithms. Once you make the connection and with a little research you will make your own energetic cocktails that are cheaper that those energy drinks from the store. I don’t like going out to buy those at midnight [yes, procrastination makes it’s dent anyway], also (until recently) there were no close big makets to buy those, so it was natural for me to “craft” something.

    Please add link to xkcd.

  • Bishop

    Agreed.  I need to send more money to David Cretu (Only for MCMXC; the rest pale by any comparison) and The Offspring for their unwitting assistance in grinding out some of the best code I’ve ever written.

    I’m finding I also like to be warm when I’m coding, but chilly when I’m break-fixing.  Maybe related to sleepy-brain and awake-brain. 

  • One of the best article to describe a freelancer like me and im proud of this 

  • Nice article. Interesting. Consoles me that I am actually not a dirty slob!!! 🙂

  • I consider myself as working “nights”… When I was growing up my father was a steelworker and he worked shifts.. one of his shifts was 9pm-6am.  This is my favorite shift to work and always has been.  I sleep from 7am-1pm usually sometimes I sleeep a little longer.  But consider this, 9pm-6am the phone isnt ringing, the dog doesn’t want to go for a walk, your kid doesn’t want to be fed or get a diaper change, your wife doesn’t want you to run get milk, nobody is knocking on your door..  This is the best time to work.  I keep the lights on in the room because a dark room and a bright computer screen makes for sore eyes.  Keep the room bright if you want to work best.

  • Anonymous

    Stunning insight. I really enjoyed how you analysed this excellent post and provided rational reasoning to back up your thinking and prove that your answer was in fact a more complete and in-depth look at the situation. If you’d just made some flippant remark about the author being delusional, followed by some quip about your own habits, well… I guess you’d have come across as a real jackass.
    Good thing THAT didn’t happen!

  • Guest

    This job, as well as my last, is a mid-size company with a open-air environment.  You can get up and leave to run errands, pick up your kids, go to their plays/games/etc. with as little as an email (if that) telling anyone who MAY be looking for you that you have to run.  As long as you’re getting your work done on time, it’s never an issue.  Work-life balance is something I make sure to ask about during an interview, so my feelings aren’t hurt when I need to leave early or when I choose to show up at noon and stay til 3am.

  • Ousmane Ba

    I like to call system time because I usually do more than programming. One of the things I can point to is efficiency
    there are no lulls or posing or  I would like to say “day” dream if hat occurs you just go to bed.

  • unkmar

     Sometimes the focus or anti-focus of music allows me to just punch out the code that is already swimming in my head.  When I say swimming, the code is almost fixed in form.  Variable names and some structure may bounce around several times while finalizing into digital form on screen. Other times I need to relax, have lunch or something away from the screen and keyboard.

    And/or the music becomes a distraction because I’m trying to work out a grueling detail.  At those times the simpliest of things can put me on edge.  Long sleeves, a watch keeps twisting, rings on my fingers while I’m trying to type, just a little chilly in the room.  Granted, I don’t have to be perfectly comfortable.  There are just a few things that can push me just enough out of comfort to break my, now, intense concentration on the problem.Working on bits of code that you already have formed is easy.  Working on the large problem and reworking the code takes a measure of planning and is generally slower and more difficult in any tangible form such as a paper, notepad, dry board.  The brain is simply faster, and a simple distraction and tear it down like a gentle breeze destroys a house of cards.  Sometimes I will make skeletal ideas of the program.  A generalized workflow of how it will work.  A higher level program that calls all sorts of routines that simply don’t exist yet.  Then build the guts into place.

  • Possumking

    wasn’t “reduce in distractions” the first reason in the article, and then kind of the second reason also?

    . . .

    This article could be pretty great, if it were true, but it’s not (and it’s stupid). The REAL reasons programmers work at night are:
    it doesn’t impose a time limit on when you have to stop working, which gives you a more relaxed approach, your brain doesn’t keep looking for distractions and a bright screen keeps you awake. 

  • Bogdan Dumitru

    I found out that I was most productive living in totally different timezone. For a few weeks the only way I could get to Uni and get some work done for other stuff was to go to bed at around 5PM and wake up at 1-2AM. I would then start the day off with some breakfast and tea then get to work … at 10-11AM I would probably head off to school, depending on what I had going on. Then at around 3PM I’d be back home eat watch a soap then sleep :). It was a fun experiment and I think my daylight / darkness ratio wasn’t really affected.

  • Wake up in 4-5 am and you will have all the peace you need.

  • The comment is true. Only douchebag here is you

  • Have you ever been reading a book and found your mind wandering? Or watching a slow movie and your mind wanders? Or even listened to somebody speaking very slowly?

    Your mind starts wandering and losing focus because it’s got too much bandwidth for thinking and what you’re doing simply isn’t filling it up. But when you lose too much focus you can’t do the task anyway, so might as well narrow down the bandwidth a bit for a net positive.

  • Only one thing is missing: at night all the noises of the day, all the noises we are barely aware, simply fades away. And a better silence, that silence in the night, is what we really need to concentrate.

  • There is something about mental activity when you are sleepy. I remember a book by a mother who raised a child genius in which she says her son remembered the most of what he studied just before bed or when he was sleepy

    I find that what I study in the middle of distractions doesn’t need to be revised as all the distractions around me stop my brain from galloping around and only allows me to move inch by inch through the material. On the other hand when I’m free from distractions I usually find myself missing a few points in between  or has trouble recollecting some because I tend to skim over a lot of fine points.

    But,  Its twice as hard to study with all the distractions around.

  • working night is more relaxing, co’z you can sleep ahead when you get tired 😛

  • Guest

    Of course I have experienced that. I believe everyone does from time to time.
    But that doesn’t mean I had excess bandwidth to waste.
    It means whatever my mind wanders to is more interesting / important at that time.
    Maybe an unsolved problem or something that I really liked or hated.
    It’s just another form of distraction; not seeing that, which I got distracted from, as important enough to stick with it.

    If we really couldn’t perform “low bandwidth” tasks effectively at the height of our mental abilities driving a car or reading a novel would become impossible unless we’re at the brink of falling asleep.

    Don’t get me wrong, external influences are important and having the right environment helps tremendously. But I doubt getting tired does. (There are studies showing that tiring reduces attention and coordination, while increasing mistakes, stress and accidents and that those effects increase exponentially rather than linearly.)
    I agree with your observations, just not with your attempt to explain them.

    I believe the tranquility of night (slightly) outweighs the disadvantage of staying awake for long hours.
    If you can manage to shift your whole day cycle you might actually get the best of both worlds, but I’m afraid most of us cannot afford to isolate themselves that much from co-workers, customers and the rest of the world…

  • Anonymous

    Speaking of programmers, hope you know that your RSS, Atom, and pingback are not working, giving error 500

  • I do know. The traffic has mostly melted the server these past two days so only this page, which is static, works. The links that cannot be made static (like rss) throw an error.

    But if you use the “Subscribe in a reader” link at the bottom of the post, that still works. http://feeds.feedburner.com/AGeekWithAHat2

  • Diego Schulz

    Maybe for some people. I know nothing about the pressure of deadlines or about satisfying a whimsical pointy-haired boss. I code for fun, yet the article describes perfectly my case. 

    Saludos viejo! 

  • Philou

    Mabe having all your surrounding sleeping when you code gives more room to your own thinking processes.

  • dev

    For me it’s also the pressure in the evening, that the whole day didn’t happen much… so in the evening the day is soon finished, and there have to be some results for being a good day!

  • Avihu Turzion

    I think Cliff from cheers put the basic phenomena best in this quote: http://blog.pilnick.com/post/66268775/well-you-see-norm-its-like-this-a-herd-of

  • Good read 🙂

  • Rich

    I’ve noticed that when I’m very tired I’m better at playing computer games that requires fast action. My brain seems to go into some kind of auto pilot mode where it just reacts instinctively instead of thinking to much of what it’s doing.

  • Kraphas3

    he doesn’t need to be Shakespeare to write code. 

  • Just briliant!

  • Stefy1995

    YES! you are so right!

  • Gud one dude, but even DBAs work in Night shift and hold many of them true for us also. 😉

  • This literally describes me from the last 6 months.  I was living in a different personal time zone.

  • Wickedproxy

    I am not a “coder”, but I am writing a sifi book. I do the same thing. I think about the the story as a whole and how I want it to go. Then I start to fill in the gaps and add detail to the story. An interruption brings this to a screeching halt that I usually don’t recover from that night. Doing this is nearly impossible for me during the day.  

  • Sssssmokey

    It’s not true for me, I don’t have time limits at the moment.  I just enjoy writing lots of code that I hope will eventually make me money.  They are all my own personal projects however, no one would care if I never finished them at all (at the moment).

    So maybe you and the other guy just need to get your shit together?

  • Sssssmokey

    Haha read your reply RIGHT after I posted mine.   There are programmers and people who write code for a living,  I suppose.

  • Sssssmokey


  • Sssssmokey

    I’m just leaving university, freelancing web design and working my last 6 months at the bioinformatics research lab.  I’m good at what I do, my clients  and the primary investigator of the research group (my ‘boss’) enjoy my work, so they don’t ask when I get up or go to sleep. 

    Livin’ the dream, ish.  I’d love to make that fat be-in-the-office-all-day salary but TBH I get a lot more done now than when I did work in an office.  For some reason, I just don’t get the same ‘flow’ in an office as I do at home on my couch.  Probably because I had to BE there at 10 every day.  No bueño.

  • Sssssmokey

    I liked the article, but this comment is BS.  “Everyone knows where it’s from” is probably the least valid excuse I’ve ever heard, way less valid than “Oh, I didn’t know that was a thing” or “I don’t believe in copyright law.  Ron Paul!”.

  • Sssssmokey

    The Mona Lisa is pretty boring, I’d much rather look at XKCD all day.  🙂

  • Sssssmokey

    If that is how you view coding, I can’t say you were ever the type of programmer that I see myself as.  I’m pretty sure nothing great was ever written by focusing less on the coding and more on the powerpoints.

    Windows and Android programmer?  Makes sense.  😉  (I’m just joshing ya buddy)

  • very nice and a amazing post on programmers schedules enjoy reading this post a lot 

  • Brunnengert

    That’s true for me also! I enjoy working at night, especially when I have short time limits. The only thing is … you can’t get a “normal” functioning life when you continue like this. I’m not talking about a day job or family, you can sure keep up with these. I’m talking about the Morning. It’s beautiful at the Morning, you have the hole day in front to do a lot of other things besides coding. Conclusion: Try to balance working night & day, it’s hard but it pays off!! Cheers!

  • Pingback: Почему программистам лучше работается по ночам? — Бложег Анисимова()

  • Haha, I read your comment just after sending it to my own wife!

  • Disagree with Dario, I actually identified a lot with the article, and work at night even without a deadline to meet.

  • Donlukehart

    Agree with keeping whole set of code in brain at one time. Hated it when clients would come up and say, “I know you got that whole thing in your head, but….” Then they’d bitch because it took so lone.

    :Less distractions at night. NO meetings. LOL

  • Alex

    Do you know what the license terms on the Mona Lisa are?

  • Pingback: A geek with a hat Why programmers work at night | «Rod's space()

  • Alex

    You’re confusing two unrelated issues.  You say the Mona Lisa would be OK because the author is dead, but then you say that copying is bad in the absence of proper attribution.  If da Vinci was still alive, would that make showing the Mona Lisa unacceptable, as long as it was credited?  If Swizec was dead, would it be OK to copy his blog without attribution?  You can’t have it both ways.

    The owner of the Mona Lisa does charge admission to view it.  Why is it acceptable to display a copy of the Mona Lisa for free without attribution, but not XKCD?

  • Alex

    I don’t think he ever said otherwise.  But the primary value of a programmer to an organization is the code that they write, so it’s understandably the primary focus.

  • Alex

    Not bad, but you missed the big one: historically, computing time was not cheap, and often the only free time available was at night.  It’s only in the last 30 years or so that the idea of a “personal computer” really became feasible.

  • Guest

    …and you’re the IP license nazi because…..?? trolling?

  • Guest

    It’s not “screwing them”. That’s like suing for “projected earnings”.  He’s not tarnishing xkcd’s ability to generate income in any way, he’s not profiting from xkcd’s work, and unless you’ve been in a cave all these years it’s very difficult to confuse that cartoon with anything else let alone original artwork from *this* site.

    Posting something like that isn’t an issue unless you’re doing it excessively and even then I personally wouldn’t have issue with it unless he’s specifically going out of his way to imply or directly say that it’s his work and not XKCD.  But that’s not what’s occurred.  In the context of what’s actually occurred, he’s referenced a cartoon anonymously, just as if he slapped an Apple logo on a blog about Apple.  That’s Apple’s artwork and trademark but you’d have to be as misguided as Apple’s legal department to actually take issue with it.

    If anything it’s good for XKCD…surely it reminded me of the site and I went and posted a bunch of their comics on facebook for hundreds of others to see….and last I checked that helps the XKCD site.

  • AGREED! Simple if the world around you is quieter at night. Mental resources wasted in the day trying to be disciplined and maintain focus when the rest of the world around you is awake can be applied to the code at hand instead of wasted battling distractions.

  • Anonymous

    “Somebody once likened this to constructing a house out of expensive crystal glass and as soon as someone distracts you, it all comes barreling down and shatters into a thousand pieces.This is why programmers are so annoyed when you distract them.” I’ve heard this a million times and it seems so self-congratulatory. Every professional specialty has a variant of this, essentially “what I do is the most important stuff in the world, my time is worth more than your time, etc.” As a developer who gets interrupted all day long, I am nevertheless able to get my work done in a reasonable amount of time. I don’t bitch and whine about interruptions by my stakeholders, because that is part of my job.

  • The point isn’t that you complete or don’t complete your work on time, the point is how much do you like to be interrupted?

    Instead of considering it a part of your job to be distracted, how about finding an approach that works for everyone 😉 Schedule time when you are available for interruption, then have a slot of time when you produce stuff.

  • Pingback: 12/20/2011, News « Software as Art()

  • I’m not a programmer but I feel you man! I also work this way. I feel so productive at night and I’m with you regarding your “no distraction” reason 🙂

  • f1rstman

    Did no one notice that that’s a chimpanzee brain in the glass jar?  Is this some subtle commentary about programmers in general?  :^)

    Anyways, I generally find it very difficult to work at night unless I am really excited about what I’m doing.  If it’s something I HAVE to do, being up alone late with no one around and endless distractions (e.g., Reddit) makes for an unproductive work environment.  I might try getting up early though.

  • AP

    It’s better work without distractions, without noisy telephones and context switching. This are, IMHO, the main causes that make programmers go to bed at 4 am.

  • Andreas

    Bach’s toccatas for piano or the Goldberg Variations are just perfect. Bach in general put the brain into a more mathematical mode.

  • Pingback: 21 декабря 2011 «()

  • Pingback: A geek with a hat » 5 months of blog traffic in 4 days()

  • Roberto Gambuzzi

    To be “in the zone” is quite similar to be in trans. Shamanic-programming!!!!

  • Sumitrk2002

    I think programer want to work on diffrent-different time Sometime at late night and sometime at early morning. it will create intrest

  • Guest

    I want to work where *you* work.

  • Try pair programming, problem solved

  • Pingback: Linuxette.org » Pourquoi on croit mieux coder la nuit()

  • Ah yes, the lovely glow of the computer screen invigorates me to keep pumping out the code.  That is for sure!

  • Pingback: 为什么程序员喜欢在深夜工作 - 博客 - 伯乐在线()

  • Since it seems to me that the author seems to be right in what he says, how do companies expect us to work during the day?

  • Dennis Mnuskin

    Love the article and personally relate to it 100%.  In “Bright Computer Screens” you weren’t sure if we stabilize at 3-4am because of alarm clock or social pressures. Don’t know about others, but for me it is only alarm clock.  Last thanksgiving break, having few days off, I ended up shifting all the way to noon of the following day 🙂

    This article may not have described me when I programmed in high school or college or even first few years on the job, but for more experienced developers this is definitely the case.  And it has nothing to do with just pointy-haired boss, there are other team members, QA, tech support people, e-mails, other random interruptions.  I find that most of the time I don’t even try to write code at work anymore.  If anything, I just leave early and start coding when my wife goes to sleep.

  • Pingback: 【外刊IT评论网】为什么程序员都是夜猫子 | 何振科博客()

  • Pingback: Pourquoi les développeurs travaillent-ils la nuit ? « Parce qu’être fatigués nous fait mieux coder » « la révolution pacifique blog libre()

  • And I wouldn’t hire you to not be a dick.

  • Colin Griffith

    I don’t think he meant ‘focusing on the powerpoint’, I think he meant focusing on the purpose of the work. As Linus Torvalds himself once said:

    “I will, in fact, claim that the difference between a bad programmer and a
    good one is whether he considers his code or his data structures more
    important. Bad programmers worry about the code. Good programmers worry
    about data structures and their relationships.”

    You shouldn’t explicitly focus on ‘x+y = z, return z*4’, but instead worry about ‘ok, what is x supposed to be? How does it relate to y? What do I need to calculate the proper return value, what should that return value be…’ and so forth.

  • Anonymous

    Where do you work?!

  • Anonymous

    Sure you can do that, as I did, but the point the OP was stating was the author has made an error and it should therefore be fixed.

  • Anonymous

    We’ll probably never know.

  • Anonymous

    Because he’s probably a fan of the cartoon and therefore protecting the work of the author?

  • Bill

    l think early morning is reasonable, cheating sleep is hard, you can find yourself awaking with your face on pads!! but for those wanted to attend offices/classes and need to concentrate to customers all day, l think they must have other way to make their things done!!

  • Eric

    Great artical.  This is pretty much the reason I work at night.  Avoiding the irritation of “I could get it done if you stop calling me”.   Know one is calling me at 2am.  It’s when I get the most done.  

  • Bach is so much fantastic that when I start any piece of him in my player, 5 minutes after I realize that I’m listening, not working… I stopped Bach to code, unfortunately. There is something more mechanical that have globally the same effect without any desire to really listen : electronica. Perfect. Regular boom-boom, lot of lovely electronic glitches, no melody (or so simple…). And I can code hours… electro-ambient is also perfect. There are some really cool channels on Soma FM for that.
    With Golberg Variations, just thinking about it makes my brain stopping to think about coding !

  • With your paper a lot of us are now stopping to feel all alone… Being all so differents but having this stabilization phenomena at 3 / 4 am is really astonishing.
    The bright screen reason seems to be very relevant.
    Concentration is also the mean reason, there is no place in a normal day to have 3 or 4 hours of work without any interruption. Night is perfect, it lets you “loading the context” without losing it.
    But this has a price, with age coming, your biological clock is working worse and worse and it becomes harder and harder to resynch with the “normal” world… (not speaking about the plumber that comes at 8 o’clock in the morning and you can’t miss him because he will not come again before 6 months… !).

  • Pingback: 为什么程序员都是夜猫子 | Flash开发者大会()

  • Bris_g

    I like this article. I’ve programmed for work and a hobby, and my brother has programmed for a major games company for 10-15 years. When I worked as a solo software developer for two years, I did all the health and fitness things during the day and worked during the night 6hrs for 6 days a week. I did really well, probably the best ever in my life, until I had to change back to day work. My brother worked at the office during the day from 10am to 6pm, would come home for dinner, go out, then come home and work from 10pm to 4am. We have a lot of distractions at home and we use the quietest times to get our work done. We also rely on music to block outside distractions. For two years now, I’ve used the state library in the evening after my day job to work on web projects. This is where I agree with Dad’s comment from 2 weeks ago, playing familiar music can help focus. This isn’t my golden dream, working day and night – I’d prefer my routine from when I was a solo software developer, but this is my reality for now. I agree with the bright screens but I work in the evening 3pm to 8pm and use a black background when I code. After all, I get up at 4am for my day job. Good article 🙂

  • Pingback: Konsentrasi di Malam Hari « Zaki Akhmad()

  • Jérémy Cochoy

    I write code for fun, and actually, I’m more efficient the night, between 11pm and 3am. You’re right when you say that during the day, we can’t stop looking mails, news, etc. Even if I’m in a quiet place, alone, I’ts really hard to make me do the job until the night, although it’s so easy to be caught by the pleasure of code writing after 11pm!
    But I’m thinking that, maybe, being a little bit tired could be the source of imagination and creativity.

  • Richard

    Because I like the smart uniforms and enjoy plotting world domination. :o)

    And you’re the IP-stealing genocidal maniac because…??

    (Seriously, why does everyone associate the Nazis with good manners and obeying the law? Surely that’s not the only thing they’ll be remembered for…)

  • Wow. When did working at night become a bad or poor sleeping habit? Is a good sleeping habit only sleeping according to normal society? I would think bad or poor sleeping habits have more to do with how much sleep you get vs. need, medically speaking, than when you do it.

  • Pingback: Why programmers work at night… – Odyssey Of Mayhem()

  • Alan

    Sounds a lot like ADD.

  • Pingback: Working at Night | Andrew Cross()

  • Pingback: 为什么程序员都是夜猫子 | 老邱()

  • Pingback: Les geeks sont des nocturnes - FomoBlog | FomoBlog()

  • Pingback: A geek with a hat » Blogging, hats, stuff()

  • Sawyerrken

    You are not cheating sleep, you are shifting your timezone in your head. When others are sleeping you are working, when others are working, you are sleeping (or not, that’s your choice).

  • Want to increase your IQ by 10-30 points? Use brainworkshop.net for 20 minutes/day and join its corresponding google group.

  • MoonLightning

    I just had fun reading the article

  • Jkirk3279

    When everybody else is sleeping my mind expands, as if having other conscious minds buzzing around takes up vital cycles I need for concentration.    

    I have thought that perhaps the Sun’s radiation and radio noise might have something to do with it.

  • Eila

    I totally relate to what you said here. There is “I-didn’t-do-shit” thinking too, but it’s not exclusive. Many thanks for making me feel better because society in fact does make me feel like a “dirty dirty slob.” Pfff… the world is ruled by greedy early-riser despots whose money doen’t make them sleep till 11am 🙂

  • At night we only spoil sleep to get important things done, this mean more concentration on work

  • Pingback: Why do programmers work at night? « SKC's Journey with Microsoft()

  • Pingback: Enseignement et recherche | Olivier Lafleur()

  • Francisc

    I enjoyed this, thanks.

  • RoboMonkey 4000

    I can’t code, I’m just the secretary to the robot in my head. 4AM helps me take a dictation directly rather than trying to arrange a million post-it notes … near narcotic levels of caffeine helps keep the robot running 24/7 for when someone wants me to sit at a desk during the day.

  • Pingback: Dlaczego programiści pracują w nocy? | devTalks()

  • januzi

    You have my axe.

  • Bineshperingat

    Good Post. I can relate to certain points. Really enjoyed your breakdown. 🙂

  • Stefan Beckmann

    Fuckin true…..

  • I 100% agree to you! During my 7 day winter break I used to hit bed a 3 in the morning and that was the time when I came up with the overall concept design and coding the framework.It’s 10:18 am in India now. And I can’t concentrate 100% on my codes because there are simply too many distractions.

  • TheDude

    This is all very, very true. Nice post.

    <- programmer who's been working at nights his entire life

  • Guest

     They make headphones that cancel out the CEO who arrives at 10 am and leaves at 4pm?  A “seagull colonel”, if you know the term.   They make headphones that cancel out the boss’ daughter appearing in my doorway and demanding that I pay attention to her precious problem RIGHT NOW?

  • autonomous

    not complete accurate, but everybody feels the need to explain their habits!

  • Tony Slacik

    That’s so true. Thanks for posting, now I know, I am not the only one weird “dirty slob” 🙂
    And those energy drinks idea is indeed interesting. Will see if it works. Anyway thanks again, really interesting.

  • Certainly not true for me, I’m most productive if I get up with the sunrise after a good night sleep. I find feeling alert and fresh means I feel much better about the work and subjectively I think I do better quality work. I agree that office distractions can spoil productivity, but for this programmer it’s better to start two hours earlier than work two hours later.

  • One could argue you’re still essentially working at night. Just at the different end of it.

  • i’ll keep doing it … lolz