26

I think editing away errors in people's question's code is not a good idea.

Here is an edit I rejected.

And here is what I wrote in the comments to the person who self-identified as the one who made the edit:

@... Please do NOT fix code errors in people's questions. That is an ANSWER. The error is the reason people asked in the first place - what's the point of editing the question instead of giving an answer? Show correct code in the answer, leave the errors in the question. IMHO. If you edit away errors people will wonder why there ever was a problem.

What is the consensus or majority opinion? If you agree, should such problems be included in the "review tests" given to reviewers? 3 out of 5 people accepted that edit.

PS: By the way, I rolled back the edit - the edit's author himself had agreed I was right too, in a response to my comment quoted above. (Link)


EDIT: Duplicate it is - but not of the question linked to, but of this question:

Edit review audits should contain "obviously" invalid code edits

10
  • 1
    By sheer chance I just noticed one updating one's own question: Revision 3 incorporated the accepted answer. I immediately advised him to not do that, as he was clearly actively watching, and fortunately that made sense to him.
    – Jongware
    Commented Dec 29, 2014 at 9:42
  • While it would be nice if audits had more of a training aspect to them to educate reviewers on how things should be done, could you imagine the non-stop complaining that would result because not everyone agrees on what the "rules" should be. It is bad enough when the audits are supposed to be slam dunks. Commented Dec 29, 2014 at 12:44
  • @psubsee2003 I don't see how that is different from how it already is - we have reviews, so we already have rules that are checked. I'm not proposing anything new.
    – Mörre
    Commented Dec 29, 2014 at 14:54
  • @Mörre the review audits are designed to be supposedly very obvious in order to only catch people who aren't paying attention. By expanding it to enforce specific site guidelines, you add another layer of subjectivity to both selecting and actually reviewing audits. Given not everyone agrees on specific site polices, that additional level of subjectivity is only going to cause more confusion and complaining. Commented Dec 29, 2014 at 15:06
  • For example, someone might think correcting a unrelated minor syntax error is fine since it isn't related to the actual problem. But someone else doesn't think changing any code in questions is acceptable. I personally fall into the 2nd group (I'd rather comment and let the OP do it), but I also don't think there is anything specifically wrong with the first group, so why should they fail an audit for their position? Commented Dec 29, 2014 at 15:07
  • @sphanley Not really (not a duplicate) - my main point is that we (may) have a disconnect between what people actually DO and what they SHOULD be doing, and I proposed one way to take care of that - adding this condition to review-test questions. If that does not work, it's an open problem. I merely also asked a little bit if I was right (I was certain that I was but did not want to appear to presume too much) to be sure I actually had a valid point.
    – Mörre
    Commented Dec 29, 2014 at 16:02
  • 1
    This question still isn't substantively different enough than what's been discussed in the past. Maybe just open a feature-request for adding these to the review audits?
    – Brad Koch
    Commented Dec 29, 2014 at 16:10
  • 2
    Such as this one: Edit review audits should contain “obviously” invalid code edits
    – Brad Koch
    Commented Dec 29, 2014 at 16:12
  • @BradKoch That would have been my next question: recently I posted something easily fixable about link styles on meta (28 votes) - but all for naught, even with lots of people agreeing and the fix being very easy (a style for links) nothing will happen because none of those who could make the change will see it...
    – Mörre
    Commented Dec 29, 2014 at 16:12
  • I am seeing this all the time. The code in either the question (or an answer) is drastically modified ("fixed") and this stuff gets approved. A lot of these posts have upvotes, which I think are rendered completely meaningless by these edits.
    – trooper
    Commented Oct 28, 2016 at 2:58

1 Answer 1

27

Yea, never fix code in a question.
Usually, you only want to make the OP aware of the issue. It may very well be the source of the problem.

Fixing grammar / formatting in edits is fine, as long as it doesn't change the way the code works (or doesn't work).

Basically, you made the right call.

Reviews for things like that could be valuable, but would be hard to automate.

5
  • Since - admittedly based on a tiny sample - a lot of people seem to accept such edits, what action should be taken then? I propose adding such problems to the test given to reviewers.
    – Mörre
    Commented Dec 29, 2014 at 9:21
  • Reviews like that would be hard to automate. How would the system tell when an rejected suggestion is rejected for that reason?
    – Cerbrus
    Commented Dec 29, 2014 at 9:24
  • Aren't the items selected for reviews selected manually? If they are taken as random sample from all reviews ever that of course won't work.
    – Mörre
    Commented Dec 29, 2014 at 9:25
  • Afaik, most are selected automatically on certain criteria (deleted posts, downvotes, etc)
    – Cerbrus
    Commented Dec 29, 2014 at 9:26
  • 1
    Fixing code in questions can be perfectly fine. Though only if the error just detracts from the question. Commented Dec 29, 2014 at 18:34

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