Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The Coding Zone (paulstamatiou.com)
157 points by tortilla on Oct 23, 2011 | hide | past | favorite | 65 comments


"I must have a seemingly endless block of time at my disposal."

For me this is the most critical part. It's not enough just not to be interrupted. I have to feel like I couldn't be interrupted.

That's the great thing about programming at night. If everyone else is asleep (except other people who don't want to be interrupted) they won't even think of interrupting you.


For some reason, I always find Friday afternoons the most productive "office hours" time; I suspect because people are too busy thinking about their weekends, too busy wrapping things up, or some other reason I'm not aware of.

Sometimes, I wind up working late on those days because I lose track of time and I actually don't mind. I find zone time related to my personal happiness, if I don't get into the zone, I become short fused and frustrated.


My most productive time is after midnight. The streets are quite, the house is asleep. Besides me, only my dog is awake, and she's only half awake, doing her job watching me.

Lucky for me, I'm one of the principals of the company. So I can work till 4am and stroll into the office at noon.

By the way, the music I zone out too is classical. I have playlist of symphonies and after each one I stretch out. when Strauss' "Also sprach Zarathustra, Tod und Verklärung" are (is) over I know it's time to stand up.


Why don't you make that policy for the rest of your company?

Or look at your workspace and figure out why the fuck people need to stay up until 4am to be productive, rather than being able to, you know, work, at work?


I'm a night person. Always have been.

As for the 2 programmers who work for me (the rest of the staff have to be there 9 to 5) they can work anywhere anytime. I care about results; meet your schedule- you can work from the beach if you want (I live in South Florida).


This matches my own experience with productive nocturnal coding marathons.

There's something very tranquil and calm about knowing the outside world is asleep. The dark has the effect of making it hard to see anything that isn't immediately in front of you, so when you're coding you don't see anything but the screen and the keyboard.

It kind of gives you nothing else to think about other than the problem to be solved.


I'm glad to know I'm not alone in this. Early mornings and late nights are both good... but during the typical work day I find it nigh on impossible to really be productive at the office.

It reminds me of this talk by Jason Fried, which is so obvious but no conventional workplaces solve these issues: http://www.ted.com/talks/jason_fried_why_work_doesn_t_happen...


I'm criticlly dependent on these little ear plugs, only way to control your environment

http://www.walgreens.com/store/c/mack%27s-ear-seals-dual-pur...


The problem is the people who tap you on the shoulder, or worse... those who know they shouldn't disturb you so hang quietly around your desk until you give up and make eye contact or otherwise acknowledge that they're there.

They succeed in disturbing you without actually disturbing you, it's great (for them).


My "extracurricular" coding is at home, surrounded by a family, and the potential distraction aspect of not getting into the "zone" is near and dear to me. While I'd like to have a perceived endless block of time, I've learned to live without that bit. But I've not learned to get into the zone with the threat of interruption. I can do "light" coding activity, but for something in-depth I usually have to bolt to the library or a cafe for an hour or two. Yes it is time bound, but I know that no one is going to step into the office for "just one thing"...

(These jaunts only happen about once a week though, so the output on my hobby projects is pretty weak.)


I picked up my nocturnal programming habit during my undergrad long ago and now that I'm a father, it's even more necessary to really take advantage of those night hours... It also gives me the chance to speak out loud to myself when brainstorming or a brief self-congratulatory dance without getting weird looks ;).


Almost any programmer can be super-productive under such ideal conditions as "no chance of interruption". The challenging thing is to be productive under less optimal conditions. For example, how would you get programming done if you actually get to the point of having paying customers, and you can't just tell them "leave me alone, I'm in the zone, call me back in 8 hours or maybe tomorrow, and we can talk about that bug that's keeping you from logging on"?


I can see both sides of this.

Yes, the superstars are productive despite interruptions.

Most programmers, however, aren't superstars, or are vastly more productive superstars when they can work without interruption than even those who can tolerate a highly non-optimal environment.

Some level of task-switching is necessary, but as the other respondent said: this is what a PM or support triage role is for -- figuring out how to schedule stuff for your limited attention without breaking the conditions that contribute to your productivity.

The research behind uninterrupted periods of work is hardly new or novel: The Mythical Man Month, The Psychology of Computer Programming, Peopleware, Flow, and other books span a few decades.


You get a support person to triage said items and to put them in a bug tracker so that you get to see it show up when you go and look at the bugs that need fixing.


Do you have paying customers or are you creating artificial problems?

In this example, you can either delegate the support or use processes so that customers aren't calling you when you're coding.

EDIT: Don't be a defeatist towards productive programming! You can create the environment, and you should.


I always felt in the zone with a beer, late at night. Bit of Justice or something on Spotify (or otherwise set to some sort of chilled out dubstep playlist), lights dimmed, and off I go.

Now being actually employed, I don't often do much at home (and don't even have a desk any more). There's not much concept of a zone there and I've become more collaborative and less engorged by my work. So it's more about throwing ideas out there, engaging in discussions, and talking through benefits and implications.

So in that sense my coding zone is less about blanking out the rest of the world and getting shit done like it used to be. It's mainly about being on top form with new ideas and creativity.

Aside from all that, I don't understand the caffeine thing. It's almost a stereotype. A good cup of tea or glass of water does me better.


  > I don't understand the caffeine thing

  > A good cup of tea [...] does me better.
But tea has caffeine in it. Did you mean decaf tea or herbal tea (aka an infusion, since there are no tea tree leaves)?


My wording was bad but I meant that I don't drink stuff just for a caffeine boost. Espresso and Rocket Fuel and Red Bull/Relentless don't even register when it comes to needing a good drink.

If anything, I feel the come-down more than the pick-up.


Caffeine keeps you from sleeping, but it does not make you awake. At least that is how I feel.

Also, I vastly prefer tea over coffee. Usually green/white tea, or mate tea (even more caffeine) or some herbal stuff.


I'm one of those weird people that finds music distracting.

He didn't mention his computer set up very much, even though he has a pretty good one. Personally I'm going to be 100% more productive if I have a second monitor so I can code in monitor 1 and have documentation opened in the other.


I'm the same way. I never listen to music "casually" or in the background. All music is either something I'm really into, in which case I listen very actively, or something I don't care for, in which case I'd rather not be listening to it.

One potential exception that I've experimented with is classical music, but the high dynamic range (which is awesome) makes it difficult to listen to on headphones because parts are too loud and parts are too quiet.


I can listen to music when I'm doing easy work, but not hard work. I can listen to it while tracking down a bug (most bugs, anyway) but not while making something new.


I'm kind of the same way, but it depends if there is someone singing in the music. I find vocals distracting when I need to concentrate. Also, listening to my favorite music is distracting. To concentrate when working on something difficult, it helps if I choose music according to these criteria: 1) no singing in the music, just instruments 2) listen to music I don't love, but moderately like, such as jazz, classical, or trance. (I love vocal trance, but if I want to stay in the zone, I listen to instrumental trance).


Same here. Music helps me focus on easy tasks, as if it were using idle brain cycles that would otherwise get bored and seek distractions. Conversely, when in deep thought, music feels like an unwanted distraction and I get an urge to turn it off.


I'm one of those weird people that finds music distracting.

Personally, it mostly depends on whether it has lyrics or not. Currently I've been listening to Bitches Brew (previously it was Unit Structures) and they work fine in setting a good mood without being distracting.


I much prefer to have vocals in my music, so my solution is to listen to songs in a language I don't understand or no language at all — Faye Wong, Cocteau Twins, Sigur Rós, etc.


I find that Trance and other electronic music like the author listens to works well with coding, I listen to DI.FM's trance station all day/night while working despite the fact that I'm a big heavy metal fan and wouldn't normally listen to trance.

I find the lack of lyrics, and the fact that it's not a song I particularly love (ie, I'm not going to get distracted by how good the song is), makes it fade into the background - behind my thoughts.


I love listening to music when doing the easy parts of an application, like crud code, light refactoring, etc. If I have to really think about something, I find myself having to turn down the music, as it becomes distracting.

Agree on the dual monitor neccessity.


Thirded on the dual (or more) monitors...

I find different types of music helps me with different types of work. For example, if I already understand a problem very clearly and have visualized most of the code in my head (and it's just a matter of typing it in), I like stuff with a very fast tempo - tends to be electronic.

However, if I'm just beginning to work through understanding a problem, sketching solutions or writing notes on my notepad, I like something very dynamic with lots of structure and intricacy - usually ends up being classical music, with an emphasis on piano concerti.

The only time I need absolute silence is composing e-mails or that sort of thing. Somehow forming sentences or otherwise writing in good, concise, coherent english requires a part of my brain that typically is free to listen to music. Maybe something to do with verbal/aural understanding.


With music, it depends on my moods. Regardless, having headphones on always helps. Regardless of music playing or not. Helps to block out other sounds.


Just get a single display that does 2560x1600 and this:

http://mizage.com/divvy/


As far as coffee goes one of the things that works well for me is what I call "rocket fuel", get a quad shot of espresso and dump honey in to taste.


Coffee doesn't do it for me... it doesn't create more energy - it simply takes what your body is storing for later and gives it to you now. Which is good, except when the afternoon rolls around and I'm falling asleep in my chair as I pay off my energy debt.


I find green tea or oolong. Basically the only prep is adding hot water so it is easy to refill and keeps me in the zone (and with a warm drink) longer.


You raise an interesting point. I drink tea too, and I discovered surprisingly recently how much of the work is done by the heat rather than the tea. Sometimes now I just drink hot water.


Funny, I call what I drink "rocket fuel" too, but it consists of acceptable coffee, muscle milk (it could be whey protein), and dextrose. It's part of a pro-brain diet.


No mention of the chair? Heresy. I'd say it was easily the most important thing I bought (after the laptop). I can live with cheap headphones.


Very true, my PC and my chair are really expensive in comparison to everything else in my room.


I find it easier to get into the zone after morning exercise.


Doesn't have to be after exercise, but if I haven't gotten sweaty in a day or two, productivity lags.


As far as what my coding zone looks like, ours are very similar.

I have found working at night is the best for me.

When I'm coding I find that interruptions don't bother me, because I usually become hyper focused and I block out everything around me.

Strangely enough, I like to watch movies while coding. Preferably ones that motivate me like Limitless, or V for Vendetta, or the Social Network.

Turns out, if I have music or tv playing in the background that works just as well.

I try to eat health and, I don't drink pop or coffee (they make me crash hard once I break out of the zone.)

Finally, once I start coding I must finish what I sat down to start. That way each time I code, when I'm done I feel like I have accomplished something. Which in turn makes me want to do it again.


I think headphones might be the single most important business purchase you can make. I splurged and bought the Bose QC15s, and no matter where I am, I can put them on and simply zone out the rest of the world. Sometimes I'll put them on, and when I come up for air the entire place will be full of people that I didn't even notice sit down next to me!

Also, like he said, have some "work music." I have 80s radio on Pandora that I've fine tuned with many a thumbs-down. I can be lethargic and unmotivated but once I sit down, put on the headphones, and play some Pandora, I can get into work zone quickly.


I'm wondering what chair people suggest, I use a rather generic chair from Office Depot, that was only about 100 bucks. It's ok, but not great, also getting a bit old. Mind you this is while working at home.


Our whole team got the insanely expensive Aeron Embody chair (which are on bi-yearly sale in November for $1050.) At first I sat in it with guilt and thinking it wasn't worth it.

Now I am about to buy one for my home office. The posture becomes comfortable and provides a wonderful break from standing at our new GeekDesk 2.0.


Do you mean Herman Miller Embody? Or Herman Miller Aeron? They're separate products I believe.


I used to have a Herman Miller Celle that I loved (a lower range Herman Miller) but after a year or two the seat bottom cloth got worn out pretty fast. I ended up selling it when I moved. Now I have a Stealcase Chair I purchased from a YC company that was moving (about $150 used). It's not one of their high-end ones either and looks pretty ugly but it's very supportive and firm. I wish the back was higher though.


For the cheap people (like me) may I suggest a rather awesome chair from IKEA: http://www.ikea.com/us/en/catalog/products/90163889/ . It's around 60USD (was ~100CHF for me here in Switzerland).


hated that chair, we have these http://www.ikea.com/us/en/catalog/products/00103102/ they are pretty okay, comfortable and such, not too adjustable though(non-adjustable armrests are the only thing I dont like about it)


What chair is Adam Sender using in this pic of his 20-monitor set up (http://www.oobject.com/trading-places/hedge-fund-manager-ada...)?


I love my Aeron. I have had a dozen cheap chairs all the way down to metal folding ones, and eventually I just got tired of replacing them every 12-18 months.

My Aeron looks exactly like it did when I got it nearly a year ago.



"Music"

You need a company Anthem, even if the company is just you. That one song that makes you feel like TODAY IS WHEN I KNEW I WAS GOING TO MAKE IT. When you are ready to start working, blast it before any other song.


Perhaps obvious but for Spotify usage, just discovered today that you can change the track to next one without actually going to Spotify by just pressing the >> key (F9) on a Mac.


My UsesThis:

    Club Mate
    Aeron
    MacBook Pro with an SSD (you never know how much time you wait for seeks until one day you don't)
    Dell U3011 @ 2560x1600
    Divvy
    F.lux
    Vim
    M-Audio FastTrak Pro
    AIAIAI TMA-1
    Apple corded keyboard
    A mouse with extra buttons mapped to switch desktops in Lion
I like to keep things simple.


I like the coffee mug and more importantly the glass of water: always keep hydrated during coding runs!


Can anyone suggest particular USB DACs? Preferrably ones that work on Linux.


Take a look at these:

PreSonus Audiobox ($150) http://www.presonus.com/products/detail.aspx?productid=53

FiiO E9 ($110) http://www.amazon.com/gp/product/B004M172FY

Peachtree Audio iDac ($1000) http://www.amazon.com/Peachtree-Audio-idac-Digital-Converter...

or the Nova for just a bit more and it has a tube and built in amp: http://www.amazon.com/Peachtree-Nova-Integrated-Stereo-Ampli...

The latter is what my cofounder has (pictured in my post in the background on the window sill) and loves. He also had a Decco for a while (before realizing they were underpowered for his speakers): http://www.youtube.com/watch?v=SljFut8cUnc&feature=chann...

A few more that I'm not too familiar with: http://www.amazon.com/Audiophile-Products-Fubar-Plus-Headpho...


any usb dac should work on linux; they appear as standard audio devices (and this doesn't depend on the make much - there are bunch of standard chips that everyone uses as usb interfaces). certainly the musical fidelity v-dac does, but that doesn't include a headphone socket (they make a separate headphone amp). if you just want something simple, i'd suggest a nu-force icon. if you want something obscure and boutique, have a look at audio-gd... if you want the latest technology check whether it supports "asynchronous mode" (audio-gd don't, generally; music fidelity v-dac ii (just released) does; icon doesn't; you can also buy "digital interfaces" that do async-to-digital, like the mf v-link) - they are supposed to reduce jitter (timing errors).

i am not guaranteeing you will hear any difference between any of the above ;o) i own the v-dac (i), which i feel improved the sound of my logitech duet (less abrasive), but that is feeding an amp and speakers, not headphones.

also, on music while programming:

- i find that if i need to concentrate, the music just disappears into the background. it's not like i need to switch it off, it just becomes irrelevant.

- i wrote some code that uses last-fm data to construct playlists of related music. if you have a lot of mp3s and want to listen to "random but related" music, this works great. it's not packaged nicely, but if you're used to hacking python you should be able to get it working - http://code.google.com/p/uykfe/ (as well as generating standalone playlists it talks directly to logitech's squeezecenter to dynamically select music).

- i may be showing my age, but fleetwood mac's rumors or nirvana's nevermind are my go-to albums for difficult bugs.


If you're interested I knocked up this to make some playlists to listen to ... pretty crude but works. http://fmix.heroku.com Enter artist or artist & track name.


Might look into hooking the last fm code into YouTube. Thanks!


There's a good list here: http://www.head-fi.org/products/category/amp-dacs

I was eye-ing NuForce Icon (can't remember which exact model) about a year ago (have dropped this requirement since)


music is definitely key. I find sometimes I need something with a good beat to act like a metronome. the beatles is a good one these days.


+1 on Trance Around the World!


Surprised to find no mention of Caffeine !!


"Honorable mentions: A depth charge or cappuccino on my desk"?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: