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 :(.
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 :(.