13
\$\begingroup\$

On Code Review, "code dump" answers are not allowed. When an answer contains just code, moderators will often put the following warning notice on it:

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

We occasionally review such annotated posts, and if no explanation has been added after a while, we delete them.

However, that wording, which is a generic message for all Stack Exchange sites (originally intended for Skeptics), is problematic. The answers that we need to annotate are problematic not because they are short or because they lack citations. Rather, we need to enforce that answers aren't just a code dump (alternate independent implementation with no bearing on the code in the question, and no justification for a complete rewrite). And when trying to get the point across to an aggravated user, having precisely correct wording matters.

What is a good short message to explain what kinds of answers are considered acceptable Code Review answers?

Possibly relevant Meta posts:

\$\endgroup\$
2
  • \$\begingroup\$ FYI: I did also apply this post notice to this revision of an answer: codereview.stackexchange.com/revisions/117387/1 \$\endgroup\$ Jan 21, 2016 at 7:51
  • \$\begingroup\$ It might also be relevant to provide a link to a canon meta question describing how to write a good answer, if that's possible. Especially considering the help center is pretty standard across all sites, the answering information there is..lackluster. \$\endgroup\$ Jan 26, 2016 at 15:25

3 Answers 3

10
\$\begingroup\$

We are looking for answers that provide insightful observations about the code in the question. Answers that consist of independent solutions with no justification do not constitute a code review, and may be removed.

\$\endgroup\$
7
\$\begingroup\$

Classic auto-comments text

from @200_success:

You have presented an alternative solution, but haven't reviewed the code. Please explain your reasoning (how your solution works and how it improves upon the original) so that the author can learn from your thought process.

A mod notice might be a little more like an order than a request, so the please might be removable.

\$\endgroup\$
2
0
\$\begingroup\$

Add more detail to your answer to explain why you would make the recommended changes. As it stands, your answer consists of mostly code with very little explanation on the reasoning behind the review, which may cause your answer to be deleted.

\$\endgroup\$
3
  • \$\begingroup\$ This reads more like a "pretty please" request, and fails to convey the idea that code dumps are Not An Answer (because this is Code Review, after all), for which the penalty may be deletion. \$\endgroup\$ Jan 21, 2016 at 1:21
  • \$\begingroup\$ I made an edit to it to reflect that \$\endgroup\$
    – Phrancis
    Jan 21, 2016 at 1:28
  • \$\begingroup\$ "As it stands, your answer consists of mostly code" will restrict the use-cases for this. It would be nice to have something that is applicable to more than just "code-dump" answers. \$\endgroup\$ Jan 21, 2016 at 8:07

You must log in to answer this question.

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