14

I came across How to convert a c string into its escaped version in c? and found the code at the end of the accepted answer to be suitable for my needs. But the calls to fputs and fputc had the arguments reversed -- a common mistake, and easy enough to fix.

I fixed this error, tested it to make sure it compiled, and submitted it as an edit with a brief but sufficiently thorough description. The edit was rejected 3-to-2, and I don't understand the reasons given:

This edit changes too much in the original post; the original meaning or intent of the post would be lost.

The meaning was perfectly clear. I could understand this reason if my edit were to a question, but that's not the case here.

This edit is incorrect or an attempt to reply to or comment on the existing post.

It is neither.

A brief review of When should I make edits to code? suggests that my edit was reasonable:

Do:

  • Test your edited code to make sure it works
  • Fix syntax errors and typos

Don't:

  • Change the code logic or functionality — even if you think you're correcting it

So I'm left at a loss for why my edit was rejected. I'd like either for someone to explain to me where I went wrong so I don't make this mistake again, or for my edit to be re-reviewed if my logic is sound.

7
  • 11
    Seems the poster reviewed your reviewed your edit when he noticed your effort and he approves and applied it manually. Imho, yes, you did it exactly right, but just got caught in the works. Trouble is, too many code-edits are wrong, they are much harder to properly verify, and thus even a good one is more likely to get stopped. Comments work much better there... Commented Aug 6, 2014 at 0:15
  • 3
    Another problem is that things go through the edit review queue very quickly. If I had encountered this in the review queue, I would have needed to look up the function definitions to confirm that your edit is correct. By the time I was done with that, the vote would most likely have been finished. A lot of reviewers blindly reject all code edits, without even trying to verify if they are correct. Commented Aug 6, 2014 at 0:44
  • I googled this having been hit with exactly the same thing myself in the last 30 minutes; 1 vote for versus 4 votes against. I understand the reasoning given above, and in this case I sorta-kinda know the answerer, so I'm confident she will (probably) update once she sees my comment; however comments are only good if a) the answerer checks and updates their post accordingly, or b) the person in search of an answer reads comments. Would it potentially warrant another answer just to correct a typo? That seems like answer-clutter.
    – indextwo
    Commented Aug 6, 2014 at 16:57
  • 2
    @indextwo: I wonder if it would be worthwhile to have a "defer" button reviewers could use for edits which alter the meaning of a post, but seem to be trying to do so in a way the author of the post would agree with; if a reviewer clicks "defer" on an edit that's less than 24 hours old, allow the original author of the post to make a judgment as to whether to keep it?
    – supercat
    Commented Sep 30, 2014 at 13:25
  • 1
    @supercat That's an interesting idea, although I suspect it would be rejected by serial answerers as too much to try to maintain, perhaps. I suspect a big part of this problem is serial rejectors more than anything else.
    – indextwo
    Commented Sep 30, 2014 at 14:07
  • 3
    @indextwo: If someone notices a mistake in code, having someone who notices a typo write a comment "I think you wrote forbnitz in line 23 when you should have said frobnitz", having the original poster notice the comment, find line 23, and fix the problem, is apt to be far less convenient for all involved than would be a means by which someone notify the OP of a suggested edit which could stay in the OP's notify queue until accepted or rejected.
    – supercat
    Commented May 8, 2015 at 22:03
  • Good read meta.stackoverflow.com/a/288836/792066
    – Braiam
    Commented Apr 18, 2016 at 12:12

1 Answer 1

3

It got rejected because the people reviewing thought that you were breaking the Don't rule:

Change the code logic or functionality — even if you think you're correcting it

You did change the code - even if to correct the logic to produce intended output.

I cannot comment on the question of 'did you help the answerer or not?' but the first reason of

This edit changes too much in the original post; the original meaning or intent of the post would be lost.

holds, even though the change was for the better(supposedly).

I think a safer option would be to let the answerer know to check that part of his code, and let him change it.

3
  • 1
    ... and even downvote if you think the code is wrong, then take back your downvote after the answer is edited. That has happened with my answers in the past.
    – cst1992
    Commented Apr 18, 2016 at 10:50
  • I notice the "even if you think you're correcting it" part is removed now. Have the rule been changed?
    – xskxzr
    Commented Jul 12, 2018 at 5:10
  • @xskxzr Don't know. Here is a list of revisions to that post. It was migrated there from somewhere else, and it's hard to say when that particular change was made. But then it seems to have been rolled back.
    – cst1992
    Commented Jul 12, 2018 at 6:32

You must log in to answer this question.

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