18

I am unsure whether this edit should be accepted.

In my opinion, it's a good edit, because it adds important and available information to the question. However, should the editor ask the poster of the question to do it himself first? Should I reject the edit next time because of that and simply ask the OP to do it?

1
  • 8
    The only thing I would suggest would be to editor and that would be to have a better edit comment like: Added code to the question that the OP posted as a comment". Commented Aug 8, 2016 at 16:08

2 Answers 2

44

This was a good edit. It edited the code from the OP's comment into the question.

It's true that the OP should have done this themselves, but it looks like they're new to Stack Overflow. They probably haven't yet figured out how all of it works. You added a comment to explain that they could edit it in themselves, which is good.

It was OK to approve this edit.

1
  • 8
    What more, such edits can teach the OP how to write code on SO. Commented Aug 8, 2016 at 16:29
27

Any time code appears in a post when reviewing suggested edits, you need to ask yourself "where did the code come from". The answer to that question will determine what to do

  1. Was it left by the original author in a comment? If so then it is the OP's code and adding it to the question is a good change, so approve it.
  2. Is it XML or HTML code that was hidden because it wasn't properly formatted as code? If so then it is the OP's code and fixing the code formatting is a good change, so approve it.
  3. Did someone just add some code to the question that doesn't appear to have come from anyone connected to the question? This is not a good change, so it should be rejected.

For #2, you should be able to tell this by switching to the markdown view on the review page. For the other 2 items, the only way to tell is to click through to the question and look for the source of the code. This is especially important when the editor did not leave enough detail in the suggested edit comment (such as in this case).

7
  • Alright, cool. Yes, it was a comment as you see by visiting the question itself. Thats exactly what I did. I think S. L. Barth's answer fits my question more.
    – Mafii
    Commented Aug 8, 2016 at 9:38
  • @Mafii Thanks. I heartily recommend the steps in this answer (upvoted it) to anyone reviewing edits. Commented Aug 8, 2016 at 10:15
  • 2
    @Mafii SLBarth's answer is definately a much better direct answer to your question, but I added mine to round out the process and provide a generic response to help others make the decision in the future. Commented Aug 8, 2016 at 11:07
  • Yes sure, thats why I commented and upvoted it :)
    – Mafii
    Commented Aug 8, 2016 at 11:09
  • 1
    Reviewers should specify that the code came from the OP in their edit summary.
    – Laurel
    Commented Aug 8, 2016 at 14:44
  • @Laurel: I believe you meant the editor should do that, not the reviewers.
    – Ben Voigt
    Commented Aug 8, 2016 at 16:20
  • 1
    @BenVoigt Yes, but it's too late now...
    – Laurel
    Commented Aug 8, 2016 at 16:22

You must log in to answer this question.

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