DEV Community

loading...
Cover image for Do you listen to music while coding?

Do you listen to music while coding?

Rishabh Singh ⚡
・1 min read

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.

Discussion (149)

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 ⚡ Author

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
semperlabs • 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
tkbraincodes profile image
Tk-brainCodes

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 ⚡ Author

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 ⚡ Author

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 ⚡ Author

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 ⚡ Author

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 ⚡ Author

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
mrbeanguy profile image
Bean

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 ⚡ Author

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 ⚡ Author

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 ⚡ Author

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 ⚡ Author

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

Collapse
asciiden profile image
Denislav Gavrilov 👨‍🚀🤖🤷‍♂️

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 ⚡ Author

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 ⚡ Author

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

Collapse
mkunikow profile image
Michal Kunikowski

No vocal music works for me.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Yes me too and for many others as well!🔥

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 ⚡ Author

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

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 ⚡ Author

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🤣

Collapse
karx1 profile image
Yash Karandikar

For all the people here who listen to music while coding, might I suggest DomeCode's music module? We provide high-quality lo-fi music that you can put in the background and forget about. And while you're there, you might also wanna check out the rest of what DomeCode has to offer, such as coding tutorials, notes and todo apps, and much more. Go to domecode.com to get started!

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Sounds amazing Yash! Will definitely check it out!

Collapse
astrix29 profile image
astrix29

If I am trying to learn something then I usually turn then music off and when I am trying to build stuff on my own then I put the music on because that way I always get some positive vibes going on and I feel less exhausted.

So yeah, I'd say it depends if I am learning or building.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

I completely feel you, my friend. Music brings positive vibes into coding hence makes it more fun!

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 ⚡ Author

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
chrisdevcode profile image
ChrisAchinga

I go for relaxing ones

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Lovely,🤩 Can you share exactly which ones you generally listen to?

Collapse
chrisdevcode profile image
ChrisAchinga
Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

Entire playlist 😍 Thanks for sharing Chris!

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 ⚡ Author

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 ⚡ Author

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

Collapse
tkbraincodes profile image
Tk-brainCodes

yes! when I know exactly what to write or am familiar with, but solving a stressful problem I don't

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

This is so me... But what kind of music you prefer to listen? Cool username though :D

Collapse
tkbraincodes profile image
Tk-brainCodes

Thanks. I love listening 🎧 to afropop Nigeria music

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author • Edited

That's beautiful! Someday you must try some north Indian Bhojpuri music. I am sure you will instantly fell in love it! I personally love Ritesh Pandey's "Gori Tohri Chunari ba Lal Lal" & "Yadavji ki Chowki"...

Thread Thread
tkbraincodes profile image
Tk-brainCodes

Wow 😀 thanks.

Collapse
betoarpi profile image
Rob Arroyo

I tend to listen to non singing music, like vaporwave or synthwave. It helps me focus. Music that I like with lyrics is distracting when coding for me

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Vapourwave & Synthwave! Sounds really cool! Can you also please share where you actually listen them?

Collapse
betoarpi profile image
Rob Arroyo

Sure. I usually look for playlists on Spotify. Here's one that I listen to a lot:

open.spotify.com/playlist/3gWAZPuN...

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

It looks really dope! Can't wait to try it out! Thanks for sharing Rob🔥🔥🔥

Thread Thread
betoarpi profile image
Rob Arroyo

No problem. Greetings Rishabh!

Collapse
darpots profile image
Darren

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 ⚡ Author

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

Collapse
elder1360 profile image
Elder1360 • Edited

listening to music is really helping me to focus BUT the type of music is so important, you can find my likes on SoundCloud

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Such a awesome collection 😍 Will definitely check it out... I wonder what playlists you listen to on Spotify 😃😇

Collapse
elder1360 profile image
Elder1360

i mostly stick with soundcloud but folks at freeCodeCamp code radio also stream amazing beats that is just my type 😍

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

Oh yeah, I listen to them very often... 😍

Thread Thread
elder1360 profile image
Elder1360

Hey! i found this today and it's AWESOME!! 💪 it takes me to the journey of undiscovered!! 🙄😁

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

Thanks for sharing Elder! Lemme bookmark it ASAP 😍

Collapse
riccycastro profile image
Ricardo Castro

I always listen music while coding, the only difference is if is only instrumental or normal music. If I need to focus or deeply understand something I listen to instrumentals(lofi hip-hop/jazz, metal, etc), else, any type of song that I like to listen to

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Yes, Lofi songs are great when we need to focus on something important.

Collapse
mrshdex profile image
MrsHDex

I listen to music often while coding. If it's a straightforward task, I listen to anything in my Playlist. If it requires a lot of thought, I listen to music without lyrics.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

That's indeed a perfect approach! Btw what kind of music you prefer to listen while coding?

Collapse
mrshdex profile image
MrsHDex

This is a tough question. I suppose I typically play classical music with difficult coding tasks or instrumentals of music from old NES games. But I usually listen to everything under the sun otherwise. I love all kinds of music. I watch a lot of Japanese anime, so I listen to soundtracks from those the most I think. Like "WIN" by the K-Pop group CIX. Or "database" by Man with a Mission featuring Takuma.

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

That's lovely! Even I love to taste all the flavours and yeah who doesn't love anime😍

Collapse
bracikaa profile image
Mehmed Duhovic

I love music, especially something that can be played in the background - that I notice it being only subconsciously there, Binarual beats, ADHD music, or any lofi remixes.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Binaural beats are really amazing honestly ❤️ I personally never trued ADHD music but definitely will check it out... Can you please recommend some good ones...

Collapse
bracikaa profile image
Mehmed Duhovic

Tbh, I started listening to ADHD music just because I read online that the reason my mind is unfocused is because we multitask all the time and we destroy our 'focus muscle'. I just youtube-d some ADHD music and it does wonders, I can work longer without any problems :D.
definitely try it ! :D

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

That's such a great coincidence! I was listening to ADHD when I read this comment! And yes it does wonder 😍

Thanks for sharing @bracikaa

Collapse
pierrelampre profile image
Justin Lampe

If I'm doing work I'm familiar with, I can listen to any music I like without being distracted. If I'm grokking something new, referring to documentation, or debugging I prefer instrumental music like classical or dreamwave.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Perfect! Our ideologies match flawlessly :D

Collapse
yasmimvieira profile image
Yasmim Vieira

I agree with you, I can't listening music while I coding, I tryied sometimes because my friends work don't stopped speak and that distracted me and I tryied listening music for better focus, but I can't, so I just need silence!

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Yes, silence works well!

Collapse
raibtoffoletto profile image
Raí B. Toffoletto

As someone who works as a frontend developer, but went to university to study music and got 2 bachelor's and a master's, I cannot listen to music nor podcasts, to get my focus I use a mixture of rain/forest/streams sounds. Because the weird thing is if I'm in silence, I'll listen to the music in my head...

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Yes, nature sounds are the best melody for relaxation and focus.
What is your opinion on special kinds of music like - focus music, coding music,etc ?

Collapse
acharlop profile image
Avi Charlop

Music without words using noise cancelling headphones is how I get it done. I usually start with something lighter like jazz or classical till I get into a flow then standing desk and edm. Them dance and code till my feet or brain are tired

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

I love the transition from jazz to EDM😂 But dancing and coding is something I really need to try😂
Thank you so much for sharing Avi!

Collapse
cdurex profile image
Carlos

I listen to coderadio.freecodecamp.org/ most of the time. If a lot of focus is needed I lower the volume.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Oh manh! I love this... Do you know any more sites like these... A real time saver when it comes to selecting 🎵🎶

Collapse
cdurex profile image
Carlos

No, just that; and they also have a Youtube live music feed.

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

Hey, that's cool! Will definitely check it out :D

Collapse
evanroggenkamp profile image
Evan Roggenkamp

This is a relatively simple equation for me.

If I’ve solved the problem, and I just need to write the code; music. If I’m trying to THINK of how to solve the problem, make a critical decision, or think up a design, usually no music, or Low-Fi so it doesn’t interrupt.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Perfect equation Evan! I follow the same approach 😃

Collapse
schand profile image
Samuel Okoroafor

Lofi beats do not affect my ability to read and code. I use them often for ambience and focus.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Yes infact many believe that it helps them to focus even more... What are your preferred sources for Lofi beats supply?

Collapse
schand profile image
Samuel Okoroafor

I just search lofi on Spotify or Youtube. Music Lab on Youtube has 24/7 live streams for lofi

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

Music Lab here I come :D
Thanks for sharing Samuel :D

Collapse
kmhmubin profile image
K M H Mubin

For me, I always listen instruments music special flutter, piano and violin.

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

Oh, I just love instrumental but sometimes that makes me feel sleepy... Hence most of the time I prefer something louder like K-Pop & Bhojpuri...
What are your opinions on this?

Collapse
kmhmubin profile image
K M H Mubin

I'm not listening to that much k-pop, but I do listen to anime music.

Thread Thread
mindninjax profile image
Rishabh Singh ⚡ Author

Yeah, anime music is really great! Even I love to listen to soundtracks from many of my favorite titles

Collapse
vaishnavme profile image
Vaishnav

Mostly listen to Chillhop, Lofi beats while coding.
Chillhop
This girl got my back,⛄😄

Collapse
mindninjax profile image
Rishabh Singh ⚡ Author

She is iconic 🤣 I wonder what you listen to when you are not coding...

Collapse