Headphones and power metal are my most reliable coping mechanism.
I personally find music fine for coding with tools I know. When I am trying to learn new concepts / frameworks / libraries, then silence makes a huge difference.
Getting silence in an open plan office is more difficult than you think. Management frowns on me duct-taping other developers' mouths shut.