There was something in PeopleWare (I think) about an experiment done with people listening to music. Those listening to their preferred music performed about as well as those who preferred silence and got it, and about as well as those who preferred music, but had silence. The group that preferred silence but had music performed, unsurprisingly, comparatively badly.
The sting in the tail was this. The task they were given had an "Aha!" insight buried in it. Namely, the full set of transforms they'd been asked to implement turned out to be trivial, although the individual components weren't.
All the programmers who had the "Aha!" moment had silence, regardless of their preference. No one with music saw the short cut.
I've since tried to find concrete evidence to support this anecdote, either papers, or first hand accounts, but the recounting in PeopleWare remains the only reference I have.