Simple and straight question, which may not get so straight answer though:

If someone posts code without comments or explanation, is it wrong to add comments to the code, so other users can understand it (instead of just down voting it and moving along)?

  • 5
    So... what happens if your comments are wrong?
    – yannis
    Commented Apr 15, 2013 at 20:39
  • Well, I think any society should be based on presumption of innocence. Wrong comments can be rejected. Commented Apr 15, 2013 at 20:40
  • 6
    That's funny. I suppose you believe in free speech also.
    – user102937
    Commented Apr 15, 2013 at 20:41
  • You should comment on the post and ask for the OP to modify it! Commented Apr 15, 2013 at 20:41
  • Ok let me get this straight.. you know what OP thinks to the point where you can change the post so that other users, that don't understand like you, will understand ? Commented Apr 15, 2013 at 20:49
  • Most unfortunatelly, I don't really get your interpretation of the question. I'm talking about explaining what lines of the code do, what the variables mean and so on. Not explaining the OP's intentions. Commented Apr 15, 2013 at 20:52
  • You should be aware that many people who review suggested edits will reject them even if clarifying the meaning of a post without changing it is in the edit privilege. If you really want to do these edits you might want to wait until you have 2K Commented Apr 15, 2013 at 21:47

1 Answer 1


For the same reasons that we normally don't change other people's code (especially in answers), we shouldn't add comments to other people's code. It's their answer, let them fix it.

See Also
Should Suggested Edits change the technical content of a post?
Edit other user's answer or give your own answer?
Other than reformatting code, should you substantially alter a question's code samples?

  • So in this case should you just add another answer that includes much more detail?
    – ɥʇǝS
    Commented Apr 15, 2013 at 20:58
  • @Seth: This is referring to editing inline code comments into a question, not comments (in the SO sense) on a user's answer. Commented Apr 15, 2013 at 21:49
  • @DavidRobinson Oh, I thought it was about inline code comments in answers.. I understand what type of comment we're talking about ;-)
    – ɥʇǝS
    Commented Apr 15, 2013 at 21:50
  • Oh good- and yes, sorry, you're right that I meant answers :-). But in that case, adding comments (to the answer, not the code) would seem to me like a good middle ground Commented Apr 15, 2013 at 22:07

Not the answer you're looking for? Browse other questions tagged .