34

This edit shouldn't have been accepted.

This

cmd.Parameters.AddWithValue("@CustomerCode", txtkey2.Text);
cmd.Parameters.AddWithValue("@CustomerName",txtkey2.Text);

was replaced with:

cmd.Parameters.Add("@CustomerCode", SqlDbType.Int).Value = 
        (DropDownList2.SelectedItem.Text== "int" ? Convert.ToInt32(txtkey2.Text) :(object)DBNull.Value); 
cmd.Parameters.Add("@CustomerName", SqlDbType.NVarChar, 50).Value = 
        (DropDownList2.SelectedItem.Text == "string" ? txtkey2.Text : (object)DBNull.Value);

and the comment to the edit was: improved formatting. That is more than just improving the formatting.

I know that the edit can be undone by going back to an earlier revision, but it shouldn't have been accepted in the first place.

Also this edit shouldn't have been accepted as well:
this

    if(!memcmp(p, p+far_half, near_half))

was replaced with

    if (memcmp(p, p+far_half, near_half))

The ! was removed. The edit was made by an anonymous user.

Is there a proper way to flag invalid edits like that?

8
  • 4
    792/46 and 128/1 -accepted/rejected - explains it all...
    – user2140173
    Commented Apr 17, 2014 at 9:44
  • this doesn't even improve anything. Commented Apr 17, 2014 at 10:47
  • 1
    The if (memcmp(... change seems to be correct to me. The function wants return false if area one and two are not equal (they are not zeros). The algorithm still seems flawed, but the anonymous post seems to be correct. It is not invalid to change the meaning, if it corrects things. Commented Apr 17, 2014 at 15:01
  • 12
    @artlessnoise yes it is, changing the meaning is not appropriate, leaving a comment explaining the flaw is the correct approach. Commented Apr 17, 2014 at 16:58
  • 1
    @AndyHayden Do you have a reference? Apparently, this is desired. Certainly, if reviewers recognize a change is correct, they can approve it. To expect it, is not ok. In this case, the anonymous poster can not leave comments. I think the majority rule worked out ok, in this case. Commented Apr 17, 2014 at 17:20
  • 1
    @artlessnoise It's practically a religious argument, but I think the general feeling is right now that you don't correct errors in answers. If you think it is wrong, post your own answers. The big problem with doing it in an edit is the odds are none of the reviewers will be able to tell if it's better or not. Even for something like c++ you would end up with so many reviewers not knowing it that either semi-robo-reviewers would aprove it, or so many reviewers would have to skip it that it would be very annoying. Answers can be easily evaluated by the tag experts.
    – Joe
    Commented Apr 17, 2014 at 17:40
  • 1
    Further, @artlessnoise, the post you link to goes back to 2008 - lots of things, almost the whole philosophy of the site, has changed since then. You're not entirely wrong, but I think the general attitude right now is to prefer not to make error corrections in edits (unless there is OP approval).
    – Joe
    Commented Apr 17, 2014 at 17:41
  • 2
    @artlessnoise that link does not say you should make meaning changing edits, it is about improving an answer (which is very different). This is probably a better reference answer: meta.stackexchange.com/a/181337/184179 Commented Apr 17, 2014 at 17:58

3 Answers 3

32

The edit was approved by the OP of the question. He has a binding vote on approving edits, so he obviously approved of the changes.

enter image description here

6
  • 40
    +0; freehand circles aren't red. Commented Apr 17, 2014 at 13:37
  • 7
    I figured the new MSO needed a new color :) Commented Apr 17, 2014 at 13:44
  • 18
    BLASPHEMY​​​​​​ Commented Apr 17, 2014 at 13:46
  • @TheGuywithTheHat +1 for you, since I've seen +0 for a long time ;)
    – Amit Joki
    Commented Apr 17, 2014 at 16:18
  • 1
    Would approving the edit be okay if the original poster hadn't also approved it? I would argue no, because the edit involved changing the code to something completely different.
    – user456814
    Commented Apr 17, 2014 at 22:18
  • 1
    @Cupcake Yeah, I'd agree with that, but the fact that the OP approved the first edit makes the bad approval argument moot. Commented Apr 17, 2014 at 23:37
6

For the first case:

There was a comment by OP mentioning the change, but it ended up being approved by OP, not 3 reviewers, as mentioned.

I personally would've rejected it for either (or both) of these reasons:

  • The suggested edit comment doesn't explain the change.
  • The comment, in my opinion, isn't a clear-cut cause for an edit - it's not "I made a mistake", it's "I also tried this" - the latter shouldn't involve replacing code, but rather adding it below.

For the second case:

Should've been rejected.

Edits are not to correct posts, one should use comments to point out the mistakes instead.

What should be done:

You could simply @-reply to the editor (yes, you can), telling them that edits are not appropriate to fix mistakes in code, but just to fix formatting problems, or clarify the post, and that comments should be used for this purpose instead. I realize some users might not have the required 50 reputation to comment, but they shouldn't be suggesting inappropriate edits instead (a flaw in the system, I guess).

In the case of anonymous edits, you can probably just skip the comment (no-one to reply to...).

In either case, you should probably revert the edit (which can be done from the revision history).

It might be a bit of an exception if OP hasn't been online in quite a while, in which case they're unlikely to fix their posts any time soon. I'll post a question on this aspect.

An alternative is flagging the post, although I doubt moderators will do much more than mentioned here - if they're feeling hard-working, they may go investigate edits by that user (which you can also do yourself, to some extent). If you already investigated and found lots of instances of this by this user, you could flag the post, explaining the situation (including the investigation).

But we should really be training our reviewers to be better at reviewing... (one idea).

3

Flag the question using the "Other" option. Then link to the edit in your message and explain what the exact problem is. Then a moderator can review it and see if any action is necessary.

However, it seems the OP was one of the approvers and the edit seems based on a comment by the OP. So in this case that might not be necessary.

10
  • 1
    But a couple of robos approved it too.
    – devnull
    Commented Apr 17, 2014 at 8:52
  • 1
    Robos, or did they see the comments @devnull? Hard to tell and difficult to take any action on.
    – Bart
    Commented Apr 17, 2014 at 8:52
  • I can see that comment now, but the comment on the edit didn't mention that. I don't know about you, but I wouldn't have checked the comments.
    – Howli
    Commented Apr 17, 2014 at 8:53
  • Right, the comments give robos an alibi.
    – devnull
    Commented Apr 17, 2014 at 8:53
  • @Howlin my gut feeling say you're right about the robo nature of two approvers, and a flag would still do no harm, but I wouldn't be surprised if nothing ends up being done about it in this particular case.
    – Bart
    Commented Apr 17, 2014 at 8:54
  • And what about the second suggested edit that I linked to?
    – Howli
    Commented Apr 17, 2014 at 8:54
  • 1
    If that is indeed a correct correction, one could argue it's just fine @Howlin. It's an often debated topic.
    – Bart
    Commented Apr 17, 2014 at 8:55
  • 1
    The robo nature of one of the reviewers can be seen here too.
    – devnull
    Commented Apr 17, 2014 at 9:02
  • And here
    – Howli
    Commented Apr 17, 2014 at 11:02
  • So my answer applies.
    – Bart
    Commented Apr 17, 2014 at 11:03

You must log in to answer this question.

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