What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

Having been fairly active on Stack Overflow's suggested edit review queue in the past couple of years, I observe that there are a number of worthwhile suggested edits that get rejected because they change more than the form of an answer. But that's wrong — edits that make an answer more correct should be accepted.

To give at least one example: a few days ago, I caught a suggested edit that already had one rejection. But this edit was right. I know because this was my own answer; I'd probably typed the code directly into my browser, and someone came along, tried running the code, and fixed a few syntax errors. This isn't an isolated case, though I find it hard to search for examples (a vast majority of edits are either obviously bad or on subjects where I don't know enough to judge).

In the example I cite, I wouldn't have had my mistake pointed out if I hadn't happened to look through the edit queue at that particular time. Notifying users of edit suggestions on their own posts would help, but that's not the whole answer. Users with the edit privilege can go and fix a mistake in any post. Suggested edits are meant to give that power to anyone, with supervision.

Related prior discussion: Should Suggested Edits change the technical content of a post?, which strangely seemed to discourage edits that improve the content of a post. This comes up again and again on Meta Stack Overflow (recent example). Yet the guidelines for commenting and editing clear state that you should edit out minor mistakes:

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. (…)

  • To correct minor mistakes or add updates as the post ages

When shouldn't I comment? (…)

  • Suggesting corrections that don't fundamentally change the meaning of the post; instead, make or suggest an edit;

How can we strive to get worthwhile improvements past the suggested edit review? In particular, how do we educate Stack Overflow participants (I think this attitude is more prevalent on SO) that it is ok, and even encouraged, to correct minor mistakes in answers?

share|improve this question
2  
Related: What can we do to stop bad edits getting accepted? –  Gilles Jun 26 '12 at 21:15

3 Answers 3

It seems to me more productive to leave a comment explaining why the author's code is invalid, and allow the author to make the necessary changes. By suggesting an edit, you're involving at least two other people who may or may not understand the author's intent. It's better to have a conversation with the author and allow them to either fix their own code, or explain why the code is correct as written.

Prior to the suggested edits system, it was generally understood to be bad etiquette to edit someone else's code, especially in a question.


That said, if you still insist on modifying someone else's code with a suggested edit, and want to increase your chances of it getting approved, leave a detailed explanation of why your edit is correct in the "edit description" box. I have approved a number of suggested edits where I didn't fully understand the code changes in the edits (I'm not proficient in every programming language), but the reasoning in the explanation made perfect sense.


Here is an example of an edit I would probably approve:

MyTyp type = new MyType()

Becomes

MyType type = new MyType();

...because the intent is clear, and the fix is obvious.


Here is an example of an edit I would probably reject:

MyType myType = new myType();

becomes

var myType = new myType();

...because the use of var is a preference, and the real problem wasn't fixed, the casing of myType.


If a user extensively modified a post in a way that had nothing to do with the post, I would probably reject it also. Example: A suggested edit changes a post to use parameters instead of string concatenation to avoid sql injection problems, and the post was not asking about sql injection.

share|improve this answer
    
What about anonymous editors? And yes, I have seen worthwhile content edits from anonymous editors (didn't save the link, sorry). And let's not muddy the waters with questions, I agree that editing a question for more than presentation is highly risky. This is about cases where the edit is clearly (if you know the subject) making the Internet a better place. –  Gilles Jun 26 '11 at 10:35
    
Anonymous editors? You mean editors who don't leave an explanation of their edit? I think I've already covered that. –  Robert Harvey Jun 26 '11 at 15:46
    
@Robert Anonymous editors, as in, people who don't have an account. They are allowed to edit, by design. If you don't know whether an edit is correct, you're not supposed to reject it, you're supposed to ignore it, it says so in the instructions on the review page. –  Gilles Jun 26 '11 at 15:58
2  
I don't think there's any difference between a suggested edit made by an anonymous editor and one made by a registered user. I didn't say anything about rejecting edits. –  Robert Harvey Jun 26 '11 at 16:00
4  
@Robert Anonymous editors, or registered users with <50 rep, cannot leave comments. But if they see something wrong, they can suggest edits. Which you're now telling them not to do. –  Gilles Jun 26 '11 at 16:05
    
Oh, they can suggest all day long. Doesn't mean they're going to get approved, though. I see what you mean about the comments, but how hard is it to get 50 rep? –  Robert Harvey Jun 26 '11 at 16:05
5  
@Robert From Jeff's blog post announcing suggested edits: “the millions of drive-by anonymous users that visit our sites every day can submit an improvement or correction”. You're saying that you reject their submissions not because they're incorrect but on principle. That goes against the very purpose of suggested edits, and edits in general. –  Gilles Jun 26 '11 at 16:46
2  
Did you read the last paragraph of my answer? If you can make it clear to potential approvers why you're making an edit to someone's code, it makes it easier for the approver to approve. I don't think I'm making myself clear, so I'll add some examples to my answer. –  Robert Harvey Jun 26 '11 at 16:54
    
Robert, I think that adding an additional comment adds an unnecessary extra step. If the edit is good, then it should be incorporated in to the answer, not added as a comment in the hopes that the person who answered the question will review the comment, realize their mistake, and then correct it. If the answer is bad and suggested as an edit, it can be easily rolled back by the author of the original answer (whose name is attached to it), or responded to by the asker, or any community member who thinks it is improper. Comments are second-class citizens and shouldn't advocated here... –  jmac Oct 10 '13 at 1:36
    
@jmac: Well, it is one of the few officially-sanctioned uses for comments... Asking for clarification. And I did say in my answer that you could make an edit... if you really feel compelled to do so. And there really isn't anything else I've stated in this answer that's not factual. –  Robert Harvey Oct 10 '13 at 5:16

What about adding the ability to leave a comment for the other reviewers when you approve an edit.

This won't catch all the problems - but if one of the first few reviewers notices that it's actually a good edit and suspects it's about to get wrongly rejected, he could leave a comment pointing out some of the mitigating factors - something to make the other reviewers at least stop and take a second look.

share|improve this answer
    
This already exists, it's called the edit summary. A correct edit has (or should have) a far better chance at being accepted if the edit summary is “add a step that's necessary since version 5” than if it's “added 158 characters in body”. –  Gilles Jul 1 '13 at 8:01
3  
@Gilles I was thinking more along the lines of a reviewer leaving a comment, not the editor. –  jcsanyi Jul 1 '13 at 8:02
1  
Oh, I see. Yes, occasionally I've missed that. But it's a rare case, I'm unconvinced that adding this technical tool will make a dent which what is primarily a social problem — some reviewers are against edits that make corrections. –  Gilles Jul 1 '13 at 8:04

I believe you have identified the contradiction between the commenting and editing documentation that leaves posts with small errors unfixed.

However, in (my) practice, these are best fixed by leaving a comment for the OP (or some kind editor with full edit privileges) noting the typo, etc. The comment is then deleted when the error has been fixed.

Coming from Wikipedia, where minor edits are common, I believe this is a feature we want somehow -- presumably it has to be a threshold issue of some sort where small edits can be accepted but aren't worthy of reputation.

But some "small edits", especially in code sections, can be important enough for reputation or even too big to be accepted as suggested edits.

share|improve this answer
    
A comment is a bad workflow when the fix is obvious. Comments are for cases where you notice a flaw but aren't sure how to fix it, or when the flaw is so major that it would require a significant rewrite of the answer. For an obvious minor flaw, it's better if it get fixed quickly, even if the author isn't responsive. That's why we have edits, and edits is why we can have quality answers that stand the test of time. –  Gilles Jul 11 at 7:18
    
But the system won't even accept some small edits. –  Mark Hurd Jul 11 at 12:11

You must log in to answer this question.

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