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

Here is the history of my suggested edit of one of the answers to this question.

But I don't understand, why was this suggested edit rejected by the community?

share|improve this question
14  
Given that this looks like you're fixing a mistake in code it might be more appropriate to comment on the question and see what the OP thinks. –  Flexo Aug 3 '12 at 9:35
5  
It's one of those things where, even if you're right, people tend to be cautious, preferring for you to leave a comment. –  Bart Aug 3 '12 at 9:37
1  
(The reason being that the OP may have meant to override a different method that should return a boolean or use some other code instead) –  Flexo Aug 3 '12 at 9:38

3 Answers 3

up vote 15 down vote accepted

I'll usually reject suggested edits that change code unless there's a good reason not to. It's very easy to change the meaning of an answer unintentionally with even small code changes.

The only reason I approved your suggested edit was because:

  • The change was trivial and unlikely to introduce an error (removal of an entire return statement).
  • There was supporting evidence in the accepted answer on the question that the post you edited had meant to override a void function.

Often when people are reviewing edits, they don't have any context other than what is in your comments on the edit. I believe yours were something like "void functions can't return a value". Without context, it's hard to know if the overridden function (OnBackPressed) should have been declared as void or bool.

You may have had similar changes accepted in the past however because some people are significantly more likely to approve an edit than reject one, so there's also an element of luck/timing involved...

share|improve this answer
5  
@prizoff Slightly OT: with respect to the first suggested edit linked by forsvarir, please make sure you fix all issues in a post while you're at it. Not just the code. The bold formatting is unnecessary, as is the "Thanks" message at the end. I might have rejected your suggestion as "too minor" if I'm particularly grumpy. –  Bart Aug 3 '12 at 10:20
1  
There's no particular reason to reject edits to answers just because they change code. This case was evidently a good edit and you were correct to accept it. Please do not give the impression that such edits are unwelcome. –  Gilles Aug 31 '13 at 14:48

If you look at the "how to edit" block shown when you suggest an edit, you will notice it shows the following points:

  • fix grammatical or spelling errors
  • clarify meaning without changing it
  • correct minor mistakes
  • add related resources or links
  • always respect the original author

None of those points is about code, but somebody could argue that changing the code you are changing the answer given from somebody else.

I would generally suggest to avoid editing the code given in a post. If there is a typo in the code, I would write a comment letting the user who wrote the post know that; if the answer is suggesting using a function, and I believe there is a better function to use, I would write a comment about that.

In the case you think the code is completely wrong, or there is alternative that could be used, then you should write your own answer, rather than editing the answer given from somebody else.

share|improve this answer
1  
If you look at the “how to edit” block that you helpfully quoted, you'll notice that it includes “correct minor mistakes” and “respect the original author”. This was a correction of a minor mistake and it respected the original author (who went and made the exact same change after he became aware of the problem). There is no reason not to correct mistakes in code. A comment would have been the wrong thing in this case: comments are only for unresolved issues. –  Gilles Aug 31 '13 at 14:50

This is very clearly a good edit that should have been accepted. I'm sorry for the reaction you got.

This is a textbook case of a good edit:

  • It fixes a small mistake in an otherwise good answer.
  • The edit summary explains the mistake.
  • The mistake is easy to verify: indeed, return true cannot work for a method whose return type is void, and anyone who is familiar with a large number of C-like languages (C, C++, Java, C#, etc.) can spot that.

The rules for editing state this clearly:

When should I edit posts? (…)

  • To clarify the meaning of the post (without changing that meaning)
  • To correct minor mistakes

This is a minor mistake being corrected. The meaning of the post isn't changed: it's just a code example that was made correct. The original author was respected: after you pointed out the problem to him in a comment, he went and made the exact same change.

I'm sorry that your valuable contribution was rejected. Sadly, this is an old problem on Stack Overflow — reviewers who reject edits in direct contradiction with the rules and core values of Stack Overflow. Please keep up the good work nonetheless.

share|improve this answer
1  
It can't be verified that easily: It'd possible that the function should return bool and the return statement was correct, or that it should return void and the return statement was incorrect. While one can verify that void is correct using the documentation, that's not generally expected of reviewers. –  CodesInChaos Aug 31 '13 at 15:42
3  
@cod It can be verified easily, and that very much is expected of reviewers. We should not leave obviously broken code lying around. If it's fundamentally broken, downvote. If it's mostly correct, edit. –  Gilles Aug 31 '13 at 16:17
2  
If a reviewer is incapable of verifying the correctness of an edit (or simply unwilling to take the time to do so), he should skip it, not reject it. –  Old Checkmark Aug 31 '13 at 20:04
    
More than a year late answer :) Nice to see. I even do not know, maybe I should accept it as correct? –  Prizoff Sep 1 '13 at 6:45

You must log in to answer this question.

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