Some swear by it, for others it’s a bane: Music while coding /programming. Throughout grade school, we’ve been cautioned not to keep the TV and music on when doing homework, but is it really counter-productive? According to this study (link no longer works), not so, at least for people who are under-stimulated which probably accounts for most us these days.
Let’s face it: We’re ridiculously overstimulated. How many of us don’t constantly have at least five Firefox instances open, each nesting a dozen or two tabs, F5ing Slashdot and Digg, keeping track of new emails and countless IRC channels, and crawling from one Wikipedia page to another endlessly?
I initially coded in silence, the only noise coming from my ten year old keyboard. I became increasingly bored coding assignments for class because I was far ahead of the curriculum, so I began keeping music on. Nothing extraordinary happened… until I attempted coding in silence again. Without noise, I was restless and far more easily distracted. I didn’t bother kicking the habit, realizing that I can get into the zone more efficiently with noise on than without.
Sometimes I get so absorbed writing code that everything besides my awareness of the screen, and the sensation of my fingers hitting the keys, disappears. Sometimes when I’m getting out of this trance-like state of mind, it feels as though my code, or specifically, the rate and rythm at which I hit the keyboard is in sync with the current backbeat. Then I hit compile and my program works flawlessly, and I think: WTF? Where’d that come from? I’ve written some of my most elegant code in this state.
The music I listen to while coding depends on a number of factors. I prefer little to no, or very simple lyrics, unless I am familiar enough with the songs that I do not get distracted trying to comprehend or interpret the meaning. I rarely, if ever, listen to something I haven’t heard before while coding. I make a specific time for new music so I can give it my full attention. This rule is broken if the songs are a “familiar style” to previous songs, or lack lyrics and serve naturally as background or ambient music. Lounge (“chill out”) or New-Age music (drumming) for example.
I prefer classical, slow or soft, music while designing or debugging, but something faster and with a predictable pattern while writing code. I might increase or decrease the volume, depending on ambient noise and my current mood. Number crunching or writing mundane code (I know, DRY), especially when fueled by caffeine, usually calls for louder, faster stuff than when I am relaxed, writing a simple script.
Headphones get distracting, becoming uncomfortable and sweaty after being worn hours on end. After half a decade, I gave in and got speakers. I’d never go back to headphones. I suggest putting down at least a few hundred for a good quality set of speakers that will last. I generally like to have lounge or elevator music running in the background even when I’m not on the computer. I wasn’t able to do this with headphones unless I turned up the volume to max, in which case the music sounded so bad there was no use keeping it on.
Below are lists of stuff I listen to while coding, stuff recommended to me by others, and anything else that might be relevant.
Obligatory Tunes and Tools
Pandora has replaced my entire music collection. Set a station and thumb up/down songs you like, and eventually your station will only play new music you’d like. I use PandoraBoy for OS X as my client and some of my stations are “blue bossanova,” “1976 by RJD2″ and “Tanz Mit Uns.”
Overclocked Remix (OCR) – Remixes of old school video game music. Sonic, FF7, Zelda, etc. Highly recommended, and it’s a great community.
Coffee.mp3 – Coffee Replacement brain wave simulation. Can be played in the background beneath your music.
Some Stuff I Listen to (while coding)
Blue Bossanova Station – All the music I’ve been listening to the past year I’ve found through this Pandora station. I tailored the station to play trip-hop and downtempo beats. Zero vocals. Recommended artists on that station include Thievery Corporation, RJD2, The Polish Ambassador, Ratatat, Copy, and Blue Man Group.
Welder – Vines & Stream – This downtempo album grows on you with every listen. I like to keep this on while while reading or programming.
Buddha Bar – 10 volumes, each consisting of music from selected international beats/songs. It’s a must have, not just while coding. This is played in lounges.
Lemon Jelly – Electronica. It’s unfortunate they broke up.
Enigma – Also (primarily) electronic. The music is unique and good for background and foreground. You’ve probably heard Sadeness (part I) on the radio. I highly recommend their album Love Sensuality Devotion: The Greatest Hits.
Ulrich Schnauss – Recently got into this after a recommendation in another paper I found online about coding music.
Bob Marley – I’ve been listening to the discography when programming, writing and studying almost exclusively. Excellent background and foreground music.
Philip Glass – Hard to get used to; Might annoy people in the room (at least from my own experience). I find it helps me focus.
Hotel by Moby – Good stuff. I’ve never heard anything else by Moby. I came across this while searching for coding music awhile back.
What do you listen to while coding?