25

I am reviewing some answers marked as "low quality" answers.

I know that answers which contain a single sentence with a link are considered as low quality replies and should be replaced by comments. I have no problem with that.

However, I bumped on some answers that were marked as "low quality" because they contain a single sentence followed with a piece of code and I don't see why.

Regardless the code being good or bad, this has nothing to do with the quality of the answer. However, because of the nature of some questions, there is no other way to reply more satisfyingly than with a piece of code with a short sentence of explanation. So I mark those kind of answers as "Looking good".

Because I faced a large enough amount of answers of this kind, I am wondering why so many code snippet answers get flagged as "low quality"?

3
  • 1
    Can add an example?
    – wheaties
    Commented May 15, 2014 at 17:46
  • I edited my question. I forgot to mention that I only mark as "looking good" the answers that contains a code snippet with at least some words of explanations.
    – Larry
    Commented May 15, 2014 at 19:10
  • 1
    "That said, Low Quality is an automatically-calculated metric, and I'm pretty sure it can't distinguish between code and gibberish". This is probably the answer to my question. Thank you @Robert.
    – Larry
    Commented May 16, 2014 at 6:18

2 Answers 2

51

Answers that consist merely of a code paste without further explanation are not great answers, because they lack context. What does the code do? How does it work? How does it answer the question that was asked?

That said, Low Quality is an automatically-calculated metric, and I'm pretty sure it can't distinguish between code and gibberish.

18
  • 5
    While I agree most of these are low quality answers, virtually none of them are "Very Low Quality" and worth deleting. These are answers to just downvote. From the VLQ queue, that means choosing "looks good" for these posts, and flagging them as VLQ isn't helpful.
    – Servy
    Commented May 15, 2014 at 17:47
  • No, you're right; VLQ is totally the wrong flag. I'll edit my answer to clarify.
    – Robert Harvey Mod
    Commented May 15, 2014 at 17:48
  • 4
    It's worth noting that, from my experiences, the automatic VLQ threshold for shoving posts into the queue without a user flag also really likes to pick out answers that contain nothing but a code snippet, even though they'll always end up being marked "looks good".
    – Servy
    Commented May 15, 2014 at 17:50
  • 3
    That's not good. SE should probably look into that. Although it's hard to see how any automated solution short of a bayesian filter could pick out code from gibberish.
    – Robert Harvey Mod
    Commented May 15, 2014 at 17:50
  • Well, in theory you can simply look at how much of the post is in a code block, versus how much isn't. If you wanted to single out all-code answers it would be easy enough to apply a filter where all of the post's text is in code markup.
    – Servy
    Commented May 15, 2014 at 17:57
  • 1
    If you go the bayes way, don't forget to include the tags, or even make different languages create different corpi. Otherewise some will mark their gibberish as code ;-) Commented May 15, 2014 at 17:57
  • Now I believe that the automatic vlq do flag such answers because they are very short. Could it be the case ?
    – Larry
    Commented May 15, 2014 at 18:11
  • Is this the part where a distinction should be made between "low quality" and "very low quality"? The gibberish flag uses the word "very" which I don't see anywhere else, not even in automatic low-quality post score flags.
    – BoltClock Mod
    Commented May 16, 2014 at 0:35
  • @BoltClock: I made a slight tweak to my answer.
    – Robert Harvey Mod
    Commented May 16, 2014 at 1:35
  • The problem with marking an answer that is just a code block as okay is that spammers will start putting their spam in a code block and it will by-pass filters. Not saying it can't be done but is a problem to consider.
    – dave
    Commented May 16, 2014 at 14:22
  • 1
    It seems to me that the context is provided by the question. I'd agree that really good answers restate that context, but honestly when I use StackExchange I'm happy with average answers, including code snippets.
    – Warren Dew
    Commented May 16, 2014 at 16:03
  • 1
    Is the low quality metric independent of user flags and downvotes? I'm curious because I was thinking that users might have been drawing conclusions about quality based on whether they understand the language of the code snippet, but if it's totally automatic, I feel better.
    – Warren Dew
    Commented May 16, 2014 at 16:05
  • 1
    I'm pretty sure someone posting code that fires missiles at Baghdad would be perfectly willing to post an innocent sounding explanation.
    – Warren Dew
    Commented May 16, 2014 at 16:07
  • 2
    I don't really see your point. As a reviewer, I feel my job is not to make a judgement on the correctness of an answer, but only whether it is in fact an answer. Any well formed bare code snippet is clearly intended as an answer, not a question or comment or spam. It might be an incorrect answer, but that's not for me to decide on review; that's up to upvotes and downvotes. So why do I need to see accompanying text? Or, alternatively, how is moderation different from review?
    – Warren Dew
    Commented May 17, 2014 at 7:33
  • 1
    Sure. To me, that's pretty easy to do with code.
    – Warren Dew
    Commented May 17, 2014 at 21:46
15

When I come across these in the VLQ I generally add the comment:

This would be a better answer if you explained why it works

In the case of a large code block, I'll look at the question. If there's a lot of similarity, I feel the answerer has rewritten the code to something that will work, so I'll comment:

This would be a better answer if you highlighted the changes from the original code and why they are needed.

Then I hit Looks Good or No Action Needed because they are answers, even if they're not great answers.

You must log in to answer this question.

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