The comment referenced in the OP is condescending and unkind. It follows a pattern that appears in many comments: It's not about the question or answer, and it's not about the code. It's about the person.
You know what A
means, right? You know what putting a *
before a name means, right?
Some other variations on this that I see frequently:
Why would you think that doing "X" would cause "Y"?
What makes you think that "XYZ" will do "ABC?"
Where did you get the idea that ... (you get the idea.)
These aren't the worst type of comments and the intentions may not be bad, but they make a potentially useful comment unnecessarily personal. The person already realizes that they don't know something. That's why they asked the question.
If someone literally answered one of the above comment/questions, what would the answer be? If they didn't understand it, then any answer: "I thought it worked like that because..." would be useless. Do we really want someone to explain why they were wrong about something? What could that accomplish other than making them feel stupid? If we don't want an answer, why ask the question?
It may seem small to some, but the reason why I find it inexcusable is that it's far too easy to rephrase any one of those comments as statements.
Doing "X" doesn't cause "Y".
"XYZ" isn't the same as doing "ABC."
That's so easy and doesn't detract at all from what the comment needs to say, unless the intent really was to make someone feel stupid for not understanding something.
It's often hard to perceive a person's tone or feelings through comments. We can't fully control that, but we don't have to be oblivious of it, either. If we phrase our comments as questions asking why someone doesn't understand something, it's reasonable for them to perceive a superior, condescending tone.
A
means and what*
does in front of an identifier. But what does*A
mean?" that comment is not appropriate. That is, the quality of the question cannot justify a comment this far across the "border".