Please have a look at this question. When the question was asked by the OP, it had a scope related problem in the code snippet posted in it. 2 answers were posted for that question. But after the answers were posted, a friend of mine from Stack Overflow, edited the question(not sure with what intention) in such a way that the bug in the code was gone(it actually self answered the question). Please have a look at the question revision history, where I've rolled back the question to the original state, which has the problem in place.

My question is that, should such a practice be allowed/encouraged that an edit to a question renders all the answers posted for that question, totally irrelevant? As anybody who comes to have a look at the question later, will be highly confused as to why a question was asked without any problem and there were so many answers posted to it(not everybody cares to go through the revision history)? I happened to notice that, but not everybody would notice it.

  • 7
    Beyond indenting in languages that are not whitespace-sensitive or still include (on purpose) the indenting error, the code should not be changed in questions (including typos). I would ought to think that you did the right thing by rolling back the edit. Commented Oct 16, 2013 at 12:22
  • 5
    What amused me the most was that such an edit was actually approved by 3 folks from the community. I was totally bamboozled when I saw the question edited with the answer in it.
    – Rahul
    Commented Oct 16, 2013 at 12:28
  • 4
    Looking at the edit suggestion, it was only the OP who accepted the edit. Commented Oct 16, 2013 at 12:33
  • 2
    In fact, it was rejected by one, and then the OP approved it.
    – Doorknob
    Commented Oct 16, 2013 at 12:44
  • My apologies to those 3 unnamed community folks. But still, this shouldn't be practiced, as the whole crux of Stack Overflow is based on it. Without a question, any answer is irrelevant.
    – Rahul
    Commented Oct 16, 2013 at 12:45
  • 3
    I'm sure the 3 non-existent community members will gladly forgive you :-) Commented Oct 16, 2013 at 12:46

1 Answer 1


Good catch, you made the right call. In this case, a rollback is the right thing to do. The user who edited the question with the answer in it should have posted it as an answer. That's the right approach.

In no case should another user edit a question is such a way that it fixes the problem in the question or changes it so much that all current answers become irrelevant.

Post an answer and only edit the question to fix spelling mistakes, formatting, etc.

  • 3
    Why do we even allow editing code beyond Whitespace fixs?
    – Cole Tobin
    Commented Oct 16, 2013 at 13:11

You must log in to answer this question.

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