-16

Is there a way to designate correct or tested answers on Stack Overflow? I have seen several correct answers downvoted, even though I could verify the answers by copy-pasting the code into an IDE and running it. Likewise, incorrect answers can be upvoted, even if you can test them and leave comments with corrections. Is upvoting and downvoting a feature designed to elevate useful answers on Stack Overflow? If not, what is this feature for?

I am interested in correctness, to which I thought voting might apply. My experience is that votes do not correspond to correctness.

23
  • 8
    "Is upvoting and downvoting a feature designed to elevate useful answers on stack overflow?" - Yes.
    – Alex K.
    Commented Jan 31, 2017 at 17:54
  • 12
    Keep in mind downvotes may be for reasons other than correctness of the answer- The answer could promote a bad practice, or it could be a case of plagiarism, or the voter could have some other obscure reason to downvote. Otherwise, users do verify correctness of answers, and either comment or downvote if they wish for incorrect answers.
    – Kendra
    Commented Jan 31, 2017 at 17:55
  • At the speed and volume we have.... it would require a LOT of people to do that. Think of scalability and you will soon realize how it doesn't make sense. the whole community is who "verifies". If a bad answer gets upvoted, the logic is that eventually it will be downvoted enough.
    – Patrice
    Commented Jan 31, 2017 at 17:58
  • 5
    Likewise, incorrect answers can be upvoted - There are people who, unfortunately, up vote any and all answers because that person "took the time to help". Very occasionally on Meta posts about voting someone will admit to doing this. Hopefully in most cases those votes are drowned out by accurate voting.
    – BSMP
    Commented Jan 31, 2017 at 17:59
  • Also note that answering a question puts it at the top of the Active Questions list, which means it's likely to get attention.
    – BSMP
    Commented Jan 31, 2017 at 18:05
  • The more times you guys say downvotes don't mean anything, the more I can't help but 'feel' that you are wrong. To a newbie, they hurt, especially when it gets so low. Do you guys get that? I mean, I understand we MUST categorize the site else it will grow into a jungle, and MUST vote to voice our consent or dissent, but can't we be a kinder, gentler place -- as opposed to an 'ah, I gotcha! wrong SE!'.
    – dyasta
    Commented Jan 31, 2017 at 18:06
  • 4
    @bitsum Of course they mean something. If they didn't mean anything then they'd be pointless. They mean that a post isn't useful. It is of course understandable that people are somewhat hurt when they make a mistake and others point it out. The solution isn't to refuse to ever tell people when they make a mistake, or worse, to give incorrect feedback. Lying to the emperor and telling him that his clothes are beautiful isn't actually in his best (long term) interests, even if it stings a bit for him to tell him that he's naked.
    – Servy
    Commented Jan 31, 2017 at 18:11
  • 4
    @bitsum if we had time and less new questions daily. Maybe. My suggestion to you: Look on new questions and be the nicest, kindest person you can be. Take everyone by the hand and show them how this site works. After 3 days of abuse, getting called elitist, a number of unpleasant terms, seeing answers like "I don't give a fuck for your quality, just fix my problem"... you won't stay nice. And the new guys should NOT take downvotes personally. They come here, they should learn what means what, learn the rules and try to abide by them. Yes it stings, but considering the sting is something (cont)
    – Patrice
    Commented Jan 31, 2017 at 18:13
  • 1
    (cont'd) you could have prevented yourself by reading/researching a bit more before dumping your question on Stack... then I do believe that it is warranted to downvote. Anyway with your ranty comment... what kind of suggestion do you propose? You can complain about it, but your comment doesn't contain any actionable suggestion...
    – Patrice
    Commented Jan 31, 2017 at 18:14
  • Is there a "tested" tag? I spend a lot of time on trial and error. Commented Jan 31, 2017 at 18:39
  • 1
    @ForestWhite and that is how it should be. Honestly Stack was never meant as a place to copy paste from without thinking about it. Our whole deal is to be a repo of KNOWLEDGE, not code. Seems like you want a way to know "well this compile and gives what the OP wanted". However if you then look at the code, some modifications WILL be required to fit in your current code base. Honestly you are better off reading the answer and understanding it. Then you can apply the answer no matter what your code base is.
    – Patrice
    Commented Jan 31, 2017 at 18:46
  • I see. So correctness is not a criteria measured on this site. I'll take it underadvisement. Commented Jan 31, 2017 at 18:48
  • 1
    @ForestWhite Why would you want to go out of your way to find answers that are correct but not useful? Measuring usefulness is more useful.
    – Servy
    Commented Jan 31, 2017 at 18:50
  • 3
    Who should be able to mark an answer as "tested"? What if it only works on their system with their test input? Commented Jan 31, 2017 at 19:51
  • 1
    There is a big difference between "works" and "correct". There are lots of different ways to hammer a round peg into a square hole, but experts will downvote those solutions every time because they aren't correct. In different languages, code may appear to work when you test it, but actually exhibit undefined behavior. In other cases, it may violate the contract in the documentation and therefore suggest doing something that you should not actually do. All of these are reasons for downvoting that may not be obvious to non-experts, and aren't suggested by simply "testing" the code.
    – Cody Gray Mod
    Commented Feb 1, 2017 at 4:31

3 Answers 3

-6

The community polices itself, but it can be wrong, or can be temporarily wrong, especially if it is a low-traffic question.

UPDATE: Here it is - simple technical question, right or wrong, no debate about which is correct or which works correctly.

Windows API - CreateProcess() path with space

16
  • 6
    Crucially being the accepted answer is not the same as being the right answer.
    – jonrsharpe
    Commented Jan 31, 2017 at 18:17
  • Is there a "correct" or "tested" tag? Commented Jan 31, 2017 at 18:37
  • 1
    @ForestWhite, of course no. You see if the solution provided works for you or not, that's it.
    – ForceBru
    Commented Jan 31, 2017 at 18:56
  • Thanks, @ForceBru. It did not make sense to me. Commented Jan 31, 2017 at 19:03
  • 2
    ^^ case in point
    – jonrsharpe
    Commented Jan 31, 2017 at 19:13
  • @jonrsharpe It is a technical right/wrong question with no in-between, so pretty clear. And I must edit my answer, it was up-voted way past the accepted answer, but NOT ever set as the accepted answer :o. Here it is: stackoverflow.com/questions/4053241/…
    – dyasta
    Commented Jan 31, 2017 at 22:30
  • I'd have stuck to the point, rather than make it all about me and my unaccepted answer. The OP gets to decide which they accept, it doesn't mean it's the right one or the best one, just the one that helped them solve their problem.
    – jonrsharpe
    Commented Jan 31, 2017 at 22:32
  • I think that is stretching it in this case, considering it is literally a "what is the proper way to call this API" question.
    – dyasta
    Commented Jan 31, 2017 at 22:34
  • 5
    I'm not sure what you aren't getting. Once more: accepted does not mean right, best or correct. The OP gets to decide which one helped them the most; is it really surprising that an answer coming more than three years after they asked the question wasn't quite so useful as one they got the same day? Anyone with the same problem can decide for themselves which answer they think is most useful; that yours has more upvotes suggests that the system is working correctly, and that it is not a good example of the community being wrong. Therefore this answer is not useful.
    – jonrsharpe
    Commented Jan 31, 2017 at 22:51
  • Ok, so some programmer comes, looking for this answer, and gets the wrong one. That is the side-effect. That's all. Leave it as you want, I am not arguing here.
    – dyasta
    Commented Feb 1, 2017 at 11:30
  • 2
    @bitsum There have been proposals to not pin the accepted answer to the top of the list by people that feel that "the post that the question author found most useful" shouldn't be shown above "the post(s) that the community found most useful." If that's an opinion you share, feel free to support said feature requests. But that doesn't have anything to do with the question at hand here.
    – Servy
    Commented Feb 1, 2017 at 15:01
  • @jonrsharpe How can I find useful, correct, or works answers if voting and accepted answers do not indicate this? Commented Feb 1, 2017 at 15:59
  • 1
    @ForestWhite voting does. Acceptance might, but only insofar as that's what helped the OP. Also there's trying them out to see if they solve your problem.
    – jonrsharpe
    Commented Feb 1, 2017 at 16:00
  • @Servy Thanks for sharing that! I still think there is some relation with "how can I identify the correct answer" by the OP, but that is apparently not the consensus.
    – dyasta
    Commented Feb 1, 2017 at 16:09
  • 1
    @ForestWhite Voting does indicate what posts people felt were useful, an answer that isn't correct is almost certainly not useful, and an answer that doesn't work almost certainly is useful. So you do in fact have a metric that tells you what you want.
    – Servy
    Commented Feb 1, 2017 at 16:51
20

Who verifies correct answers on Stack Overflow?

Everyone checks answers on SO. You need very minimal participation in the site to be able to vote, and when you do, you're able to provide your feedback on the quality of posts.

Is upvoting and downvoting a feature designed to elevate useful answers on stack overflow? If not, what is this feature for?

Yes. Absolutely. That's exactly what it's for.

I have seen several correct answers downvoted, even though i could verify the answers by copy-pasting the code into an IDE and running it.

And yet, as you mention in your earlier quote, what matters is whether or not the answer is useful. That you can copy-paste some code and run it doesn't mean the answer is useful. It may do what the answer claims, but not what the question asks, it may have major security vulnerabilities, it may have significant negative side effects that aren't immediately apparent, it may work for the example in the question but not for other inputs of the described problem, it may be extremely unclear or poorly explained, it may have been plagiarised from other content, or any number of an infinite other possibilities that would make the answer not useful.

Likewise, incorrect answers can be upvoted, even if you can test them and leave comments with corrections.

Perhaps those voters didn't notice the mistake. By all means, contribute through comments or another answer to draw attention to the problem, and vote on the post yourself to provide your feedback as to the quality of the post.

But perhaps they noticed the problem and felt that the error was minor and felt that the post was useful despite it. For example, if an answer has a simple typo in a variable name somewhere it might not even compile, and I would fix that problem if I saw it, but a voter may well feel that the post is "not useful" just because there's a small typo in it. These are all matters of judgement, which is precisely why voters have such wide freedoms in how they can vote.

6
  • Is there a way to identify a tested or correct answer with a tag, or something like that? Voting clearly does not correlate to correctness. Commented Jan 31, 2017 at 18:46
  • 3
    @ForestWhite Voting is the tool that we have to indicate the quality of a post, of which correctness is one (albeit significant) component. There is no separate voting just for correctness devoid of other factors of quality, nor do I see why we'd want such a thing. If your concern is that voters aren't accurately indicating quality, how would you expect your separate metric to be any better?
    – Servy
    Commented Jan 31, 2017 at 18:48
  • Citations often help. There are communities that curate content to get people to better answers and cut out ones that are misleading or outright wrong. I am just asking whether or how that happens. Commented Jan 31, 2017 at 18:49
  • @ForestWhite Answers that are wrong or misleading are rather likely to be not useful, as such, they would merit downvotes. You can also comment on the post to point out why you feel it's not useful.
    – Servy
    Commented Jan 31, 2017 at 18:52
  • @keepingitreal Where did I imply any such thing? I didn't even mention answer acceptance here.
    – Servy
    Commented Jul 27, 2017 at 13:11
  • Wrong topic, deleted
    – dyasta
    Commented Jul 27, 2017 at 16:48
6

Is upvoting and downvoting a feature designed to elevate useful answers on stack overflow? If not, what is this feature for?

Yes, it's exactly designed for that reason. The (big) community here will judge which content is considered helpful or not.

It's not only about correct(ed) and working code. A good answer should explain what was wrong and why also.

Also refrain to answer off-topic questions like simple typo fixes.

0

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