Your manager can make you comments on the workflow in such cases it is not necessary to actively demonstrate their dissatisfaction, you just need to listen to good advice and redo the work, eliminating all defects.
When your boss allows himself to speak about their employees unflattering way to insult and humiliate staff, including you, do not respond to rudeness to rudeness. You can not afford to talk in the same tone as your leader, but also tolerate disrespect is not necessary. Suggest head make any claims about your work in the normal form and discuss, if necessary, your mistakes.
In no case do not discuss with colleagues their boss behind his back. How would you treat him or not, talk with employees about the head to no good will not. After all, there are a number of people who participate in the discussions passively, but donesut case to the head of your negative attitude. And as a consequence - the inability to move up the career ladder, carping and criticism on the work, reaching the reprimands and fines.
With the head of the chain of command and follow the business style of communication should not be by reference to the chief to move on "you", even if he calls you by name.
Absence from your work address of code does not mean that you can come to the company in a short skirt and a blouse with a deep neckline. After all, this is your way of distracting from the head of the process. And the head can not uniquely understand your hints and starts flirting and harass you. If you do not pursue such a goal, you should not wear outrageous fashions.