3
\$\begingroup\$

The rollback in question: https://codereview.stackexchange.com/posts/216088/revisions

I was told to contest the rollback here by the reviser and I believe the point of contention is about invalidating answer(s).

In my edit, I tried to avoid this by retaining the context for the answers and only sought to improve the quality of the question by making the code sample more concise, and removing redundant comments.

Was this rollback justified and if so, why?

\$\endgroup\$
  • \$\begingroup\$ Thanks for taking the time and effort to ask this question. \$\endgroup\$ – dfhwze Sep 6 at 18:59
5
\$\begingroup\$

Yes, the rollback was justified.

While we value both questions and answer posts on Code Review, we have found that answer invalidation (changes to the question that make the answers look wrong or disconnected) causes continuity problems in the Q&A format of the site.

As a consequence, we enforce the no-code-edits-after-answers-exist "rule" to provide clear guidance on what is allowed, or not.

Now, all rules will inevitably have exceptions, so your question here in meta becomes: Why can my edits not be treated as an exception since I tried hard to "retain the context"?"

The answer to that is that when people review code they do it in the full context of what you present. Their thought processes and observations will be different if the code is not (exactly) the same - even changing comments changes things.

The bottom line is that you cannot know what the person who answered your question would have done differently in their answer with the revised code.

As a small example of what could be different, in the one answer, they say "One simple refactoring for this method could be to simplify the following code block, that is used 9 times in the Method" ..... and, with your code changes, is that code block still used 9 times?

The answer is "No".

The rollback was very appropriate in this case, and your specific edits are not an exception to the rule.

\$\endgroup\$
  • \$\begingroup\$ I would have to disagree with the example you cited because I did mention the reoccurring pattern for all the methods listed in the class. And in this case, I can't reasonably imagine (with the little knowledge I've gained) any alternative routes that the respondents would have taken given the former contention. Tangent aside, am I to understand that there are no exceptions to the rule? \$\endgroup\$ – Asel S Sep 6 at 12:59
  • 7
    \$\begingroup\$ @AselS - "Are there exceptions" - yes, there have been some exceptions - where the code changes edited in are to fix stack-exchange mark-down problems, not change the code, and also very occasionally where questions are edited after some answers, but before other answers, leaving the decision as to which answers to invalidate very complicated - sometimes it's better to keep the new answers valid. Note, if you don't like the code in the question, then feel free to post a follow-up question \$\endgroup\$ – rolfl Sep 6 at 13:33
  • \$\begingroup\$ Alright, thank you for clarifying. \$\endgroup\$ – Asel S Sep 6 at 14:33

You must log in to answer this question.

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