I personally feel like there are different components of my brain and some of them just want to do something, and if I don't "distract" them then they do something arbitrary and maybe in turn distract me... but if I need them, and they are busy deciding some music I am listening to, I lose out on the maybe-even-often subconscious processing they do that gives me valuable insight. I thereby find some (mostly useless) tasks easier if I am seriously even playing a video game with a targeted skill while doing them (people hate me in meetings sometimes ;P), or maybe listening to music, but if I am doing the hard coding work I "should be doing" I just can't :(.
The results[2] are published in an article behind a paywall, but they give details of the two tasks presented to the subjects, neither of which involved actually writing code. One was a 15-minute task of locating syntax errors, another was a 20-minute task of locating logic errors.
[1]: https://www.gwern.net/docs/music-distraction/2005-lesiuk.pdf [2]: https://www.tandfonline.com/doi/abs/10.1080/08874417.2000.11...
If I need a mood boost or something to get my body "moving" in my seat and keep me from mentally wandering, I'll throw on stuff I really know and love. Usually I'm doing menial tasks or simple coding.
If I'm having a hard time focusing and need a distraction for some parts of my brain but not all of it, I have a "deathcore" (really more like melodic (tech) death metal) playlist where most of the songs sound very similar and you can't understand a thing the vox are saying.
Typically if I'm super tired AND need to block out the outside world but even hard to understand screaming won't cut it, I have to resort to either instrumental metal or LoFi hip hop beats to study to.
If I'm currently listening to music, I really only do a full stop/pause to focus if I notice I've run a breakpoint three times and have no idea what I've been stepping thru, or if I'm trying to refactor or write a fresh, new logic flow and just can't get my brain focused enough to "check it" for all possible paths. That's when I cut the feed, double-time my focus, and once I'm convinced it's "safe" I can hit play again.
Brains are weird and finicky I tell ya.
On the other hand, there are several other factors, like how tired I am, how hard the foreground task is etc., so it is hard to pin-point it specifically to the lyrics language.
If I've just started both are probably going to be good results. If I'm 4 hours in the music one will probably do better because I've not wandered away from my desk distracted by a shiny pen.
[ETA]
According to [1] it's described in "Peopleware"[2]. Apparently needs corroboration (see sibling reply by 'civilized)
[1] https://www.quora.com/Does-listening-to-music-while-programm...
[2] https://en.wikipedia.org/wiki/Peopleware:_Productive_Project...
The effect of music depends on the person, the type of music (lyrics or instrumental - even if there is applause or not), how well the person knows the music and, of course, the task itself and its complexity.
Until there's a way to test all of those permutations, I think the best we are going to do is rely on all our anecdotal evidence, as it affects ourselves.
(Also happy hardcore makes a passable coffee substitute/addition.)
This is similar for me. The worst are live recording with applause and interactions with the audience from a show. While I can fade out lyrics it's close to impossible to ignore these.
edit: also if you make a playlist made of a chronological listing of one artists full albums.
I've read somewhere that humans language processing centra only can deal with one input source at the time. So reading and talking is more or less impossible to do at the same time.
I cannot stand the "out loud" variety of music when I'm working, at least.
Or maybe some just dellude themselves (and e.g. lose congnitive capacity with music, but conflate their hapiness boost for increased productivity, etc.).
This "differently structured brains" was the once popular idea behind different "learning styles" (visual learner, etc.) who has been discredited since.
Evolutionary it's more probable we have quite identically structured brains when it comes to main functions, and just have different e.g. cultural tastes on top.
Another example of this broader phenomenon is galvanic skin response. People ran with the lie detector BS and then the whole field basically died for a few decades, only to eventually be rebranded "electrodermal activity". Probably your smart watch will be collecting EDA in a few years.
It was about the repeatability of counting to a minute, and he experimented on the difference between seeing a timer tick in your minds eye and hearing a count increment in your head.
He had been experimenting with what he could do while counting, and found he couldn't count while talking, but could count while reading. John Tukey didn't believe him, and thought it should be the other way around. It turned out Tukey and Feynman counted completely differently, Tukey by visualising and Feynman using internal speech, and so Tukey could count while talking, but not while reading. So, not the same person doing both methods.
1) You don't think people have different learning styles? 2) You don't think that I know what distracts me while I'm working? 3) You don't think that evolution produces _vast_ diversity, and that people have vast differences in brain structure?
Strangely enough I find working in the "white noise" of a coffee shop lets me hit flow state even better than silence. Not sure if thats more due to the "i'm in this place to do the thing" effect or the actual noise though.
Music on the other hand, I cannot program while listening to. Brains are different.
I suspect there is a personality difference in play where some people find themselves trying to analyse the music, so it acts as a distraction for them. Compared to them, I sink into the energy/rhythm of the music and it helps drown out other distracting noises.
It might also depend on one's playlist. Some people like having a TV on for background noise, but I would find that highly distracting. My playlist leans towards highly energetic music where there isn't much reliance on lyrics, such as technical death metal.
I think this is something CEOs don't realize when they push for ,,open offices''.
For me a group of 5 people in a room was the optimal number of people for coding enjoyment: just enough people that I feel the pressure and don't feel alone, but not too much noise, so I can work well. For people who can work with music an open office is still kind of OK, even if they don't like it that much.
My solution was to listen to one of various white noise videos on YouTube, my favorites were storms and rain.
I agree that about 5 people in a room is a perfect fit. Team sized. Open spaces were too distracting.
Zen and the Art of Motorcycle Maintenance.
I sometimes listen to music while coding, but for me it only really works with something like Aphex Twin or Autechre. Something that puts me in a meditative state - almost like white noise. And usually the purpose is to help block out surrounding noise. I’m with Persig on this one — when it comes to deep concentration, I tend to prefer quiet.
Edit: I think this might be it: https://www.bbc.com/worklife/article/20191115-office-noise-a...
Yea, this is highly dependent on the person. I have difficulty in life operating _without_ music. In anything, really. My brain wanders, i start making music, etc.
Worse yet, i find silence while programming to be stress inducing. My shoulders get super tight, and i'll find myself in a trance an hour later, super tense and feeling like i'm waiting for a bomb to drop.
Music is my emotional regulator. It lets me mirror where my head is. Chill, aggressive, grinding, etc.
The only time i find music to be a distraction rather than a method of focus is if the song is too new to me, is heavily lyrics based, _and_ i really enjoy that authors lyrics. I tend to want to focus on the lyrics, learn them, understand them, etc. Most of the time though lyrics are just yet another sound, and they vanish into the fog of work for me. I often even lightly sing while i'm programming (I work from home, lol).
edit: Oh, i should add though - this whole post of mine represents the .. maybe 80% use case. I do turn music down when i'm thinking about a challenging problem. Something i need to hyper focus on. But that's only 10-20% of the time for me. Most of the time i have a clear picture about what the general design is, and now i just need to write out the internals.
This is why I listen to techno, retrowave, instrumental jazz and classical music when I code. I leave hard rock, metal and pop music to when I'm not coding.
Say depth and duration.
Depth is kind of like how many digits of a number you can memorize.
Duration is a little like endurance in a race, but a little like tying yourself to the mast too [1].
I get much deeper into the zone without music, and I also stay in it longer.
Might not be as fun, but for me, I know this without a shadow of a doubt.
[1] ironically, odysseus tied himself to the mast to listen to music.
Thinking about it, though, I find myself reaching for music when it feels like my mind wants to wander and not focus on my job. Once the music is on, my mind has an immediate outlet for wandering - it jumps to the music while I'm still looking at the code. So while maybe music and programming do compete for resources, music maybe acts as a sort of safety net that makes it less likely for me to derail completely.
Music with lyrics is impossible to code to though.
If you're thinking, writing, or planing(or anything with 'words' in your head or 'talk' to yourself), music with lyric is bad (though I found the effect more soften a bit if you listen to what you don't understand, e.g. foreign language music, still, zero lyric is crucial for thinking)
If your activity is not about words, but more 'action' (e.g painting , making art, gardening) then you can blast your ear with lyrics or the whole audiobooks all you want. It works great.
I've taken to lying horizontal with a keyboard on my lap and a projector aimed at the ceiling. Feels ridiculous but it's at least comfortable.
Sometimes I don't think I'd mind being a brain in a vat.
I occasionally have RSI issues, which are usually a stress symptom telling me I'm operating above red-line. If I listen to my body, things work out much better than if I try to ignore it.
Music helping with your flow status might be related to it blocking external noise. I have similar results with (some type of) music, earplugs or white noise.
I generally listen to lofi music while coding. Increases my focus for some reason.
Its just damn pleasurable to do!
People when multitasking usually believe they are being hyper efficient but when observed from the outside they are less so than when single-tasking sequentially.
This point in the article lost me pretty quickly. My flow state is drastically improved by music, and I have never ever named a variable after the song name or song artist I'm listening to in my life.
Edit: Nor have I ever seen a variable named after a song name or artist.
Edit2: NotoriousViewController. TheWeekndTimer. RedHotChiliPointers. Now I want to name my variables like this.