TL;DR: instead of merely sorting answers by all-time score, add another way to favor answers which were upvoted recently to appear on top.
The problem
Imagine following situation: A question is asked on Stack Overflow. It's a good, on-topic, well-researched question, so it quickly gets upvoted. It also quickly gets an answer, which technically works, but is bad, because uses bad programming practices, obsolete technologies and may not work in specific conditions.
Example: for question "how to access a variable by string name in JavaScript?" answer "use eval("someVariable")
" undoubtedly would be bad, but this wouldn't prevent people from upvoting it, especially if there was no better answer.
Three years passes, the bad answer reaches 100 upvotes, and someone with a deeper knowledge on this topic decides to post an answer. Since this answer is better, it theoretically should get upvoted and rise to the top. Well, it looks a bit different in reality. How many people actually scroll down to the second answer, when the top answer appears to be working? It's almost impossible for the good answer to outscore the bad, because most people still would only read the top answer and upvote it.
I assume that OP of the question is either inactive, so they can't accept the good answer to make it appear at the top, or still thinks that the top answer is the best, or simply doesn't care. This unfortunately happens very often.
The solution
Instead of all-time upvotes, let's analyse the last 20 upvotes on a question's answers. If the top answer gets most of them, for example more than 12, it usually means that it's still the best answer. However, if the second top answer gets more than 8 upvotes, it's a strong indication that it's better than the top answer and should be displayed first. Since the answers further down the page are much less likely to receive upvotes, if the top 10 answer gets more that 4 upvotes, it's also very likely that it's better than the top answer.
So, instead of sorting answers based on all-time votes, use more complex algorithm, which would take only recent votes and weight votes based on answer's position. It could be something like recentVotes * sqrt(position)
. If a question had answers with following recent votes:
# | all time votes | recent votes
------------------------------------
1 | 100 | 8
2 | 30 | 6
3 | 10 | 1
4 | 5 | 5
It would be sorted like that:
# | all time votes | recent votes | recentVotes * sqrt(position)
-------------------------------------------------------------------
4 | 5 | 5 | 10
2 | 30 | 6 | 8.49
1 | 100 | 8 | 8
3 | 10 | 1 | 1.73
Of course the algorithm could be a little different, that's just a basic idea. Also, at first this sorting method should be an alternative to the existing default vote sorting. If users like it, we can make it the default sorting.
Example questions which would benefit from this sorting system:
How to prevent form from being submitted? From 2016-01-26, the day I started discussion on Meta about this question, my answer changed score from 0 to 38. This answer, which was accepted at this time, changed score from 90 to 88. So with the new sorting algorithm, my answer would be now displayed as the second, instead of the third.
What does the construct x = x || y mean? From 2016-01-10, the day I posted my answer, it changed score from 0 to 5 (by the way, it also received a 500 reputation bounty from Madara Uchiha, which is a good reason to display it closer to the top). It's now top 5 answer, so with my algorithm it would have score equal to 11,18. The top 4 answer received one upvote and one downvote, so it score didn't change. With my algorithm it would have score equal to 0. The same is with the top 3 answer, and similar with the top 2 answer (it received 2 upvotes and 2 downvotes). Therefore, with the new sorting algorithm, my answer would be displayed as the second, instead of the fifth.
Find object by id in an array of JavaScript objects. From 2016-02-14, the day I posted my answer, it received 4 upvotes. It's now the top 14 answer, so with my algorithm it would have score equal to 14,97. This answer received 6 upvotes, and it's top 6, so it would have score equal to 14,70. This answer received 8 upvotes and 2 downvotes, and it's top 2, so it would have score equal to 8,49. So, my answer would be the second instead of the fourteenth. And also the current top 6 answer would be the third.
This feature request is similar to Feature request: introduce an optional sort option for answers that lets new good answers rise faster to the top, but I don't think it's a duplicate.
Related on MSE:
at first this sorting method should be optional, but if users like it, we can make it default
So it would be a new sorting tab, the default would still be the same. After some time, if users would use it a lot, we could make it default.