Discernment, Resentment, and Anger
I have found the truth in a teaching that I once dismissed. This is the counsel that one should not despise people who would do wrong by you. I think it is unfortunately passed around as "Do not judge others," a formulation of it that on the face of it is obviously bad advice. There is an ambiguity at play. On one interpretation it is bad, even laughable advice, on another interpretation it is right.
It's worthless advice if it means that one should not distinguish between right and wrong, should not recognize evil and should not resist one's enemy's attacks. It is laughable if it means that one only "descends to his level" when one decides that an evildoer is evil and that one should resist, counter-attack, and punish them.
But it is good advice if it means that one should not harbor hatred, anger and resentment when discerning and opposing evil. On this interpretation, it means that one should maintain an equanimity - a steady, calm, cool, and self-directed spirit - when discriminating between right from wrong and acting according to this discrimination.
That this is good advice is not obvious. One might think that anger is appropriate when one confronts bad behavior and especially genuine evil. But anger and its kin, hatred and resentment, can disable the character. They are a wrench in the works when we harbor them. It may be appropriate for a bit of indignant anger to flare up in someone who confronts an evildoer; it may provide the adrenaline the warrior's muscles need in the moment. But if he is of the highest sort of character, the anger will pass as quickly as it came.
When you envision a person of the highest order of virtuous character, you can see that he is devoid of anger, hatred and resentment. Otherwise, he would not count as content with this world and his place in it; but he does. It's just a fact that a considerable disposition to these negative emotions is not mechanically compatible with a virtuous character. In abstract theory, yes, and that's why the advice seems wrong. But in fact, no, the two aren't compatible.
Nor does a man of virtue shrink from crushing an evildoer with decisive violence or from publicly exposing wrongdoers with clear and accurate declarations. The resentful man is more likely to be hamstrung by his hatred and unable to act as effectively. His character is crippled. The man of virtue enjoys a certain ease and flow of action. His resentful friend gnashes his teeth, nursing his rage instead of acting or speaking up. Or if he does speak up, he betrays a vicious resentment that puts his pronouncements, as correct as they may be, in a dubious light for his audience. Or he engages in an overkill of violence that betokens despair and not exemplary heroism.
So, if "judging" means condemning out of a deeply seated antipathy, then "Do not judge others."