The top rated comment on this question asserts that the reason why programmers have lower salaries is because they are logical, intelligent individuals who refuse to play the politics game and thus are hated by executives. Not only it this incorrect (have you seen the politics in certain open source software projects ?) but it plays into a narrative that programmers want to believe: business people are corrupt and pr…
This is right on. Looking back to when I was finishing my degree an older friend of mine advised that if possibly you shouldn't work for a company who's primary income stream isn't what you do. I still think this is a fantastic suggestion. Not everyone can be an important member of the R&D group for their employer, but if you've got the chops why shouldn't you be?
I find that doing that you get the best of both worlds. You're valued enough that you get shielded from most of the office prattle and politics, you usually report very high up the hierarchy ( I've never reported less than one level down from executive team, and usually its been directly to a C-level position), and these teams tend to be full of others who know their shit and will make you better. Of course the compensation is usually quite good too, and bonus you're unlikely to be held to a standard soul sucking 9-5 schedule, or God forbid have to be on call.