The most relevant research comes from cognitive psychology studies on the “irrelevant sound effect” — the finding that background sound with changing acoustic properties (like speech or lyrics) impairs performance on tasks involving serial recall and verbal working memory.
Verbal interference
Lyrics contain words. When you hear words, your brain processes them — even if you are trying not to listen. This creates interference with tasks that also use verbal processing, such as reading code, naming variables, writing documentation, or following logical arguments. Studies consistently show that music with intelligible lyrics impairs verbal task performance more than instrumental music or silence.
Task complexity matters
The interference effect is stronger for complex tasks than for simple or familiar ones. Debugging a novel algorithm while listening to lyrics is more likely to be impaired than running through a routine deployment process you have done many times. This matches what many developers report intuitively: lyrics are fine for rote tasks but problematic during hard thinking.
Familiarity reduces disruption
Familiar music — whether lyrical or instrumental — is generally less disruptive than unfamiliar music. If you have heard a song hundreds of times, your brain spends less effort processing it. This may explain why some developers listen to the same album on repeat while coding: the familiarity reduces the attentional cost.
Individual differences are real
Personality traits like introversion/extraversion and tolerance for stimulation affect how people respond to background music. Some developers genuinely focus better with lyrics playing. Research shows group-level trends, but individual variation is significant. What matters is whether music helps you focus, not what works on average.