So I'm a blogger with posts that occasionally go semi-viral [1], and I've been subject to unpleasant comments on a few occasions. Here are a couple of posts which have gotten me quite a bit of hate:
http://www.chrisstucchio.com/blog/2013/basic_income_vs_basic...
http://www.chrisstucchio.com/blog/2014/equal_weights.html
In both cases they are posts about mathematics which use other topics (economics, dating) as concrete examples and the examples draw hatred.
However, unlike many of the people subject to unpleasant behavior such as this, I'm going to suggest that the best thing to do is ignore it and move on with your life. I don't favor much in the way of systematic solutions. Assorted "codes of conduct" being proposed are blunt instruments and are easily used by people in power to bully others or to shut down discussion of "incorrect" opinions.
Furthermore, technology is fairly unique in it's communication. In many fields, communication is there to create a sense of community and in-group status - creating a tribe. In our field, most communication is simply about facts. It's quite easy to ignore "you're wrong because X,Y,Z and a big jerk" - just evaluate argument X,Y,Z and update your beliefs accordingly.
Back when I lived in NY, a coach told me (rough paraphrase): "Tu debil. Necesita para construir tu corpu." ("You're weak. You need to build your body.") In the recent past, the tech world's culture was a lot like that of a mexican boxing club. The correct response is "si, mi SQL debil, eu pratico." ("Yes, my SQL is weak, I'll practice.")
Somewhere along the line, we gave this up and became a culture where feelings matter more than results. I think the solution here is for the tech world to regrow the thick skin it once had.
[1] A post about functional programming is limited in it's eventual virality.