Music for Programmers

Programming is a highly mental activity that relies on intense focus and mental balance. To achieve this, many programmers isolate themselves from their environment by listening to music. Some people disagree with this practice—Robert Martin, for example, avoids music while programming—but most programmers I know use music to help them write code. But what kind of music?

Personally, I avoid music with lyrics. Not because the lyrics interfere with my work, but because when I write software, I don’t even pay attention to them. The same goes for podcasts, TV shows, or talks. I prefer instrumental music. I find myself more focused when I listen to jazz or classical composers like Chopin, Mozart, or Beethoven.

Sometimes, when I’m in a good mood, you’ll catch me losing myself in Disney movie soundtracks. Yes, they may have lyrics, but I don’t really hear them. I enjoy the soft, simple, and soothing melodies that help my mind wander just enough to block out my surroundings and let me focus on my work.

I used to listen to metal while coding—bands like Arch Enemy, Metallica, Blind Guardian, Black Sabbath, and Iron Maiden were my usual choices. But as I get older, I find it harder to focus when I listen to those bands.

Another great way for me to concentrate is by listening to movie soundtracks. They usually don’t have lyrics and can inspire motivation and deep focus depending on the situation. For example, when I’m trying to fix a difficult bug, I feel like Rocky Balboa fighting Drago or Creed. Listening to those intense scenes motivates me to "fight" the bug.

It might be controversial to some programmers, but music is very important while coding. Whether you choose music or silence, lyrics or no lyrics, you do it for one reason only—to be better at coding.