While I totally agree on the dangers of multitasking, I found a certain genre of music to help me to get into a flow state while programming and thus massively boosting my productivity.
Progressive psytrance. What's interesting is that a lot of other genres of electronic music (which have similar characteristics) don't have the same effect on my productivity and ability to concentrate.
I'm not too surprised; I find a YouTube mix of an hour or two Psy Trance or Psy Breaks to pass incredibly quickly. Classic trance gets a bit dull, EDM is too engaging.
It's even more effective than thunderstorm or "train in the rain" soundscapes, just as long as it doesn't have much in the way of lyrics.