Public versus private though. If my adviser came in with a printout of something I wrote and told me, "This is garbage and unworthy of the electrons used to send it to me," I would be OK with that -- but if he stood up at a conference, put it on a projector, and said, "My student wrote this worthless crap" I would be (rightly) angry about it. Insulting someone's work to their face in a private setting is not nearly as bad as publicly demeaning their work.
One, I still think telling someone that something they have done sucks is harder to do in person than online. But two, the point is that the incident in question was pretty much "you suck because your code sucks."
Telling someone their hard work and best efforts suck DOES hurt their feelings. If you don't recognize that and go around telling people their work sucks, then you might be an asshole.
>>>Telling someone their hard work and best efforts suck DOES hurt their feelings.
And so what? You think books don't get bad reviews? Movies? TV shows? School tests? It's part of life. Take the hit, move on. Do better if you must.
EDIT to add: When it comes to one-on-one being told your work sucks, the best response I think is this: "OK, if it sucks, tell me how, because I'm not yet able to see it and I'd rather not suck." That's better than just stewing in hurt feelings and never improving or knowing how to improve.
There's this little dog that lives next door to me who is always ready to bark at any one (dog or person) that passes, even if they're far bigger than he is.
Wow, that little guy has such a pair he can hardly walk!
Of course, if he weren't so aggressive, I'd be able to bring him along for long walks with us, scritch him behind the ears when we pass by, etc..
Our other neighbors have two dogs I take running with me now and then; not him, though.
My own dog, interestingly enough, doesn't back down when he runs at her (as a lot of dogs do, actually, even bigger ones). She doesn't attack him back, either -- she just doesn't even take him seriously (though he's trying...), and she feints and jumps, ducks and tries to play -- and he generally runs off after a pass or two of this; he realizes she's not backing down, and he gives up.
So she handles the confrontation that's needed with good humor and aplomb, without running away or even dropping to his level and getting nasty.
She hasn't got a pair, of course, but I can really respect how she handles him.