This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have several stations built, and usually put them on a shuffle, turning different ones on or off depending on my mood. I have stations focuses on 80's, Prog rock, Broadway tunes, swing music, instrumental/modern classical, new wave, alternative rock, and pop tunes.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
There was a story on NPR a few weeks ago about music, and how 'familiar' it is...
So they had a computer generate two kinds of music. One set of tunes has repeated musical phrases...So as you listen to the music, you realize part of the tune is familair. Another set of tunes explicitly never repeated a phrase. the first set of tunes was found to be much better. In fact, people tended to think the first set was NOT likely to be computer generated.
The same held true for music written by humans. There was (is?) a movement by some composers to never repeat a musical phrase in a song. These tunes were judged by people to be MORE likely written by a computer.
But the larger point is that when you hear a song you are familiar with, your brain quite literally stops paying as much attention to it. You don't listen to the lyrics any more, so your brain is free to hear some of the deeper, subtler things going on.
I wonder if the same applies to writing code. Regardless of what the tunes are, if your brain is familiar with them, you don't have to pay as much attention, so your brain can focus on the real task of coding. In my case, since I use full enclosure headphones, all the conversations around me get blocked out, letting me be more productive.