When coding I usually only listen to music if it's an album that I have listened to at least 5+ times. This works for me in that my brain seems to know exactly what parts/songs are coming next and they are no surprises/distractions.
Mixes and things like last.fm are no good because I always have to stop to see what is playing.
I listen to one particular song that I've found very mellow and repetitive (the album cut of DJ Shadow - What Does Your Soul Look Like [Part 4]). It helps remove outside noise and get me in the zone quicker.
I just stick it on repeat. It segues in and out to itself nicely too.
I was thinking about getting some other ambient music, but it can be hard to set up a good playlist.
Mixes and things like last.fm are no good because I always have to stop to see what is playing.