I look at it like this: I work for a company because it's a win-win. They need some work done, and I need money.
In fact, as a coder, the company is the one in the weak position. If I leave for another company, I can get paid the exact same amount instantly. They will have to get a new person, pay them the same, but first have to get them up to speed to get to the same productivity level as me. They lose, and I even might gain a raise. So they better make sure they don't piss me off.
If you have this kind of mindset, people can't fuck with you.
Take for example a manager that says "Hey, this customer expects it to go in production on Monday, so make sure you finish it this week, maybe do some weekend work". Now the problem is in your lap. What you do is you push that shit right back, so you tell your manager "Why did you promise this customer it will be finished on Monday? You're going to be in a lot of trouble when it isn't. Maybe next time check with the developers first about the time schedule, then you don't end up in situations like this again."
You have to educate your managers a bit.
I know that some people will respond "not every employee is in this position to make demands". Well, it's all about how valuable your skills are. Make sure you can do things that other people can't, and you put yourself in a position where you always have the option to go work for another company.
A company selling services to other companies, is not that different than a person selling services to companies.
Feudal system my ass.