>>11068253While studying, yes. While programming, it depends.
Listening to music while doing stuff that's cognitively demanding is going to impact your ability to focus. If you struggle to focus on things to begin with, then listening to music will make you feel like you're doing better, because your focus will flit back and forth between your work and the music instead of between your work and what's for dinner tomorrow and this masks the fact that you got distracted. But you're still multitasking.
Same goes for some programming, but not all programming really demands deep attention. Sometimes you just need to grind out a couple hundred lines of menial grunt shit, and whatever helps you get through it works.