Agile acoustics

What role does music play when programming?

Coman Hamilton
Cassette image via Shutterstock

How much does it matter what you hear while you program? Four learned programmers tell us what sounds they listen to when they concentrate on coding.

There’s a wise old saying about music, often attributed to several different musicians like Frank Zappa, Elvis Costello and Thelonius Monk.

“Writing about music is like dancing about architecture.”

The same statement might hold true for writing about programming. But today I don’t want to talk about programming. Or music. I want to find out if it makes sense to talk about programming to music. What sounds do programmers listen to when they code, and is there such a thing as a universally optimal soundtrack to good code?

Programmers often speak of ‘the flow’, a kind of Zen state of pure, clean coding – a state of mind which can take time to reach (and is usually interrupted for another stand-up meeting). Some programmers have shown that it’s possible to reach full concentration with a Pavlovian approach to music, by training an association between high concentration and a specific genre of music (or noise). Others find it impossible to write code to music.

We’ve looked at the issue before on JAXenter, and showed that music can help improve concentration for coding (even if recent studies show that using headphones at work can result in long-term hearing damage).

Strong opinions on programming to music

Today, many tech companies provide their employees with headphones to enhance concentration. Convinced by the power of music in the workplace, one prominent London electronic music (Datassette) has even created an entire website dedicated to compiling playlists designed specifically for programmers.

Meanwhile Reddit regularly revisits the age-old debate of the best music for programmers. Clearly, it is important to maintain the debate of programmer productivity and all the sounds that can enhance and disturb a programmer’s concentration.

I asked four seasoned programmers how they view the role of music in programming. Naturally, none agreed on the specifics of what music delivers results for concentrated programming. However they all shared one thing – a strong opinion on music in the workplace.

Jaroslav Tulach, NetBeans Founder and Initial Architect, takes a rather eclectic approach to music when programming.

jaroslav tulach“I was growing up a floor above a discotheque. So every night I was falling in sleep with beat of classical 80s disco hits: ABBA, Michael Jackson, Alphaville, etc. When I got older I switched to rock, metal: AC/DC, Metallica, Clawfinger. Moreover my uncle used to have a big-band, so I am listening to Jazz as well. I am not particularly good in classical music, in spite of my wife singing in a choir.

“As such I really like Paul Anka’s Rock Swings – some of the songs are even better than originals. Yesterday I was listening to Monkey Business funky and today to Skunk Anansie’s Wonderlustre.”

Avoiding lyrics

There’s a general consensus among many music-loving programmers that lyrics are a big no-no, an approach that is also backed up by several studies. But in the end it doesn’t take a scientific study to tell you what’s distracting.

Trisha Gee, Java programmer at MongoDB, told us she has her own lyric-free playlist for better concentration.

trisha-gee“I have a “non-lyrical” playlist for serious coding, I find anything with vocals in distracts me when I’m really trying to concentrate. This means that I have a random mix of classical, movie soundtracks and miscellaneous dance in that list – I might have the Pirates of the Caribbean theme followed by Swedish House Mafia or Pendulum. It could be quite jarring but I like the variation.”

Paul Fremantle, CTO of WSO2, is another staunch follower of the no-lyrics philosophy, but would add complexity to the list of distractors.

fremantle“I’m actually a musician. I play Irish music. And if the music’s too exciting, too interesting, it completely distracts me and I start thinking “How do I play it?” So the only kind of music I can program to is classical music. And maybe it’s just that I’m not that good a musician. But it just doesn’t get my brain thinking “How could I play that? What could I do with that?” So I listen to a lot of viola da gamba concerts while I’m programming.

“Lyrics really bother me. My brain … I’m really bad. If those music going on in the background with lyrics or even someone talking on the radio, my brain shuts down and I [makes gargling noises]… I can’t talk even. I can’t do lyrics, no, no. They put me off coding completely. People who can code while they’re listening to music with lyrics, I’m in awe of, cause I can’t do that. So classical, old music with nothing too complex: perfect.”

Ambient noise

When I asked Nigel Runnels-Moss, a software craftsman of 25 years, about his approach, he quoted research that questioned music’s benefits in the workplace. Not only are lyrics distracting, but music can also inhibit the learning process, the study argued.

Nevertheless, that doesn’t seem to overrule its ability to drown out office noise and inject some individuality into the workplace. For this reason, websites like [email protected] are aiming their service at developers that want to shut off acoustic distractions with ambient sounds (and not some Distractify subscription service).

nigel.1“Whilst I’m sure discussing peoples’ musical tastes de rigueur, I probably won’t be popular for saying that the research is telling us that we’re more productive without most kinds of music, see for instance this article.

“I now use to provide an ambient noise soundscape which helps cover intrusive external environmental noise (co-workers, telephones etc.) whilst remaining free of lyrics or distracting melodies. Try it and see for yourself.”

Four seasoned developers, four different attitudes to the role of music in programming. Perhaps talking about music and programming is a bit like dancing about architecture. But at least all programmers can agree that it matters what goes into their ears while they code.

Let us know how you feel about programming to music in the comments below!

Coman Hamilton
Coman was Editor of at S&S Media Group. He has a master's degree in cultural studies and has written and edited content for numerous news, tech and culture websites and magazines, as well as several ad agencies.

Inline Feedbacks
View all comments