29

Today I edited a post to fix a minor bug in an answer for which another user disagreed with and commented:

Do not agree editing an active user's highly rated 5 yr old answer is good SO etiquette. Better left for [the original author of the post] to do as desired.

In general, I don't edit others answers unless it's a very minor change or formatting change (191 edits in nearly 4 years and very active on SO). If it's a major change, either I comment on it or post a new answer.

Plenty of my answers have been edited by others. I sometimes miss the "be" in sentences, mix up "should" vs. "must", "a" vs. "the" etc -- as a non native English speaker I welcome such edits on my posts even if it's technical in nature as opposed to just grammar. I say this to clarify that I personally never had any issues with edits as long as it improves a post.

As far as I am aware I have never known such an etiquette and being an infrequent user on Meta, I might have missed such an etiquette if it exists.

As I understand anyone can edit on SO as anyone's post to improve as it's a collaborative site. Hence I don't think there's any legal issue or policy/guideline violation here.

So my question is there any such etiquette violation here on such edits?

8
  • 1
    That other user was not the OP of the answer?
    – rene
    Commented Dec 31, 2015 at 19:40
  • 1
    No. Not the OP.
    – P.P
    Commented Dec 31, 2015 at 19:41
  • 6
    The edit in question isn't a grammar fix, a formatting change, etc. -- you changed the code itself (as you noted at the start, but contrary to the next couple of paragraphs). Mentioning the bug in a comment so that the (known-to-be-active) poster could fix it would be the better / more respectful move.
    – Paul Roub
    Commented Dec 31, 2015 at 19:43
  • @PaulRoub Yes, my edit was code change but I said "even if it's technical in nature as opposed to just grammar". So I don't contradict here. And the answer to my question is: no, I shouldn't make code edits even if it's a minor one?
    – P.P
    Commented Dec 31, 2015 at 19:50
  • 2
    Not an answer, just a comment, my opinion on that edit to that answer.
    – Paul Roub
    Commented Dec 31, 2015 at 19:58
  • @PaulRoub I don't see why fixing someone's bug would be "disrespectful". On the contrary! SO is a repository of good questions and answers, so I don't see why an edit that substantially improves an answer should be deemed a privilege of its author.
    – Anakhand
    Commented Jul 30, 2020 at 15:27
  • @Anakhand There's no legal or policy violation as such for substantial edits. My guess is that people generally prefer to maintain "authorship" (except for wiki posts). Major changes are typically posted as a new answer so that the right author gets the credit (I am not saying this is the right polciy to follow -- just my observation of what actually happens over the years).
    – P.P
    Commented Jul 30, 2020 at 16:25
  • @Anakhand Also the accepted answer from Shog9 makes the same/similar point as yours.
    – P.P
    Commented Jul 30, 2020 at 16:28

3 Answers 3

41

There's nothing wrong with fixing a minor bug / edge-case in an answer, especially when the problem has already been discussed in the comments.

That said, some folks are extremely paranoid about this. I find it's usually worth erring on the side of caution and over-documenting your change in the revision comments and possibly even the comments on the post itself. You did the latter, but a revision comment explaining your change (instead of the default " added n characters in body") wouldn't have hurt.

If there's a technical problem with the change, that's different... But so far as I can tell, the change you made was respectful and preserved the intent of the author. If anything, the fact that the author is still active on the site makes this less of a problem - the system has automatically notified him of the change, and if he dislikes it then he's free to roll it back.

As Stack Overflow grows and ages, the chance that individual authors will be able to maintain their past work becomes increasingly slim. In some cases, it suffices to post a new answer, but for trivial corrections this imposes an awful lot of overhead on every subsequent reader. The ability for editors to make corrections and for those corrections to be vetted by the community is an essential part of the site and must be preserved.

Related: How do we encourage edits to obsolete/out of date answers?

6

You did the right thing by editing. It doesn't matter how old or upvoted the answer is. If there's a bit that's undeniably wrong (not just a difference of opinion), and you know how to make it right, edit away. Just be sure that you're not missing something and jumping the wrong conclusion, and do what Shog9 says you did in this case, be respectful and preserve the intent of the author.

Expanding on a point Shog9 made:

a revision comment explaining your change (instead of the default " added n characters in body") wouldn't have hurt

Please do that. Given how many answers I've posted on Stack Overflow, I find myself reviewing code edits on them regularly. It's much easier if you leave a revision comment saying not only what you changed, but why. If you don't, and I can't immediately see the reason for the change, I have to open a new window to look at the answer in context, check for comments that might explain it, etc. A good revision comment probably only takes a few seconds to write, and is massively helpful.

More guidance on editing can be found at /help/editing, here are the first few paragraphs before it starts going into mechanics:

Why can people edit my posts? How does editing work?

All contributions are licensed under Creative Commons, and this site is collaboratively edited, like Wikipedia. If you see something that needs improvement, click edit!

Editing is important for keeping questions and answers clear, relevant, and up-to-date. If you are not comfortable with the idea of your contributions being collaboratively edited by other trusted users, this may not be the site for you.

When should I edit posts?

Any time you see a post that needs improvement and are inclined to suggest an edit, you are welcome to do so. The original author of a question or answer may always edit their own post, regardless of reputation level.

Edits are expected to be substantial and to leave the post better than you found it. Common reasons for edits include:

  • To fix grammar and spelling mistakes
  • To clarify the meaning of the post (without changing that meaning)
  • To include additional information only found in comments, so all of the information relevant to the post is contained in one place
  • To correct minor mistakes or add updates as the post ages
  • To add related resources or hyperlinks

Note "To correct minor mistakes" (my emphasis) in that list.

4
  • Okay, but what about buggy / sloppy code? Should we reward users for posting answers that are buggy or contain mistakes just because someone else came along and fixed their code, causing people to upvote their answer? I see suggested edits like that in the review queue, and it just doesn't seem right to me...
    – Nyerguds
    Commented May 15, 2018 at 13:53
  • @Nyerguds - It's a perspective thing I guess. Yes, fixing some sloppy code might earn the person posting the sloppy code an upvote or two. Does it really matter? Relative to providing a solid answer to the question that people can find and use for years to come? Naturally, if it's a rewrite or something, post your own answer instead, because it's not just a minor mod. Commented May 15, 2018 at 14:08
  • Point. I just think it may also encourage some people to write sloppy code "for years to come".
    – Nyerguds
    Commented May 15, 2018 at 14:10
  • @Nyerguds - Yeah, I hear you. :-) Commented May 15, 2018 at 14:14
-2

In my opinion, changing important parts of others answers, especially code, is something that should almost never be done.

I think it would create chaos on SO if the everybody considered it ok to correct/change others code. I'm sure we would see so many situations where someone thougth they spotted a bug and did a wrong edit of a correct answer. Later visitors would then think the original author failed and start down voting. What a mess..

In the queue of prososed edits I have seen way too many attempts where someone proposed changing the original answer to something different.

My suggestion is:

a) Post a comment for the author and describe the problem you see and encourage an update.

b) If the author doesn't update, post your own answer with the correction. This answer should have a clear reference to the original answer and a clear indication of what you changed.

5
  • 3
    Fixing the important parts is a good thing, as long as you don't change the intended meaning. And any reviewer who isn't sure should just "Skip", that's what it's for. Many are the updates/fixes not worthy of their own answer, but pure gold for the answer they target. Commented Jan 3, 2016 at 15:24
  • @Deduplicator - I agree that "fixing" is good - of cause. But I'm sure there would be so many cases where someone thougth they did "fix" something but actually didn't - simply because they didn't fully understood the code. In other words - a few good fixes but way more bad "fixes". Consequently I'll rather avoid any "fixes" at all.
    – 4386427
    Commented Jan 3, 2016 at 15:30
  • I specifically asked about minor bug fixes. I think, everyone agrees that large scale changes on other posts is not appropriate in most cases. If needed, a comment explaining why a better ans is needed or posting a separate answer is appropriate. I have noted as much in the question itself.
    – P.P
    Commented Jan 3, 2016 at 15:44
  • @l3x - In my opinion that's exactly the problem. "minor bug fixes" is a very vague definition. What I would consider minor, would be considered major by others and the other way around. The only safe thing (again, IMO) is to have a culture where you don't change others answers. Ask them to do it or post your own better answer.
    – 4386427
    Commented Jan 3, 2016 at 15:50
  • 3
    @StillLearning: "The only safe thing (again, IMO) is to have a culture where you don't change others answers." We don't have that culture at SO, and it's working pretty well so far. Quoting from /help/editing: "All contributions are licensed under Creative Commons, and this site is collaboratively edited, like Wikipedia. If you see something that needs improvement, click edit! / Editing is important for keeping questions and answers clear, relevant, and up-to-date. ... Any time you see a post that needs improvement...you are welcome to do so." Commented Jan 3, 2016 at 16:25

You must log in to answer this question.

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