22

This edit came up in the queue the other day, which I rejected as I felt it should have been a comment, and I checked, was already a comment by the editor.

http://sqlserver2000.databases.aspfaq.com/how-do-i-search-for-special-characters-e-g-in-sql-server.html

LIKE 'WC[[R]S123456' or

LIKE 'WC\[R]S123456' ESCAPE '\' [The edit added ESCAPE '\'.]

Should work.

A few minutes later it came up again and was approved.

Was this a valid edit? Was I wrong to reject it?

9
  • 6
    It was unanimously rejected the first time, it got a reject from a new reviewer the second time. I'd say the first review was correct, too. Commented Oct 31, 2012 at 17:33
  • 7
    Generally speaking, I reject edits like this as it changes the 'meaning' of the answer. A comment can usually address the situation. Otherwise, the reviewers are put into the position of needing to judge the accuracy of an edit. Commented Oct 31, 2012 at 17:36
  • 14
    As an aside: folks re-submitting rejected edits sounds wrong to me.
    – Arjan
    Commented Oct 31, 2012 at 18:22
  • 2
    Yes, resubmitting is definitely impolite, and yes, I'd have rejected that edit too.
    – AndrewC
    Commented Oct 31, 2012 at 18:34
  • 5
    @Arjan agreed, but it is common. Part of the problem is editors aren't notified of the rejection unless they actually go looking for it, and they just see their edit wasn't applied and/or they didn't get their 2 rep points, so it gets resubmitted. Commented Oct 31, 2012 at 19:54
  • 11
    I was the editor in question. I wouldn't normally have changed the code in the question. However, the author identified a source for his answer, but did not quote it correctly. I made the assumption that the author did not misquote the source intentionally and felt that my edit was consistent with the author's intentions. Anyway, I'm glad to get some feedback on this, as I wasn't sure if my edit was beyond the scope of editing policy. Thanks!
    – Ryan Kohn
    Commented Oct 31, 2012 at 20:37
  • 2
    @Ryan: your edit was fine - the unintended omission of the escape clause becomes obvious once you click the link to the provided article.
    – Shog9 Mod
    Commented Oct 31, 2012 at 22:18
  • 2
    @psubsee2003: yeah, that's a problem.
    – Shog9 Mod
    Commented Oct 31, 2012 at 22:38
  • 3
    This shows ways it is so inportant a times to put a good comment on a edit. Commented Oct 31, 2012 at 22:58

3 Answers 3

51

That edit was completely valid. The answer linked to and quoted from an article that included the ESCAPE clause in the second code block, but omitted this clause. This was almost certainly unintentional, and the edit was in keeping with the intended meaning of the answer.

This is why simple rules like "don't change code" when editing are bunk. If you don't understand what the edit does, don't touch it. And if you aren't willing to put 30 seconds into reading what the author wrote to explain the edit, don't touch it. Particularly if you can't be bothered to interpret an edit in the context of the post where it was made, learn to love that Skip button.

I've restored the edit, and thanked the editor.

1
  • 2
    same effect could be achieved with much less drama if change has been proposed in comment instead of editing (answer author is active at SO). Upvoting only because of learn to love that Skip button which alone outweighs all the rest
    – gnat
    Commented Oct 31, 2012 at 23:00
-1

Generally speaking, code should not edited, whatever it's code shown in a question, or in an answer. It would be better to leave a comment for the author of the post, and let her/him correct the mistake.

Even in the case of fixing a typo (e.g. the code is missing a semicolon that should be there), the edit would make correct an answer that is not correct. That is then more true when the code is suggesting to use a function that should be not used, or a function that is preferable not using in that context.

Rejecting the suggested edit was the correct thing to do.

-2

This edit should have been rejected. The edit was changing the meaning of the post. Edits (from anyone other than the author) shouldn't change the actual content, they should only help others read the content of the original author by improving grammar, spelling, formatting, etc.

The only possible difference that I might have done is used "radical change" as the rejection reason, as the major problem here is that it's altering the OP's meaning or intent. There is a fair bit of overlap between that and "invalid edit" though. "Invalid Edit" isn't wrong, it's just not quite as good of a fit in my eyes.

I have rolled back the edit since it is entirely invalid. (Unfortunately there is no way to have the 2 rep points reversed, or to adjust the users approve/reject ratio as displayed in the review queue and as the metric used to block users posting many invalid edits. The best we can do is ensure the actual content that they've changed is fixed.)

If the code is in fact incorrect, or in some way does not answer the question without this change, then the appropriate response is to post a comment for the author to change it (which had already been done), or to downvote the post (or both).

9
  • 6
    I know one of the rejection reasons is "This edit changes too much in the original post; the original meaning or intent of the post would be lost". And I tend to agree with what you're writing. But on the other hand: Other people can edit my posts?! claims "this site is collaboratively edited, like Wikipedia. If you see something that needs improvement, click edit and help us make it so!" So, is there any reference to support the statement "Edits (from anyone other than the author) shouldn't change the actual content"?
    – Arjan
    Commented Oct 31, 2012 at 21:30
  • @Arjan Sure, see this relevant FAQ post. In particular the section "What should I not do?"
    – Servy
    Commented Nov 1, 2012 at 13:56
  • 7
    When editing, always strive to make the author look good. Slavishly preserving obvious mistakes does not accomplish this. Editing mistakes in code is no different than editing mistakes in grammar or spelling in this regard.
    – Shog9 Mod
    Commented Nov 1, 2012 at 15:31
  • 3
    Why would you ever revert it to a broken state? The whole point of StackOverflow is to provide useful information. The reason that questions and answers are preferred to comments is that it's a lot easy to just look at a question and the top answer, than look through a long convoluted comment thread to find the answer and the clarification that's necessary to make the answer work. That's the old forum model, that StackOverflow was designed to get away from. Instead, like Wikipedia, if there's an obvious fix that would make the answer correct, you should just do it. Commented Dec 18, 2012 at 20:22
  • @BrianCampbell The theory, particularly in this specific case, is that the OP should notice the comment, fix the mistake if they feel it's appropriate or explain the code if it's not. As long as the poster is still active on the site, it's usually best to discuss such changes with them.
    – Servy
    Commented Dec 18, 2012 at 20:26
  • @BrianCampbell: In addition, it's perfectly within your right to post the correct answer.
    – user102937
    Commented Dec 18, 2012 at 20:28
  • 3
    @Servy Yeah, but not everyone is still active. If you come back to a three-year-old answer, you can't assume that the person will ever see your comment or respond to it. I agree that discussing first is probably best; but that doesn't mean you revert a valid change just because someone didn't follow the ideal protocol in making it. Commented Dec 18, 2012 at 21:57
  • 4
    @RobertHarvey Posting a correct answer when there's already an accepted answer with 10 upvotes, on a question with half a dozen answers, isn't very helpful to new visitors. That gets you back to the "forum thread where you have to dig through a bunch of junk" problem that SO was explicitly designed to avoid; the OP will probably not come back and accept a different answer. We have editing precisely so that you can put real fixes in the top answer, so that that one person isn't the only person who can fix an actual mistake in their answer. Commented Dec 18, 2012 at 22:01
  • @BrianCampbell I don't buy that argument. That would mean you don't write a perfectly correct answer because there is an half correct answer with 10 up-votes. No, it is useful to new users. If they don't bother to read all the answers is their fault, not the fault of the who added an answer that is more correct, or updated.
    – avpaderno
    Commented Aug 27, 2017 at 9:10

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