Hacker News new | comments | show | ask | jobs | submit login
"Do you listen to music while coding?" An analysis. (themoah.posterous.com)
86 points by steveklabnik 2501 days ago | hide | past | web | 93 comments | favorite

"During the 1960s, researchers at Cornell University conducted a series of tests on the effects of working with music. They polled a group of computer science students and divided the students into two groups, those who liked to have music in the background while they worked (studied) and those who did not.

Then they put half of each group together in a silent room, and the other half of each group in a different room equipped with earphones and a musical selection. Participants in both rooms were given a Fortran programming problem to work out from specification. To no one's surprise, participants in the two rooms performed about the same in speed and accuracy of programming. As any kid who does his arithmetic homework with the music on knows, the part of the brain required for arithmetic and related logic is unbothered by music—there's another brain center that listens to the music.

The Cornell experiment, however, contained a hidden wildcard. The specification required that an output data stream be formed through a series of manipulations on numbers in the input data stream. For example, participants had to shift each number two digits to the left and then divide by one hundred and so on, perhaps completing a dozen operations in total. Although the specification never said it, the net effect of all the operations was that each output number was necessarily equal to its input number. Some people realized this and others did not. Of those who figured it out, the overwhelming majority came from the quiet room.

Many of the everyday tasks performed by professional workers are done in the serial processing center of the left brain. Music will not interfere particularly with this work, since it's the brain's holistic right side that digests music. But not all of the work is centered in the left brain. There is that occasional breakthrough that makes you say "Ahah!" and steers you toward an ingenious bypass that may save months or years of work. The creative leap involves right-brain function. If the right brain, is busy listening to 1001 Strings on Muzak, the opportunity for a creative leap is lost.

The creativity penalty exacted by the environment is insidious. Since creativity is a sometime thing anyway, we often don't notice when there is less of it. People don't have a quota for creative thoughts. The effect of reduced creativity is cumulative over a long period. The organization is less effective, people grind out the work without a spark of excitement, and the best people leave."-Peopleware[http://www.amazon.com/Peopleware-Productive-Projects-Teams-S...]

Peopleware was a beneficial book, but these stories need corroboration. I talked to one of the authors at a conference once, told him how much I loved one of their stories (that the Dutch East India Company, once the greatest corporation in the world, still exists with a mere 50 employees who do nothing but fill out paperwork) and asked him where they'd found it. "Did we say that?" he asked. Yes, absolutely, I said. "Oh," he replied. "Usually we only make stuff up for our talks, not our books."

Thanks for mentioning that. I scroll to the bottom of the book and got this for reference: "The Cornell experiment was never documented and has thus taken on the status of hearsay evidence except for those of us who were there. For a concurring view of the effect of music on concentration, see Jaynes, 1976, pp. 367-68."

"Concurring view" indeed, not an experimental study. What a weird thing for them to cite! http://www.amazon.com/Origin-Consciousness-Breakdown-Bicamer...

I agree that silence is probably better than any sort of music for programming. Unfortunately, that's not the choice programmers often have to deal with. Usually, its a choice between music and the usual office distractions (other people's conversations, the noise of people moving around, etc.) In those cases any sort of music to block out background noise is a godsend. Having headphones on also signals to visitors that one is busy and that interruptions should be only for important things.

Headphones and white noise can serve the same purpose as silence.


Correct in my experience (I sometimes work with music, sometimes with silence). Deep insight needs silence: "You want to quiet the noise in your head to solidify that fragile germ of an idea" ->


The creativity part, the few eureka I had were when pausing long enough far from the screen, be it for a pee, a cigarette, or a bike ride. Same for my colleagues.

I can believe that. I listen to music (generally sans lyrics) only when I'm doing stuff that's relatively repetitive and un-taxing.

I don't think it makes me more productive, but it does make me happier.

So yea my hypothesis is that listening to music you like would release dopamine and make mundane work more bearable. It's also how psycho-stimulants like Adderall help ADHD people focus.

Many of the everyday tasks performed by professional workers are done in the serial processing center of the left brain. Music will not interfere particularly with this work, since it's the brain's holistic right side that digests music.

Makes me wonder if one of the subconscious motives for encouraging people to listen to music in cubicleville is to subtly keep them cowed and contented with doing the repetitive tasks they are assigned without thinking too much about how the process might be improved, without asking too many questions, and so on.

Would listening to music you like also release dopamine, and therefore make mundane work more bearable?

I don't listen to music with words. My brain's language processing unit goes into action, and disrupts my ability to code.

Instrumentals, electronic music, or classical music are fine.

This. 100% this. Although, there are times, particularly when deep-diving into someone else's trainwreck, where you know that futility and defeat are the order of the day, when I'll put on Godspeed! You Black Emperor's "Dead Flag Blues":

  The car's on fire, there's no driver at the wheel
  and the sewers are all muddied with a thousand lonely suicides.
Sorta sets the mood.

I've found when doing network pentesting there's a very different set of music that works well for me compared to web app pentesting. For network testing I tend to start with movie soundtracks before moving up to rock instrumentals like east Hastings then on to harder and harder rock/metal before hitting cradle of filth.

On web app tests I normally find plaid or other ambient electronica works better for me.

For coding I find that swing, jazz and blues works best. I've been listening to a lot of cab Calloway of late which is mostly instrumental or scat focused. If theres too much by way of lyrics or if it's too catchy it tends to disrupt my concentration though.

I'd upvote this 10 times if I could. In some cases, I have to even drop music that has interesting beats, because I start trying to find patterns, listening intently to the beats, etc.

What I've found to deal with this is 2 of SomaFM's channels: Drone Zone and Space Station Soma

Turn those up on some noise-cancelling headphones and lock out everything else. Good times.

EDIT: formatting

From talking to people over the years, I've been surprised how differently people interpret music. There's a big split between the lyric driven and the lyric deaf.

People talk to me about the lyrics to songs I know and I have no idea what they're on about. I can listen to, and even sing, songs whose lyrics I've never verbally parsed. So I get on great with songs that sound good but have idiotic or nonsensical lyrics (Phoenix or The Smashing Pumpkins, for example) because I don't interpret them anyway. I have to listen deliberately and with full attention to "get it."

I find this interesting as well. It's a rare song that I like /because/ of the lyrics (or even despite the lyrics). For the most part they are just part of the music - another instrument adding complexity to the song.

Despite that, I can't really program while listening to songs with lyrics. Somewhere in my brain a thread is running parsing the lyrics and stealing cycles.

If it helps color in my picture a bit, I go to sleep listening to (spoken) podcasts every night. I can be asleep in minutes even listening to reasonably interesting content. I suspect this will bite me in the ass if I ever decide to go back to university ;-)

yah, a friend of mine claims that he listens to 'death metal' while coding - I don't believe that.Personally I go for 'Raag Deshkar' - Indian Classical Music. it's just amazing for productivity and if you want to feel like it's morning. (There are particular time every 'raag' should be played

I've used death metal to help get through code crunches. Quite helpful.

Yeah, I listen to music without words while coding or typing. I'm listening to the Tron Legacy soundtrack right now.

However, if I'm browsing/wasting time online/working out at the gym/running, I definitely prefer stuff like hiphop to keep me entertained. I think this is because these are more passive tasks.

Interesting. I can't listen to classical music when coding. I think it's because I'm used to listening to that particular style actively rather than passively as I'm used to with most music.

i can listen to trance / electronic music and it actually opens a part of my mind that is otherwise more difficult to access. pop / rock / hip hop tends to distract me. einstein loved listening to music while he wondered about the mysteries of our universe. if it is good enough for einstein...

I'm the same way, except that it gets hard for me to listen even to instrumental music at times.

In general, I prefer silence when concentrating.

Exactly, but I also throw in music from languages that I don't understand. I'm loving Korean and Japanese pop at the moment.

Damn it, now I wish I hadn't learnt japanese.

When coding I usually only listen to music if it's an album that I have listened to at least 5+ times. This works for me in that my brain seems to know exactly what parts/songs are coming next and they are no surprises/distractions.

Mixes and things like last.fm are no good because I always have to stop to see what is playing.

I listen to one particular song that I've found very mellow and repetitive (the album cut of DJ Shadow - What Does Your Soul Look Like [Part 4]). It helps remove outside noise and get me in the zone quicker.

I just stick it on repeat. It segues in and out to itself nicely too.

I was thinking about getting some other ambient music, but it can be hard to set up a good playlist.

I find it very hard to concentrate while listening to music, but even harder while overhearing other people's conversations, so occasionally the headphones must go on.

Of course, headphones also mildly discourage others from interrupting, but that's no way to live your life.

For the life of me I don't understand why cubicles are the norm for developer offices. There have been numerous studies showing the productivity effects of open offices vs individual offices. And many more studies on the importance of concentration and the destructive power of interruptions.

Do people value programmer productivity so little that they're willing to throw so much of it away to save a few dollars in real estate costs?

I used to be an individual office partisan, but after working for a coupla years in cubes with walls that come to a sitting person's neck, I find that there are a lot of benefits: I can just turn (and scoot across my cube, if necessary) to ask or answer questions of a co-worker; I can hear when people begin chattering, which is a sign that something is going on that I need to pay attention to, like the site being down or a discussion about some coding question; I have long lines of sight in at least some directions, which is nice for my psychological well-being, especially in contrast to some office without an outside window.

The main thing, though, is serendipity: overhearing party A ask party B a question to which party B doesn't know the answer, but I do, or hearing people planning to have a meeting I'd want to be in, but which they don't know I'd want to attend, etc. A closed office would be slightly more useful when head-down coding for hours or days at a time, but so much of my time as a developer is spent chatting about coding, helping people solve language or environment problems, talking with users who wander in looking for help, and other miscellaneous interpersonal activity that a closed office would hamper my job quite a lot.

My question is how many of those cited benefits are actually benefits. For example, it may be very convenient for you to scoot across your cube to ask questions of your co-worker, but is it convenient for him or her? Are you making sure that you're not interrupting anything important (and remembering that asking for interruption is an interruption in itself)? Overhearing and acting on conversations might be nice, but it might be equally troublesome, especially where one might be seen as meddling.

I'm not minimizing the importance of communication, but I'm wondering whether the benefits you've cited are actually worth the costs to yourself and others.

Are those benefits that you wouldn't get in an open office? Personally, I prefer the open office, with 2-4 people in a room together, and feel like cubicles are the worst of both worlds. With the cubicle, it's like you're cut off from everyone else, but without the benefits of actual privacy.

Those benefits are not worthwhile to me personally. I want to code, not constantly overhear office chatter.

Then you could work at home, no? For me development is teamwork, and we do it in a war room, wich like extreme cubicle. It works very well, just isolate with headphones and heavily use chat, even for people at your desk. Ask the team to receive calls outside and to talk softly to each other.

Yep, working from home is great. Or within an office with an actual door.

I've tried having this conversation so many times at my current place! We don't just have an open plan office, we have a huge open plan office with a mix of developers, client facing staff, managers, secretaries, phones going off, people wandering through to the kitchen or toilets, small meetings going on around tables.... It's a terrible work environment for actually getting to focus on what you're doing, yet any suggestion that we might do better with more secluded, private space is met with ridicule.

A new head honcho is not long in post, and has decided to make his mark by moving the entire department into newly refurbished offices at a cost I understand that's about equal to 3 months salary per head. The plan is for long rows of desks so we'll have even higher density and less private space. I'm not optimistic for its effects on the department.

I just quit my job over a similar issue. I was doing tech support and repair work but the bosses insisted on having all of us do everything with no division of responsibility. So out of a 9 hour day of constant interruption answering the phone and front desk, I got maybe 1 or 2 hours of repair work done.

I finally realized that I can make more money freelancing on my own, since they charged $99/hr but only paid $15/hr. The levels of inefficiency at that job were staggering, and I muddled through for 3 years.

Now I am living the dream coding on my own and don't look back. The funny thing is, based on my pay stubs and commission, I know I was making them on the order of $100,000 per year. They only acted like they wanted me around...the day I gave notice.

If your employer doesn't understand these concepts, then you may have to think about finding other work with people who are more at your level. You won't regret it.

I work in an open plan office as well... And it is a mix of client facing staff and developers. For them it works really well. Not so much for us devs. Sennheiser CX300-B's are a real life saver. I tend to listen to Daft Punk or other music that I know really well (with the general exception of classical). I have found that brown noise also works very well.

I've got the music and some reasonable headphones, but I still find it pretty poor. Partly because an iPod on shuffle really isn't very good for filtration unless you set up a lot of enormously long and specific playlists and that takes forever!

For someone else who asked about HH's desk location - yes, he actually moved from his precessor's private office into the bearpit. However he spends so long in meetings that he's very rarely at his desk. Which also helps to explain the new 'clear desk' policy that will leave the office looking immaculately tidy overnight for the cleaners, security and any burglars ;-)

It's even worse if, like me, you're diagnosed with adult ADD. Something that would take me 5-20 minutes in a quiet environment can easily take me a half day in a distraction-prone open office environment.

I got evaluated for adult ADD because of similar productivity issues. It turns out I'm just really bored and unmotivated by the work I'm doing.

Does that head honcho sit out there with all of you, or does he/she have a private office? Just curious.

Not sure about the parent poster, but in my case, yes. Well. The head honcho's for that department anyway.

Oh the joy of an open office landscape!

Brown noise (from simplynoise.com) works wonders for me. I can work in a room with the TV on!

I'm surprised hip hop isn't on the chart at all. Am I the only one who listens to it while coding? I switch between that and hard rock.

I've never really had any problems with words in music being a distraction. I read somewhere that singing and talking/writing are two completely separate parts of the brain, which is why some stroke or brain damage are able to sing before they can talk.

Also, I prefer speakers to headphones, which is one of the reasons I opted for an actual office instead of working out of a coworking space.

I echo your tastes, probably. I bounce around from The Prodigy to Nine Inch Nails to A Tribe Called Quest, to Tool or Rage Against the Machine.

And I find listening to music of any kind helps me fall into zone-coding a lot faster.

I like to listen to older funk. wefunkradio.com is my go-to online music source.

Classical is good too, but lately I've not chosen that much.

Lately I've been listening to a lot of The Roots while working. I can pop on the head phones and get into an instant flow to them.

Was going to say the same myself but saw you said it first. Hard Rock/Rap is my usual choice for coding sessions.

I actually listen to television while coding, almost always Futurama or It's Always Sunny in Philadelphia. I've gone through all of the seasons of Futurama 3-4 times in the last couple of months (at least it seems that way), and gone through the latest season of "Sunny" about the same.

Something about Futurama especially is just the right (I don't have a property to describe this...) color to keep my brain right in the sweet spot.

I actually feel a bit bad for netflix because of this. I'm almost constantly streaming futurama in my house, it wouldn't surprise me if they were losing money on me as a customer.

I now listen to white noise while coding. I have an mp3 called 'Lost In Space' from a CD called 'White Noise Therapy,' which I play on repeat. It's the sort of sound effect they use in sci fi films when a big space freighter drifts onto screen. It helps because I can turn it up to shut out other sounds, but there's nothing there to follow or analyse whatsoever. I get a nice clear head with that.

Sometimes though if my concentration is more robust for whatever reason then I can afford to listen to some music - usually instrumental jazz or classical.

:) I use White Noise app on Android and use Extreme Rain or Beach or Windchime sounds.

Also, instrumentals without vocals (taken from Jamendo [particularly that of artists Silence / StrangeZero], or mellow ones (SomaFM Lush) are others that I play in background. Helps me a lot.

>>instrumental jazz or classical

hmm. Even this, I like. Jazz / classical piano/violin. [ e.g, OSTs from The Conversation, by David Shire]. At times, even celtic music helps for me.

I was never able to listen to music while coding until someone here on HN suggested creating an Abakus channel on Pandora. Now it's Pavlovian, and I find I'm able to get into flow sooner. Even if it's psychological, I'll take it.

You're welcome! :D


(may have been me)

Yep- that's the one. Thanks!

I'm a huge metal head, but unfortunately most of that music easily distracts, whether it's the vocals, some killer riff, a favorite solo, etc. I think a big reason I've been adding some post-rock (Sigur Ros), trip-hop (Massive Attack) and dubstep (Burial) to my playlist is because they're moody yet rarely depressing. The vocals are minimal, the beats slow paced, and the samples interesting but not distracting. A new favorite of mine these days is the Lush channel on Soma FM.

I love music, but I've never been able to work while listening to music. If it's music I enjoy, it consumes my attention (see quote below), especially if I'm familiar with the specific songs. I don't like listening to music on "broadcast," so I'll almost never enjoy a Pandora station even of a genre I generally enjoy.

"Music is the pleasure the human soul experiences from counting without being aware that it is counting." -Gottfried Leibniz

Personally, my friends and I have started listing to Dubstep. Just few enough vocals to be distracting, but still interesting.

Personal collections or something like glitch.fm?

Either by typing "dubstep" into Pandora, or http://dubstep.fm/

I'll check out glitch, though, thanks!

Music or not I'm guessing the problem that most people (programmers, in this case) have is the inability to focus/concentrate for a certain period of time and what they do is to find something to cling on.

What if maybe the way we work as a developer can be improved? What if we should think outside the box and be a problem solver not just in coding, but also in real-life?

How about breaking a big task into smaller chunks of 5 minutes tasks? I've seen plenty software developers who just put their head down and start coding immediately without some planning. I've seen developers to take on complex problems with no plan or strategy.

What if the problem can be solved within 5 minutes, the developer should grab a few other developers and start brainstorming? Make a decision tree. List options.

I mean... it's not that all of us need to solve Google type of problems. Even a Math exam question can be done (and should be done) within 5-15 minutes.

regular listener to the following online radio stations, falling in that 22% who listen to electronic

Sense.fm (trance), chilltrax, Trance clubber

I think the main reason is when in the office environment other peoples conversations is more distracting than music, so a good pair of headphones really helps

When i studied traditional animation (drawing), I was always reminded not to listen to music while working... I picked up the habit even while coding and doing anything basically. I also had a problem of concentrating or being in the zone while listening to music while working... however, as of recently, I've tried experimenting with listening to music while working, again. I found that I have no problems with concentration anymore, and I find it quite enjoyable working along with music - BUT, I found out that I do less work while listening to music as opposed to sans music. Not by a large margin, but I think I'll listen to music from now on, since it's more enjoyable experience.

I usually end up listening to bands like Sunn or Om. Super slow, heavy, and they don't take over what I'm doing.

When I put on faster paced metal of any variety I find myself tapping my feet with the bass drums and then tapping with my fingers, then I'm hooked.

I think oomwriter (http://www.ommwriter.com/en/) is a good demonstration of ambient music and typing sounds. Sadly the editor sucks for coding and I deal with three platforms, not just Mac.

I freaking love this little music track from oomwriter:


I've been trying to assemble a collection of similar ambient music and haven't yet figured out the magic words to feed Google.

Edit: Oh hey, the youtube vid mentions the composer put together an album. Must buy.

I've been trying to find out music like this on shoutcast! If you know of any streams that play this type of music, do share.

I guess I'm in the 22% that listens to either rock or hard rock...but it has to be my own music collection. If a song I've never heard before comes on, I'm liable to get distracted.

It may seem cliche fancy but I can go for hours with smooth jazz sax in the background. no lyrics help me focus on the task at hand while my mind can be in a relaxing/stimulating environment.

By this I mean most jazz music is slow-tempered and chill-out while also offering impressive musical talent for lead instruments (sax solos, piano, strings...). This is just what works for me - a buddy of mine swears on the Kingdom Hearts soundtrack.

I wonder if being able to code while listening to music has anything to do with gender; I am a female developer, and can't listen to any kind of music at all while programming -- I find it as distracting as if a cat were jumping on the keyboard. Perhaps because female brains tend to have more connections across the halves? (...or perhaps because I'm a musician myself, and process music differently?)

I'm a dude who's also a musician and can't think while while listening to music. However, some coding tasks don't really need music, so I'll listen to it from time to time.

I use to work in a noisy office environment where silence wasn't really an option. The best solution was noise canceling headphones and a white noise generator. I now prefer this over silence any day.

Here's a great native Mac OS app for that (source available):


I has White, Pink, and Brown noise with an adjustable filter.

Give me some Synth Pop anytime when I am working. I don't mind the words for two reasons: 1) usually they are distorted enough for me not to really understand them or 2) I know the song so much singing along is a nice break.

Try out some Hot Chip next time you are in the coding zone and tell me you are not in love ;-)

I was hoping this was going to be an analysis of how listening habits correlate with productivity. I'm sure it comes down to personal preference and a host of other factors, but it'd still be interesting to see if there's a statistical difference between different genres or no music at all.

I have an office with a door that closes, but I usually leave it open and play Soma FM's Drone Zone quietly in the background. No vocals, little to no rhythm, and helps to put my mind in a slightly far-away place where it's just me and the problem I'm working on.

I listen to music about half the time I'm coding, but I almost always have my Bose QC 15's on. Wearing them with no music playing blocks a ton of distracting noise out. While expensive, they're one of the best investments I've ever made.

A problem I have is repetition, a song can be really good but it quickly loses appeal if I listen to it multiple times without other songs in between.

Like others here lyrics don't really bother me because I'm listening to stuff I have heard before.

Interesting. I find the only kind of music I can listen to that doesn't seem (as far as I can tell, at least) to interfere with my ability to do hard creative work is deep ambient: Steve Roach, Robert Rich, that kind of thing.

I can't stand total silence. There must be some music, people or I'll go crazy.

I can confirm the experience of others in that I have no particular problem listening to music while coding, but music with distinguishable lyrics is more disruptive to concentration.

It really depends on the situation. If I have a clear direction to go in music can help keep me in the zone, especially jazz. If I'm unsure, it can just be distracting.

Pandora > Create New Station > "Ratatat".

I watch movies and TV comedies while I code often. If not, I usually have music TV on. Working from home rocks.

I listen to any or all of those depending on my mood (including silence, excluding white noise).

I've been using nature sounds recently. No words, no song changes, and relaxing.

AOL Radio 00's and 90's Alternative channel, sucka!!!!

Ugh. E-Branding.

On topic, music without lyrics is the way to go.

Every time you code and listen to music, should you be paying the musician for the performance? I say yes.

Only if I get paid every time someone runs the code.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact