Seeing incorrect answers get "accepted" makes me seriously doubt the value of Stack Overflow. For example, this answer [1] about Perl's symbolic references was accepted - but any competent Perl programmer knows that it's a horribly poor approach, and the answer that says as much outvoted the accepted one by 15 to 0 (at the moment).
Is this a technical site that values accuracy, or just a popularity contest? I was hoping for the former, but examples like the above make it look more like latter in my opinion.
[Edit] A related question: Maybe a delay of 24 hours or so before any answer could be accepted would be helpful. I get the impression that many of these cases aren't "gaming" the system, they're simply newbies accepting the first answer they get that seems to help. A waiting period would allow them to see what everyone else thinks of the answer - maybe they'd be more cautious about accepting an answer that's voted down to oblivion and loaded with comments that say "no, that's wrong."
Related question: Etiquette for correcting old questions with incorrect answers [2]
EDIT
Here is a list of problem questions [3] I compiled.
The very act of asking the question means the individual is likely to be the least knowledgeable person in the thread for that particular narrow topic. This same person accepts the answer, even though it's likely they are the least qualified to do so.
But it's okay. It should still (most of the time) indicate that the accepted answer was able to solve the problem at some level for at least one person. The voting system also ensures that any caveats not included with the answer can be readily visible.
Jon Skeet can't possibly answer every question, so the chance of an incorrect answer slipping in could happen.
This is probably something for which there is no good solution.
One of the early questions that I saw on Stack Overflow was phrased as "which-is-better-this-or-that" and the simple, obvious answer "this" was massively upvoted while a different non-answer with no votes was accepted. Yet the technically correct answer was "neither of those, here is a third way"
This illustrates Joel's point and the limitations of any site like Stack Overflow:
So people are not perfect, thus the sites they collectively create and moderate will not be either.
There is a solution though: get rid of the 'accepted answer' designation (though I kind of like it, it provides closure without closing the question.)
I think the whole "accepted answer" needs to be abolished and replaced with a "thank you" scheme.
Every person asking a question should be able to distribute up to 30 points (in total) to people who assist them. SO should display a thank you section at the top of the question to all the people who helped. Note you should also be able to thank people who commented and did not reply to your question.
I really vote for a 24 hours delay before answers can be accepted. Great idea
Here is my completely subjective view of how the voting system works. Roughly speaking (correct me if you aren't seeing the same behavior - and note that advantage is cumulative - e.g. you can be both fast and pithy, etc.):
Another interesting dynamic is that if you edit your response to improve it (possibly incorporating information from other answers), your answer will drop to the bottom of the group with your score (sometimes, sadly, below #8).
Any answer suggesting new, popular technology trumps an answer suggesting that an old way is a better way (think ORM/DAL).
And note that this process is becoming somewhat recursive/incestuous. Googling for an answer is incrreasingly bringing forth SO as a highly referenced source.
Why not have a accept answer by the person who asked the question and an accepted answer from the community? Either set a threshold based on the number of up votes, first answer to that threshold is accepted,a margin of up votes, it leads the second answer by x votes, or have a separate accepted button that a certain number of people have to click. You could restrict this by reputation. I am sure there are other ways to have the community select an accepted answer.
The best practice isn't always the answer to the question that was asked.
In your example Does Perl have PHP-like dynamic variables?, the question that was marked as accepted, regardless of if it should or should not be used, is the answer to the question he was asking. (I guess it is, I don't know PHP or Perl)
Of course, the fortunate thing about SO is that the dialog is available for others to debate if what is being done is the right way or not. I think someone reading that post will notice that the answer directly beneath has many upvotes and would consider it as well.
I agree.
It would be better if the answer the community feels is right (i.e. highest votes) appears above the accepted answer, with the accepted answer coming next.
In any system that has a bunch of humans, someone is going to look to game the system [1].
We could have central authorities, popularity, validity of edits or any number of metrics. No matter what, a really motivated person can find a way to game a system. In the end, an exception is not usually the rule. Some folks may end up accepting really wrong answers, but good answers do make it to the top in most cases.
[1] http://www.wikitruth.info/index.php?title=Gaming_the_systemUsers with a high enough rep should be able to change which answer gets accepted.
EDIT: preferably without changing the author
The time limit for accpeting the answer would not change the people: they still use the first hint that seems to help, and hence they cant accept the answer, they would do nothing. So many answered question would stay unaccepted (except some high ranking person feels responsible to close open issues)
The problem with this site is the questions will remain, but once its past the front page they don't receive more answers or up votes. So the question will have the old questions but without new answers which are perhaps better. Or they will receive new better answers without any up votes.
Im thinking about questions for code examples with code example answers. Not the more subjective ones ("what framework is best for me?") or author specific ("where is the bug in my code here?").
And I hope older questions maybe tagged with "generalcodeexample" or similar will resurface with new answers, so new (hopefully better) answers can have a chance to gain some votes. Instead of old good enough answers remain on top.
In my opinion ...
1, part of the problem is SO seems to expect you to accept a solution. Or at least suggests you accept one. Sometimes this leads to people accepting something that is 'almost' right. The same problem exists at most 'solution sites'.
2, the second problem is that programming is not exact and people have different styles. Something I think is perfect for my style or follows my methodologies may irate another person and vice versa. On many occasions I have seen code that executed perfectly but was basically useless in a team environment as no one could understand it without constant re analysis ... "who is right"?
3, Sometimes an answer is actually a solution to the question asked ... ie it works. For that person the problem is solved ... The answer might not however consider wider issues like security etc ... again a working answer providing a less than perfect solution. The person asking the question is unlikely to be aware of these wider issues.
Now I am a new user on SO, but have been observing for a while.
The thing I like about SO is that accepting a solution doesn't end the discussion. Through comments or new answers you (we) have the opportunity to correct or add to an accepted solution.
None of what I have said is about "popularity", is more about human nature and the ironically imprecise industry we work in.
Maybe we need there to be two answers, one selected by the person who asked the question, and a second selected by people with over a certain threshold of points, and only after the question had been open a few days. Only an experiment allowing this would show whether this improves the correctness of answers selected.
Ignore the 'accepted' answer and pay attention to the answer with the highest votes.
This is a much better indicator of answer quality.
Voting and reputation are both bad measures.
How is it possible that someone with ~800 points doesnt know that they can refer to the documentation of String to find out how to find if a String contains a certain character ?
If most of your users dont know anything and they all vote for an answer does voting help ? Im sure there are many examples of bad answers being voted up by people with lots of points.
Its unfortunate that someone who didnt know something, then asks a question and gets a bad answer which leads them terribly astray. Its this sort of advice that leads the industry to be full of very incompetant developers who really should not be trusted.
Should it be possible for people to lose points if they give bad answers ?
I personally think it should otherwise the points currency has no value. In the real world people who are successful make lots of money (aka points) and people with dingbat ideas lose money and go broke. Should giving or voting for the wrong answer cost points - i think it should.
Given the assumption that a user with high reputation is more likely to be correct than someone with low reputation, the following simple changes may help alleviate the problem:
Reputation means nothing in terms of a perons competance or knowledge. In the end if you post enough times youll get points. Reputation is a measure of activity not quality in any form.
You raise a valid point but having come from EE (many years ago, before it become the corporate monstrosity it is now) SO is SO much better. Sure, the wrong answer is accepted every now and then, but the question doesn't drop off the radar straight away, which I think is a huge strength of SO. New answers can be added much later and upvotes improve the chances that other readers will find the correct solution. As a relatively new SO user I enjoy going through old questions and upvoting what I think are good and correct answers.
I disagree with a 24-hour time limit only because I suspect that the number of times this happens is low in comparison with the number of times the correct answer is rewarded, and we want to encourage questioners to reward the correct answer. Hopefully after trying and testing it of course.
If an incorrect or suboptimal answer is rewarded, the downvote system should be sufficient to indicate that it is not necessarily the best answer. This will work as long as people are prepared to use the downvote system.
I think that the user that asked the question has the right to decide the answer... even if it's wrong. Besides, we have the point system to allow the community point out if there's a better answer.
I agree with you. I think the best solution is to add the possibility to flag the accepted answer as "controversial".
and sort the not accepted answers by upvotes, as @jalf suggested