4 ms·
There was a semi-famous study (one that I feel every developer should have at least considered) that gave software developers a problem to code in the form of s
by saurik 6y ago
There was a semi-famous study (one that I feel every developer should have at least considered) that gave software developers a problem to code in the form of some convoluted set of steps, and they were either assigned to listen to music or not to listen to music. There was (usefully) no difference in the correctness of the implementations, but people who listed to music reported more subjective happiness / less boredom doing the task... only... they were also much less likely than the people who did the task in silence to notice that all of those steps collapsed down to "return a constant number".
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 :(.
- civilized 6y agoI was very curious to find more info on the constant number study. So far I found this older HN post, which is itself quoting from an apparently famous book, which according to some replies was BSing the whole thing https://news.ycombinator.com/item?id=1995239 https://news.ycombinator.com/item?id=1995239
- nulbyte 6y agoI couldn't find anything on a study at Cornell University, but I did find mention of a study at the University of Windsor that included 72 students in three groups: a control group, a group that listened to music before, and a group that listened to music before and during. 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 https://www.gwern.net/docs/music-distraction/2005-lesiuk.pdf [2]: https://www.tandfonline.com/doi/abs/10.1080/08874417.2000.11647454 https://www.tandfonline.com/doi/abs/10.1080/08874417.2000.11...
- captn3m0 6y ago[2]: https://sci-hub.se/10.1080/08874417.2000.11647454 https://sci-hub.se/10.1080/08874417.2000.11647454
- andreareina 6y agoDo you have a link or pointer to the title/org/authors? It sounds interesting and I'd love to read it myself. Absolutely I definitely feel like I'm not reasoning as well as usual when I've got something on. [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-programming-really-increase-a-programmers-performance-If-there-is-science-supporting-it-how-is-performance-impacted-by-the-music-style-itself-and-the-style-in-relation-to-the-programmers-taste-mood-or-behavior https://www.quora.com/Does-listening-to-music-while-programm... [2] https://en.wikipedia.org/wiki/Peopleware:_Productive_Projects_and_Teams https://en.wikipedia.org/wiki/Peopleware:_Productive_Project...
- tomjen3 6y agoI wonder if that depends on whether the programmer gets to choose the music or not. I often hear music I know backwards and forwards or just straight up instrumental but if you put the pop 100 on I would get distracted.
- netizen-9748 6y agoThis is something I have noticed as well, if it is music I've heard many times before it is far less distracting than something more novel.
- Jaygles 6y agoFor me it depends on if the music has lyrics or vocals in it. Someone speaking or singing is the factor for whether my brain expends cognitive effort in listening. I just can't help but try and pick up on words and discern what the meaning of them are.
- jrib 6y agoSame for me. I can't code as effectively with lyrics in the music. Postrock hits the sweet spot for me.
- corobo 6y agoFor me it's how long I've been doing it. 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.
- carschno 6y agoFor me, not being a native English speaker, it "feels" much easier to listen to music with English lyrics while working effectively on other cognitive tasks like coding, compared to listening to music with vocals in my native language. 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.
- ImprovedSilence 6y agoThis 100%. I don't speak Spanish, but my god, Latin pop just gives me the flow.
- FullMtlGtar412 6y agoI actually have to get even more specific than this (at least prior to being diagnosed with ADHD in 2020 and getting Vyvanse for it). 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.
- Cyberspy 6y agoReading about this study and the experiences described in other comments, it seems the experiment is a bit limited in its scope. 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.
- geoduck14 6y agoDid the group without music have kids screaming in the background? Cause if they didn't, I'm not sure it is a realistic experiment.
- bonfire 6y agoThis is similar to the experience of driving a car and listening to music at the same time. When you are in a tight situation, like a very busy road or a narrow street with lots of traffic you'd usually stop talking to the passengers or turn the radio down a bit to "concentrate". It's because you want to use all the mental capacity at that time.