DEV Community


Posted on

Why do some developers listen to music while they code?

I want my environment to be silent while programming. Listening to music actually deviate from what I'm doing. I wonder how it helps some. :-)

Top comments (53)

katzy687 profile image
Natti Katz

If I'm learning something new, silence. If I'm doing something that I already know how to do, I listen to music to kind of get in a flow.

ahoseinian profile image
Amir Hoseinian

I do it because the headset keeps my ears warm in our cold office!

chrisvasqm profile image
Christian Vasquez

This. So much this!

grhegde09 profile image

I listen to music with no vocals. That does not need me to focus on the music and acts like background white noise. This helps me focus on the job at hand. I can avoid hearing people talking and getting distracted. It is a noisy kind of silence!

a_reiterer profile image
Andreas Reiterer

Yep, I second this.
I also listen to music that fits my current mood (either I need some motivating, pushing fast paced music or slow, calm, maybe classical) but always without vocals.

Some time ago I realized it also works if I just turn on some white noise (there is a Rainstorm Playlist on Spotify 😂) to avoid being distracted by other peoples conversations or other noise.

chrisvasqm profile image
Christian Vasquez

Would you mind sharing your playlist? I've been thinking about doing the same thing.

grhegde09 profile image
soupwaylee profile image
Stefan Su (he/him) • Edited

I though I'd share mine as well. It's a collection of Chillhop pieces I like. I always listen to those when I'm programming / studying. It helps me to block out the surroundings.

ripsup profile image
Richard Orelup

Not sure if this is the one that he is referring to but it is one that I follow.

raventhedev profile image
Chris Raven

As a "developer" (Read: Junior person who knows barely anything at this point), and an individual with Autism, music my way of drowning out unexpected noises. When there are people talking, or noises occurring around me , I will inadvertently attempt to isolate and figure out what those noises are. With music (Mainly stuff that I know the lyrics to) I don't focus on that, since I know what the noise is. It leaves me to concentrate on my problem solving.

bartude profile image

In my situation, I work in a kind of noisy environment, so I hear music to abstract myself from all the talking and laughing and whatnot. I mostly hear music I already know, and that's more rock, pop, hip-hop etc... to help me get in the mood. If I'm focused working, normally after one or two songs I get so into "the zone", that when I'm out, the playlist is over :p

franky47 profile image
François Best

A list of things I listen to while coding:


  • John Hopkins
  • Steven Wilson


And many more.. anything with a good groove for coding fast without thinking, and no music at all for planning ahead without coding (whiteboard, note book).

scottshipp profile image

Ulrich Schnauss is great!

radorado profile image
Radoslav Georgiev

IMO, music helps you get into "flow".

From my personal observation when working & listening to music, I see two patterns:

1) There are times when coding with music makes you super-productive (often when you know what you are solving and need to actually code it).

2) There are times where you need silence to concentrate & solve / understand the problem at hand. If all your mental capacity goes towards that problem, then - music can be distracting.

But in the end - it all depends on the person & the context ;)

v_vindemiatrix profile image
Vega Vindemiatrix

I listen alternately to trance (Above & Beyond etc.), soundtracks (movie and game) and classical. While trance occasionally has vocals they are usually really short and simple so they are not much of a distraction. Overall electronica fits my silicon based lifestyle the best. Actually music not only does it help me focus, it keeps me from bothering the people around me. I tend to talk to myself a bit and I like interacting with my co-workers (to their detriment from time to time). With tunes that are not very singable I tend to not sing (not singing is my gift to mankind). As far as classical goes nothing for me beats Debussy.

databasesponge profile image
MetaDave 🇪🇺

I pretty much agree -- silence when developing is my ideal.

I have found that having a ticking clock is quite soothing, but maybe it just gives some part of my brain something meaningless to focus on so it doesn't wander off making up conversations with imaginary people.

That happens with everyone, right?

sathish profile image

I do.

totiiimon profile image

I like to hear music when I program and when I study, mostly instrumental but sometimes I can deal with vocals if I'm not much into the lyrics (If I'm I could fall into the song and just not do anything (?) )

This is something that depends on the person, I like to do it while I do those things because it makes me feel more comfortable, also I work in my home and sometimes my family is too noisy and its just better to hear to something pleasant when you're trying to concentrate on a problem. I give you the studying too because its other thing that requires concentration and there's lots of people that just can't deal with music while they study too.

jessica_veit profile image
Jessica Veit • Edited

I actually can't work in a completely silent environment, it makes me so nervous - especially if I have deadlines. With music everything just feels less stressed.

I love listening to old school rock music while coding, it gives me the motivation I need :)

osblaineora profile image
Blaine Carter

Sometimes when I'm stuck, a little bit of distraction will break the ideas loose. Having the right music (depends on my mood) can help keep my thoughts moving forward.

shkabo profile image

I'm a person that enjoys good rhythm and doesn't notice lyrics in most occasions. When I start coding I need to have music with me (which depends on my mood but it's mostly some electronic). That music makes me to isolate surrounding noises, and makes me focus on the work that I'm doing. After some time I'm so into coding that I even stop noticing the music. It happened to me a couple of times that I ended from electronic music to some metal or so music without me even noticing that until I stopped working. :)

oxygen0211 profile image
Julian Engelhardt

For me, there‘s two reasons to Listen to music. Also I go with the stuff that most will say is too distracting for them: Metal, Hard Rock Blues-/dirty rock and anything in between. Guess this relates to 2.):

1.) I am (and was in previous job) surrounded by people that are talking much in person and on telephone. Music helps me block these conversations out and replace them with something less interruptive, otherwise I would tend to concentrate on these conversations, at least partly, getting my focus taken away from the task at hand.

2.) and this is pretty personal I think - If I concentrate solely at my Task, I have to „listen“ to my thoughts, meaning I will concentrate on formulating thoughts in my head very much. Since I tend to jump between scopes and single modules (classes, functions, etc), this is mentally very exhausting to me. Listening to music takes part of this focus away - on most days exactly this listening thing - leaving enough focus on the task so I don‘t feel interupted. When laying out architectures or something, I mostly can‘t work with music since I need more focus, but with programming tasks, music really helps me. Also, in the last year or so, I notice thid „listening“ thing fading and being able to work without music more often, so it‘s also probably a habit.

Of course, there‘s also the signal sending factor. People approach you differently when they see you are wearing earphones or headphones.

jrecas profile image

I actually listen music as much as I breathe. It's natural, and it's part of my life. So programming with music is normal and desirable to me, specially in a noisy office.
Having said that, I use "predictable" music so it doesn't take too much attention from me. Predictable usually means already very known or very similar (bonus if instrumental), or things like instrumental post-rock, lately. I adore things like Toe's last two CDs, that keep me at a rhythm and give me something of a known background.

And yet, I have a couple of melodic Death Metal albums to use in case of mental breakdown and/or nerves. I use music that matches my mood to "synch" and then change if desired, not forcing music that my mood rejects.