@metapsyche I'm sure that other philosophers have put this forward, but the Baal Shem Tov (A very famous/respected Jewish Rabbi) said something similar.
His thing was that if you came across a perfect person you wouldn't be able to see them. They'd be invisible to you. The reason is that we can only recognize in others what we have within ourselves.
In the simplest terms: when you recognize that someone is an asshole or a jerk, it is because you have been an asshole or a jerk.
@Surasanji
Totally agree