If you want to work in software, try to go for companies whose main product is software.
These are the companies that will take software quality seriously because their bottom line depends on it.
These are the companies that will constantly try to improve their craft by exploring new technologies because it helps them maintain their competitive advantage.
These are the companies that will truly value talented software engineers because they have the potential to make a positive impact in the products that define the company.
If the company's focus is on anything other than software, whatever you're working on becomes a means to another, more important end. Your work then becomes that much less valuable, and you, that much more replaceable, to the company because they're only looking for the bare minimum functionality out of the software you develop to enable whatever it is the company does that really brings home the bacon.
I realize this is probably an over-generalization, and exceptions will definitely exist, but so far from my experiences in job searching, this seems to hold in an overwhelming majority of cases.