You know, this is really what we have to keep in mind, or at least try to any way. Doesn't stop it from stinging a bit when it happens though. Especially when they are the first kind of comment you receive when you show a project in a public forum.
I usually expect a couple of 'Fuck you. My eye's are bleeding from your coding." style comments anytime I show a project publicly, but there are still times that it catches me off guard.
For instance, not even code related, I once asked on Reddit for a couple of people to help beta test a Skype plugin I was working on. At that time, I had never written a threaded piece of software before, and had no idea how it would perform when a bunch of users were accessing it simultaneously. I wanted a larger test pool than the two or three of my friends who were online at any given time allowed.
So I made my post, and received almost entirely negative feedback from it. To the point that I was completely unprepared for. I got stuff about what a loser I was, and even PMs about how I should just kill myself now for being such a loser, etc, etc.. It seemed like once the first negative comment popped up, the bandwagon effect took over, and suddenly it was an inbox full of hate.
So I sat there in my chair, wondering what the hell just happened, what I did to all of these people people to cause such hostility, and on top of that, I sat there wondering why I even cared what a couple of assholes on the internet said. I didn't want to care, or be that guy who was bothered by "the mean people on the internet," but dammit I was a bothered by the whole thing.