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
3e2

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!🤩

Collapse
 
jaribeiro32 profile image
Jhonny A. Ribeiro

Of course it's diferent for everyone, but for me, music turns coding more fun, however sometimes when I need a higher level concentration, when a need to do the hole flux of the code I take of my headphone for a little while...

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Yes of course! Coding is fun with music!🥰

Collapse
 
arif profile image
arif

Actually it changes. I am listening when im doing my daily work like default system maintaining or bug checks. But when im developing new feature or creating structure im just plugging my airpods and open ANC for full silence.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

That's neat! I personally like to keep the music loud or else I feel sleepy😂

Collapse
 
surajondev profile image
Suraj Vishwakarma

Definitely I love listening to music while doing anykind of work. I think it is good practice to listen music as it boost the efficiency. Also with music we can do more work/coding for long time.

I can't live with music ❤️

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Seriously once we are used to listening music it feels empty without it! Living without Music is really something most of us can barely imagine ❤️❤️❤️

ILOVEMUSIC

Collapse
 
mkunikow profile image
Michal Kunikowski

No vocal music works for me.

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Yes me too and for many others as well!🔥

Collapse
 
l4znet profile image
Charly Escalona • Edited

Like a lot of people, the type of music depend of what I'm doing, if I need to focus I'll listen electro, rock, if I want to chill Lo-Fi.

But I noticed I'm really focused when I listen podcast (only when i'm not stuck on a bugs, just create nice features), (I'm french speaker so my brain try to understand english song...), when I listen podcast my brain understand what he says so it's better (and sometimes I listen in english to improve myself).

And when I'm really stuck on a bug, I switch off music 😂😂😂

Collapse
 
mindninjax profile image
Rishabh Singh ⚡

Oh, that's lovely! 😂 Even I love electronic music a lot but I usually avoid it while coding. Love to listen to it rest of the times.

Plus even I am not a native English speaker so it's actually tough to focus on coding with music🤣