Strangeattractor has made many excellent points here. Let me add a bit:
StackOverflow has the most detailed data I've seen on features that make software jobs satisfying: http://stackoverflow.com/research/developer-survey-2016#work
The city you work in affects the salary pool that companies compete against with their offers. San Francisco, New York, and Seattle are much higher paid than other cities, and the USA is much higher paid than any other country. Big companies also pay more.
Lastly, apply to many companies simultaneously. If you have 2 or more offers, you can negotiate by telling each company "match or beat the other company". This can lead to enormous increases in compensation. E.g.: http://haseebq.com/farewell-app-academy-hello-airbnb-part-ii/
Similar to the Crazy Ideas Thread and Diaspora Roundup Thread, I thought I'd try making a General-Purpose Questions Thread.
The purpose is to provide a forum for asking questions to the community (appealing to the wisdom of this particular crowd) in things that don't really merit their own thread.