I feel that much programming should be turned into a real "engineering" discipline, requiring a license that ensures that you got an education from an accredited institution, keep up your education, and take professional responsibility for the code that you produce.
Then when your boss tries to apply market pressures to you, you can honestly say "Sorry, I can't let this product be released because it would be unethical and I could lose my license."
I'm not saying that coding be illegal without a license, but that many or perhaps all commercial products require at least supervision and approval of a licensed coder before money can be charged for them.
But this will never happen. A good alternative would be to have a voluntary system where you get a "Good Programming Seal of Approval" on software that meets some strict standards. Then many big groups will require this seal on important code such as the flight controls of commercial jet liners and things can snow-ball from there.
A common response when I propose this is that the cost and time of producing software would skyrocket and destroy the economy.
My response to that is that in my decade of professional software development, I've spent more time fixing problems caused by other peoples' code than I have writing my own code. If the code I got from other companies was of reasonable quality, I'd have much more time and could spend that making my software of reasonable quality as well.
So I think this idea would produce an initial slow down but in the end would make the software industry more productive (as well as making software suck a lot less).
Last week I mentioned that to my new manager and he said that this is actually proposed in a well respected book on software development. I'll throw the title in here when I find it.- tye (but my friends call me "Tye")