Coding to music

Why you should listen to music while coding (and what kind to listen to)

JAX Editorial Team
music2

Is there such a thing as the ‘right’ music for programming? And can we even be sure it has a good effect?

It’s time to ask one of the most important questions in IT: What’s the best kind of music to program to?

It might sound like the topic of a lazy Friday afternoon canteen coffee break debate, but the question actually comes from a serious place. The “flow” – a state in which programmers manage to block out everything else and concentrate 100% on coding – is a highly desired state of mind. When the perfect conditions fall into place, a programmer’s focus is entirely on the problem at hand until it is solved. Victory!

Music and the developer’s flow

Psychological studies reveal that developers can slide into a focused working rhythm with music much faster than without. Music helps to block out annoying, distracting noises like telephone conversations, squeaky chairs or that coughing colleague who gets on your nerves.

Developer Rob Walling used music to condition himself to quickly assume a focused work pattern. While programming he would listen to the same track on repeat for hours until he could concentrate entirely on his work. Following this experiment, all Rob needs to do is play the song to evoke his undeterred concentration.

Music and coding

Sam Howard has written a blog series listing the various reasons why programmers should listen to music when coding.

  • Developers often have to deal with arduous, repetitive problems such as testing, that can be tedious or boring. Music can help to keep the brain alert and prevent it from switching off.

  • Music can also be a motivator. If someone listens to epic soundtracks while working, they might be inspired to complete a big project.

  • If someone is stressed, Debussy’s impressionist sounds can act as the perfect soothing background noise. Tiredness is often combatted through rapid guitar noises and a lot of coffee.

  • Another bonus of listening to music in the office is that headphones often deter colleagues from approaching you with small talk when you’re trying to meet a deadline.

The scientists behind focus@will (a concentration-enhancing music subscription service) claim that the right music can help individuals to quickly lapse into a state of high performance.

We’ve learned that people working or studying tend to take about 20 minutes to acclimate to their environment enough to really focus on the task at hand. It takes time for your brain to get used to a stimulus and start “tuning it out” in a process called “habituation”.

By accelerating the habituation process, music can enhance the productivity of a team. Data like this begs the question as to why larger tech companies have not yet started offering their employees free music subscriptions to Spotify and co.

Concentration killer?

It must also be noted, that for all the positive effects of listening to music while working there are also some downsides. The wrong music can sometimes serve as a massive distraction, so it’s essential to put some thought into selecting the perfect work tunes. While some individuals may be distracted by music with vocals, others may be distracted by music they strongly like or dislike.

  • Those who listen to their favourite top ten charts on the radio will probably not have the most productive or focused work period. Radio adverts, news bulletins or exciting reports between songs will often interrupt the workflow.

  • Sam Howard argues that songs with well known lyrics can also be counter productive. The brain automatically zones in on the text and before you know it your concentration is lost. Podcasts are also not recommended for those hoping not to get sidetracked.

The solution? Just listen to music without vocals, or songs with less attention-grabbing lyrics. Instrumental music such as classical, electro and jazz are perfect for setting the right conditions to get some serious work done. They are also thought to sustain your focus.

The same goes for many soundtracks. Film scores are designed support and complement the film without drawing too much attention to the music, and the logic can also be applied to programming. The repetitive melodies and rhythms of Minimalist composers such as Steve Reich and Philip Glass are also thought to be an ideal backdrop for successful coding.

Your turn!

But in spite of everything we’ve just told you, musical is, in the end, an entirely subjective matter and what appeals to one person might be the wrong thing for another. This is where individual taste comes into play and to this end we would like to reopen the debate.

SEE ALSO: Devs name their top productivity slayers

What music would you recommend listening to while working? Which artists do you find distracting? Join in on the conversation on the Reddit thread (six years old and still going strong): “The best background music for programming?

Feature image by Alé

Author
JAX Editorial Team

JAX Editorial Team

All Posts by JAX Editorial Team

Comments
comments powered by Disqus