Ask HN: What do you listen to when you code?

22 points by netconnect ↗ HN
I like to listen to indie rock whenever I'm writing anything, other people I know think that classical or tribal (ugh.) music is the way to go.

What gets your mind going? Do you need total silence or are you incapable of coding without your favourite tunes?

64 comments

[ 4.4 ms ] story [ 142 ms ] thread
If the coding is routine, I sometimes listen to my favorite music (EBM or psy/goa trance) while coding. I especially like to listen to music while coding if I'm in a noisy environment (earplugs are good too).

However, when I get to a really difficult problem, I prefer total silence without any distractions. Again, earplugs are good for that. But if I need to, I'll go for a walk somewhere quiet to think about it (somewhere with a whiteboard, and/or maybe talk the problem over with a friend/colleague). Or I might even have to sleep on it. In all of these cases, there's no music involved. Music is more for the relatively easy/routine coding.

Same here. Basically, I don't want music while I'm in the process of figuring out how to go about doing something, but there's nothing better than a good beat (Infected Mushroom for me) while actually doing it.

When I'm doing design, music just distracts me -- but when I'm hammering out code, a repetitive rhythm definitely helps to keep me focused. It is strange that music has different effects depending on what kind of thinking the brain is doing. I wonder why that is...

Lately:

Rock (Tool, Porcupine Tree, Pink Floyd, Rage, Muse) Post-Rock (Explosions in the Sky, Mono, Pelican, Mogwai) Hip-Hop (A Tribe Called Quest, Gang Starr, Outkast, Digable Planets, The Coup)

The post-rock/instrumental stuff probably works the best since you aren't tempted to sing, and it helps to listen to something that is a little more repetitive.

very true about the post-rock (I listen to Mogwai while coding as well). I'd add movie soundtracks / scores to the list for the same reason. Still a huge fan of the Battlestar Galactica soundtracks, esp season 2, and pretty much anything done by John Murphy (28 Days Later, Miami Vice).
just wanted to say: porcupine tree++. i do listen to a lot of post rock (mogwai of course, kinski, explosions in the sky, and post-metal like isis, neurosis, cult of luna).

i'm probably one of the rare developers who listens to a lot of death metal though. the mathematical structure and intensity helps me get into that "flow state".

a really nice set of studio quality headphones is one of those things that i consider a professional necessity.

Old Metallica always does it for me.... actually silence is usually better but I don't get that very often around my workplace.
The Code Of The Streets by Guru and Premier huh? You know how we do it!
Two more good post-rock bands: ISIS and Red Sparowes

I also like to listen to some down-tempo/electronic stuff like Thievery Corporation, Kruder & Dorfmeister and Sound Tribe Sector 9.

Slayer.

If that's not available, I love classical.

I like the classical and chill selections at http://icebergradio.com
I hadn't heard of this one before - I really like the Comedy channel. Been listening to it doing some mundane work.

I think I will be switching between Grooveshark and this depending on the type of work I need to concentrate on.

Bach. I find it perfect for coding because Bach is mathematically and algorithmically beautiful so it gets the mind working in those ways.

I find IDM, electronica to work pretty well too. Autechre, for instance.

If I am at my house, then I like blasting the music as high as possible. Me sometimes getting up and dancing really isn't a problem because it only means that I'm in a good mood and the coding is easier. (Of course I sit back down and code vigorously to make up for lost time afterwards.) However, if I am in a public place, coding can be hard because I don't like hearing people shouting (who does? the shouter?) so I prefer silence in that case, but when you are at home and have the ability, whatever music you like- you should play.

I listen to a lot of hip hop and rap, so I start break dancing and crypt walking. Pretty sweet I know =p

Is there a rationale for this? I read on wikipedia but couldn't find anything - have links to any good papers?
White noise is a common synthetic noise source used for sound masking by a Tinnitus masker.

White noise machines are sold as privacy enhancers and sleep aids and to mask tinnitus. White noise CDs, when used with headphones, can aid concentration by blocking out irritating or distracting noises in a person's environment. In open plan offices, large corporations such as ExxonMobil apply white noise to reduce the reach of speech, thus, by preventing office staff from being distracted by conversations in the background, safeguarding productivity.

Source: http://en.wikipedia.org/wiki/White_noise

Thanks for this, I usually listen to deep house/trance, but this is really relaxing.. I especially like the brown/red noise with oscillation.
(comment deleted)
Anything really (rock to trance), but i will turn it off when i have a really difficult problem that i havnt solved before or if i am learning something new.
Bach. Any other music causes me to lose focus. Total silence drives me slowly insane. Bach is just perfect.
And no other 'classical' music does it for you at all? You'll excuse me if I find that hard to believe.

Probably because I haven't really listened to Bach (youtube et. al. are blocked for me so I can't go and listen right this instant).

I like violin, cello and piano. No singing. I can't work when listening to opera, for instance. Italian opera is almost OK, but German opera is too distracting.

Classical composers other than Bach would probably work, but since most of the classical music CD's I have are Bach CD's, I can't say I have tried listening to many other composers, to be honest. I like Mozart, but his music is too "happy". Bach's music is more mature.

Let me recommend Franz Schubert. I think you'll find he meets your criteria quite well - the Pandora station for Schubert is fantastic.
My take on a lot of classical music is that they seem to be trying to hard, doing too much with the instrument (been listening to some piano pieces by Liszt, Chopin, etc recently). That and I really don't appreciate a lot of high treble sounds (it depends, but genereally flutes and violins aren't my favourite instruments).

My recently instrumental fascination has been the work of Yann Tiersen (Amelie soundtrack), which has recently inspired me to try my hand at the piano again after 20 years. Not sure if that'd float your boat though. May give Brahms a go though.

While I play a fair bit of J.S. Bach material in my free time, I find that listening to Bach over long periods of time rather depressing. It builds a heavy darker mood.

Ambient & lighter Electronica is easier on the mood and the repetitive patterns help pacing myself (it also works for working out/ running). Jazz gets too involved; HipHop as well; Rock has dominant vocals that grab attention.

I have to throw a shout out to Tarlton, mum(there is a back tick over the u but I am too lazy to find the letter), and Sanchez is Driven By Demons. They have gotten me through some tough coding sessions and they are all close enough to instrumental without being instrumental to make it work. If you needed to classify it I guess it they would be post-rock.
This is sort of un-related, but for fans of coding to ambient music (or anyone for that matter) - if you haven't already, check out "9 Beet Stretch" - http://www.park.nl/park_cms/public/index.php?thisarticle=118 - Beethoven's 9th Symphony stretched out over a 24 hour period. I heard it first on the "Time" episode of Radio Lab (great show). It's a real trip to listen to.
vocal trance channel on http://www.di.fm Lots of other great channels on there too. Sometimes somafm.com as well.
Lots of groove salad and drum n bass. post-rock is great too.
I listen to metal (Mastodon, Neurosis, Isis, Misery Speaks, Cult of Luna) in the day if I'm wired on coffee. Otherwise, I listen to a lot of ambient/IDM (Marconi Union, Signer,Arovane, etc).

Generally if I'm drawing, daydreaming, designing, or what have you I listen to a lot of indie, downtempo, sexy/chill house.

When all else fails, it's Wu Tang all day, son.

A lot of punk music, combined with blues and jazz during the coding routines, but turn music off while working on something hard.
Silence, I need lot of concentration.
Something without lyrics. Usually I listen to Juno Reactor.
The same songs over and over. My girlfriend and her blues band rehearse at home.
I'd rather prefer silence. But in noisy environments, I prefer any instrumental music. Western classical mostly.