Note: Before you read the following, let me make this clear - this page does not mean to imply that all bosses are bad. However, there are bosses who have toxic personalities. You should not have to live with a boss like that - in my humble opinion. Life is just too damn short.
As mentioned in MicromanagingSadist, it's best to get away from the company of these characters. However, if you insist on sticking it out, here's some things to try:
Comments
I didn't say that good managers are sadists. I'm saying that managers that micromanage programmers are bad managers. You can't be happy with that type of manager. Notice point 6 - be a class act. That's important. I'm not saying don't follow what the boss says (he/she is the boss after all). But note that with MicromanagingSadists, nothing you do will ever, ever be right.