15

While review, I see very short, code-only answers many times. I read on meta at many places that "code-only" should not be the only reason to delete/flag the answer. If the answer is wrong, down-vote it.

What if the answer is correct?

Few examples:

set a to null after Save.

or

<.....attribute=value>

or

Use ThisMethod instead.

or

temp = (day + (int)(2.6 * a - 0.2) + y) % 7;

or

SELECT * FROM table1.users t1 INNER JOIN table2.online_status t2 ON t2.id = t1.id ORDER BY t2.timestamp

or

key, mod = Gtk::accelerator_parse("N")

Assuming that all these answers are correct, how should one handle these answers while various reviews?

As the answers are correct, those are helpful to OP; so I guess down-vote might not be proper option (just because I think this is not useful to others) in this case. But, being near to no informative at all, those may not help others.

This makes sure that the answer is low quality. Should one "Recommend Delete" in LQP queue? Everyone agrees that very short, code-only answers are low quality even though those are correct; but how should this be handled while reviewing? LQP do not have down-vote option. Many posts on meta recommend against "Recommend Delete". Just want to remind that my question is not about specific review queue. LQP is mentioned just as in example.

I see lot many similar questions on meta. Answers to those questions are either not clear or conflicting with each other.

Is there any central resource which lists guidelines to handle this kind of answers?

8
  • 8
    If you don't think such an answer is helpful then consider to downvote it. If you have no idea if it could be helpful then leave it up to somebody else. Easy peasy. Nov 1, 2017 at 13:53
  • 5
    As long as it actually answers the question, there's nothing inherently wrong with a short answer, especially if it's correct, other than the possibility that it was given to a question that probably should have been closed for some reason, but that's still no reason to do anything to the answer. Nov 1, 2017 at 13:55
  • 7
    Vote according to how you view the answer, not according to how you think other people view it. That's their job.
    – ivarni
    Nov 1, 2017 at 14:00
  • 1
    @AmitJoshi No, being a correct answer doesn't mean it's helpful. An answer being incorrect is one way for it to be unhelpful, but an answer needs more than just correctness to be helpful.
    – Servy
    Nov 1, 2017 at 14:00
  • 6
    I guess down-vote might not be proper option (just because I think this is not useful to others) No. A downvote is precisely there to indicate that you think that it's not useful to others. That's exactly what it's there for. If the OP personally thinks that the answer is useful, they can upvote it, as can anyone else who thinks that the answer is useful. Your vote is for you to reflect your opinion of the quality of the post. If you think it's not useful due to its lack of information (or any other reason), you should downvote it.
    – Servy
    Nov 1, 2017 at 14:08
  • 2
    Too late to edit my previous comment, but I want to clarify I meant there's no reason to do anything to the answer in terms of flagging/deleting. A lot of people flag these types of things as "not an answer" because they think they should be comments instead just because they're short. They're answers; don't delete them. But sure, vote on it as you see fit. Nov 1, 2017 at 14:31
  • 1
    Downvoting and commenting is often the right option. Unfortunately, some queues don't give you the ability to vote from the queue, so if you want to be able to do the right thing while not having to navigate away, you can use this userscript Feb 23, 2020 at 22:25
  • 1
    @CertainPerformance or my ReviewQueueHelper, which does it natively and does not require the API or getting/storing the user's access token. Also it skips review audits, adds keyboard shortcuts, etc.
    – Samuel Liew Mod
    Feb 26, 2020 at 1:24

2 Answers 2

28

Just to be clear, flagging these "code-only" answers is not appropriate.

You can find detailed guidance here on when "not an answer" flags are appropriate (required reading for all reviewers), but the summary is that they're only for posts that don't even attempt to provide an answer to the question. They are not for incorrect answers, or even low-quality or incomplete answers.

The "very low quality" flag seems very tempting, I know. I would have to agree that these types of answers are indeed "very low quality". But please don't flag them with that reason, because what that reason really means is "this answer is garbage and needs to be deleted". A more accurate name for the VLQ flag would be "needs to be deleted", or possibly "unsalvageable".

Okay, so we're agreed that these answers shouldn't be flagged. We're also agreed that they're not good answers. What to do?

One obvious option, and one that you mentioned in the question, is downvoting the answer. A downvote on an answer just indicates to future viewers that the answer is not helpful. There are many different ways that an answer can be not helpful, including technical incorrectness, being incomplete, being unclear, and/or containing merely a dump of code without adequate explanation/background. So, as others (including Servy) have said, downvoting these types of answers is definitely appropriate. Use your best judgment.

There is an even better option, if you are knowledgeable about the subject matter discussed in the answer, and that's editing the answer to improve it. I do this a lot. That this site is collaboratively edited is one of its best features. A lot of people forget (or don't know) how much the Stack Exchange model is inspired by Wikipedia. The golden rule for editing is just that you're supposed to respect the author's intent, but expanding an answer to be more descriptive and more complete is undoubtedly consistent with that. It is not reasonable to assume that an author intends an answer to be unhelpful. If you can make the answer better, then please consider doing so.

If you can't edit, and you don't feel qualified to judge the helpfulness of the answer, then just do nothing. Leave the answer for someone else to judge and/or improve. In a review situation, this would translate to "Skip". There's never any shame in skipping.

Another intermediate option would be commenting on the answer, providing advice/encouragement on how to improve the answer to meet our standards. Here's a sample of a "canned" comment that some of our more prolific reviewers use for "code-only" answers:

While this code snippet may solve the problem, including an explanation really helps to improve the quality of your post. Remember that you are answering the question for readers in the future, and those people might not know the reasons for your code suggestion. Please also try not to crowd your code with explanatory comments, as this reduces the readability of both the code and the explanations!

Markdown for copy/pasting:

While this code snippet may solve the problem, 
**[including an explanation](//meta.stackexchange.com/q/114762) 
really helps to improve the quality of your post**. Remember that you are 
answering the question for readers in the future, and those people might 
not know the reasons for your code suggestion. Please also try not to crowd 
your code with explanatory comments, as this reduces the readability of both 
the code and the explanations!
1
  • 2
    Unfortunately, the automated algorithm for submitting answers to the VLQ queue seems to submit short code-only answers very often, suggesting that it encodes an incorrect definition of a VLQ answer.
    – Raedwald
    Apr 28, 2021 at 11:01
7

Remember that an answer needs to be more than just correct to be useful. You upvote posts that are useful, and you downvote posts that aren't useful. If a correct answer isn't useful due to a lack of information, then downvote it. If the answer is useful and no more information is required to provide a quality answer to the question, then feel free to upvote it. If you're not sufficiently knowledgeable about the subject to know if more information is necessary (or whether the post is useful or not for other reasons), refrain from voting.

If you feel that the post isn't useful, you can comment on the post to explain how it could be improved, in addition to voting on it. This is one of the main goals of the First/Last post queues (although it is not the main goal of any of the other queues, and is not even an option in some of them); when using one of those queues you should make an effort to coach the user into how to improve their posts when you see problems with them if you're able to, as that's why you're there.

1
  • @AmitJoshi Then you certainly don't need to make an effort to vote on posts, as that's not why you're there. If you really want to go to the post and vote on it, you can, and it's not wrong to do so, but part of the purpose of the queues is to (temporarily) focus on a single activity, for productivity reasons mostly, so it's at least a good idea to stick to the purpose of the queue, for the most part.
    – Servy
    Nov 1, 2017 at 14:06

You must log in to answer this question.

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