As a massive house-head and someone who's been involved in the electronic music scene to varying degrees for two decades, I actually find it extremely difficult to listen to music while writing code, because all I actually do is listen to the music, rather than work.
As such, when I feel the need to put my headphones on to drown out external noise, I prefer listening to musique d'ameublement (https://en.wikipedia.org/wiki/Furniture_music)