4

Earlier this morning I tried to check up on my comment from yesterday, on this particular question.

However, my comment (and one or two similar comments) disappeared without a trace; the comments were something like:

This is an excellent example of how not to write comments. Your comments do not add anything that is not already obvious from the code. You should read up on how to write comments in order to both save time not writing unnecessary comments as well as improve your code quality. For example http://blog.codinghorror.com/code-tells-you-how-comments-tell-you-why/

And from another user:

Please choose meaningful parameter names instead of "number1" and "number2", which tell us nothing.

Both receiving some upvotes within a few minutes, confirming that other users think alike.

But why then were both comments deleted? While I agree that both (especially mine) could have been formulated more nicely (similar discussion), they offer good advice (and even a starting point!) for an obviously inexperienced programmer. Furthermore, I thought about adding specific examples, but I don't think comments necessarily allow for this kind of detail.

Is code criticism and tips on how to improve your code not allowed in comments? If not in comments, where else? Although it might be offtopic, shouldn't SO help users get better at programming?

6
  • My two cents: The fact that you gave a random-internet-link as an example rather than an authoritative source already hints at how opinionated your advice is. You might be right that commenting is done bad, but there are no cold hard facts to provide as an alternative.
    – Gimby
    Jan 16, 2015 at 9:13
  • SO users gained the right to be insulted by anything you say. Moderators will insta-delete such comments. Nothing to do with good advice or teaching newbie programmers, just keeping the complaint inbox as empty as possible. Downvote unhelpful questions. Jan 16, 2015 at 9:14
  • 1
    The reason for a seemingly random internet link instead of a proper book suggestion is that in my opinion a small, but well-written blog entry is more likely to be read, especially if the programmer is learning programming in the first place. A book might overwhelm an inexperienced user with concepts and rules they might not understand.
    – SebiH
    Jan 16, 2015 at 9:17
  • @HansPassant your are probably right; however in this case I don't think the question is necessarily bad, at least not justifying a downvote (don't have enough rep anyway).
    – SebiH
    Jan 16, 2015 at 9:19
  • 11
    Wow, a codinghorror post being described as "a random-internet-link" on SO; times sure have changed!
    – AakashM
    Jan 16, 2015 at 9:36
  • 1
    I find this disturbing too, because usually, such comments are just trying to made good answers, perfect answers. You can't just handle this by voting down. I thought this thing called "constructive critic", as seen in scientific debates, are a good thing. Jan 20, 2016 at 11:52

0

You must log in to answer this question.

Browse other questions tagged .