Like you would talk to men. Simple.
Like you would talk to men. Simple.
"Oh come on, my grandma/dog/goldfish would write better code!!!"
This would be a totally acceptable jab among guys, yet saying this to a female coworker would immediately be misinterpreted as "woman are bad at coding" promptly followed by the full wrath of the HR gender equality team.
You don't have a solid grasp on male-to-male communication in the US workplace. Please keep in mind that perhaps your culture is different.
Cheeky insults, (which "my goldfish codes better than you" OBVIOUSLY is) are not attempts to "undermine your male colleague's confidence in their ability". If you think that is not the case, then you are obviously completely out of touch with male to male interaction in the US.
What I am going on about is that the "I want to stare at your tits guy" might not be sexist so much as simply inept at dealing with attraction and dating. Calling him a sexist jerk is not going to resolve the issue.
It is not excusing the behavior, but seeking understanding and solutions.
Of course sexist jerks also do exists and have to be dealt with in another way. Also, believe it or not, but if such things go on at a work place, it might make men feel uncomfortable, too. Personally I don't enjoy sexist jokes.