I love to listen to music while writing code, but it mustn't have words else I find it distracting. Thus I listen to a lot of Jazz, particularly Charlie Parker, John Coltrane (musician), Miles Davis (musician), and Thelonious Monk (musician). Miles' Bitches Brew is a favorite.

I occasionally listen to electronica, such as Four Tet, Jonny Greenwood (musician)'s There Will Be Blood soundtrack, and Trent Reznor (musician)'s The Social Network soundtrack. The Social Network soundtrack is particularly good hacking music.

When writing my books, I like to listen to classical music: Bach most of all, but also Chopin, Glass, and Haydn. For some reason, classical music helps me write words but not code. Perhaps the better works are too intellectually-demanding for that latter pursuit.