DEV Community

Cover image for Do you listen to music while coding?
Rishabh Singh ⚡
Rishabh Singh ⚡

Posted on

Do you listen to music while coding?

If you are a music lover then there's no doubt, you listen to music very often while doing many different things. Laundry with Music! Cooking with Music! Workout with Music!

But do you listen to music while coding as well?

Coding requires a lot of focus & if you are constantly distracted by the beats of music then you will certainly end up with a never-ending list of errors or low-quality code. However, this is not true all the times! Some developers say, with music, coding becomes more fun and they can code undistracted with more focus.

Discuss


Do you think that music helps you focus while coding? 🤔🎧

Share your thoughts and opinions in the discussions/comments.

Top comments (145)

Collapse
 
cyberhck profile image
Nishchal Gautam

For me, it depends on what kind of work I'm doing, if I'm doing auth or something similar which is so simple that I can do with half mind, I listen to music in background, but they never are loud.

But if it requires focus or you're stuck at a test which just won't pass, I'll pause music to focus till I figure out, or if I'm doing research which needs attention, then I won't listen to music.

But 90% of things come naturally, so music most of the time.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

That's exactly what I do too...

Here's the algorithm:

if task == 'attention required':
   music = False
else:
   music = True
Enter fullscreen mode Exit fullscreen mode
Collapse
 
webjoyable profile image
webjoyable • Edited
awake && music
Enter fullscreen mode Exit fullscreen mode
Collapse
 
rvxlab profile image
RVxLab

This exactly, if I need to focus or really think of something I pause the music.

Collapse
 
thankgod profile image
Eboreime ThankGod

yep exactly

Collapse
 
applicafroguy profile image
Sivuyile Magutywa

That's what I do, when I am fixing bugs, refactoring or adding a simple feature.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

It's a lot of fun honestly :D

Collapse
 
gautham495 profile image
Gautham Vijayan

Without music I cannot code!!

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Me neither 😂❤️

Collapse
 
gautham495 profile image
Gautham Vijayan

Right now I am hearing some Tamil songs and scavenging through StackoverFlow haha!!!

Thread Thread
 
mindninjax profile image
Rishabh Singh ⚡

And I am listening to some up-beat K-pop❤️

PS - I am not coding right now🤣

Collapse
 
nhatnguyentim profile image
Hoang Nhat

Me, the same 👏. I even listen to rock/metal 🙏🏻

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Oh yeah, heavy metal pumps me up... I just love it listening to it in the libraries & coffee shops 😍🎸

Thread Thread
 
nhatnguyentim profile image
Hoang Nhat • Edited

It's so nice to hear there are developers like me? Thanks for sharing 🙏🏻

Thread Thread
 
mindninjax profile image
Rishabh Singh ⚡

Thanks for being a part of the community ✨⚡

Collapse
 
joblyn profile image
Job Oaikhenah

Music most times for me. I usually go for the slow (not too slow), low-pitched ones. I feel they aid concentration for me, and listening with an earpiece or a headset helps block external noise and distractions.

Collapse
 
hydraulisch profile image
Hydraulisch

Hey, on behalf of the dev.to community I'd like to welcome you to our little slice of haven!

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

That's the perfect recipe for some real focus music!

Collapse
 
codemouse92 profile image
Jason C. McDonald • Edited

Music helps me focus most of the time, even with lyrics many days. It just depends on the style and instrumentation I need for my current mood. I listen to everything from classical to jazz to metalcore to contemporary to melodic rap to cinematic scores.

Sometimes all in the same day.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Yeah music helps a lot to calm our mind and focus on coding 👨‍💻

Collapse
 
sharan profile image
Sharan

Yeah, I will easily get distracted to "someone's speak" around me. So i will listen to music while coding to get focused. But, some bass extended music also will distract me from coding. So, while coding or designing, I mostly prefer jazz or melody kinda stuff.
If it was a boring work, then this won't work.
So I will go with vice versa.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

I completely feel you. Even I usually amp up some lovely melodies when working on something creative such as designing or UI/UX...

Collapse
 
jonrandy profile image
Jon Randy 🎖️

I find silence more distracting than music most of the time

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

I completely feel you! Just some beats and we are in full pace!🔥

Collapse
 
kubeden profile image
Kuberdenis

For me personally, it differs. I always start with a mix (Lo-Fi / Tech House / Techno) and from there, a couple of things could happen:

  • I forget about the music and just code (usually when I don't have to do hard thinking)
  • I bump the music to the max on my headphones (usually when I am pumped up because I know how to do something / fix a problem I had for days)
  • The music stops and I don't pay attention to it, therefore it remains stopped until further notice (usually when I am really deep into it and I need my highest concentration)
Collapse
 
mindninjax profile image
Rishabh Singh ⚡

This is a really interesting approach! Once the brain is occupied in coding it starts to completely ignore the music. I would love to try this someday...

Collapse
 
jnutterdev profile image
John

Music pretty much all the time for me. It helps me focus. I pretty much listen to instrumental music though. If there’s lyrics, then I get distracted. If someone is talking around me while I code, I put headphones on and I’m good to go.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

That's true... vocals can really be distracting!

Collapse
 
coderific profile image
Yip

Gotta have music running in the background. If I’m familiar with what I am doing it can be anything but if I am doing something new or complex it’ll be some downtempo/chill playlist mostly without lyrics.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Perfect! The best music for focus is the one without vocals🌟

Collapse
 
joeizang profile image
Joe Izang

I don't think your conclusion is scientific in any way. It is subjective and so doesn't matter. I code to music with no lyrics, so Bethoveen, orchestral type music or anything that inspires on the day. The most important thing is focus. We all know how and what makes us focus.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Exactly! Focus is more important but everyone has different ways and approaches to find focus. And all of them are creative and amazing!🤩