6

I would like to request a slightly modified answer view (currently oldest, newest and votes).

I've thought for a long time that the accepted answer has too much prominence, leading to answers that are clearly wrong (according to the votes of the swarm) being placed at the top.

My initial thought was that they should be given a large chunk of votes for being accepted (e.g., 50) but that other answers could still over-ride that if (again, e.g.) five other people thought another answer was better.

The current logic means that you get situations like an accepted answer with -50 votes could be above the "best" answer with a hundred votes. That makes little sense also because the questioner is probably the one least qualified to choose the best answer. They may well choose one that works but a more general (or faster or shorter or more elegant or just one with better variable names) solution might be superior.

However, I think it could be solved simply with another view which doesn't make the accepted answer rise to the top.

Have a modified votes view which rated the answers on nothing more than its current net vote.

Any thoughts on whether this is a good idea?

2

3 Answers 3

6
+50

Admittedly, I'm not convinced that the additional view would have a lot of benefit to it, for two main reasons:

  1. The change is relatively minimal
  2. I find it just as easy to scroll through the list of questions as I do to click a tab

I also agree with Peter that the accepted answer is informative for various reasons, even in situations where it isn't the highest voted. Consider too that higher voted answers are not always the more correct ones.

Take for example my answer to this question. While it has more votes than the one that was accepted, my answer also originally didn't meet the full needs of the OP due to my interpretation of the question. However, the accepted answer was correct when it was posted, and was posted at the same time mine was, but didn't get the same attention from the community at large. So, to me, it's rightfully at the top of the list, and I'm not sure what would be gained with an additional view that displaced it. Of course, I also never use the oldest and newest tabs either, but they exist, so that's a debatable point anyway.

That said, it's certainly easy to knock the idea without experiencing what it would be like. So, for anyone who uses Greasemonkey, now you can (sort of). Below is a script that mimics the general concept of your additional view (as I've understood it) with a checkbox toggle that appears on the votes view when the question has an accept answer. It may or may not be interesting to anyone, but I was bored and became inspired by this and another question, so here you have it:

Example:
alt text

Apologies for the codeblock, but I didn't feel like signing up at userscripts or anything like that at the moment.

// ==UserScript==
// @name           stackoverflow-accepted-ignore
// @namespace      stackoverflow
// @description    Provides alternate replies view (by vote, ignoring accepted answer status)
// @include        https://stackoverflow.com/*
// @include        http://serverfault.com/*
// @include        http://superuser.com/*
// @include        http://meta.stackoverflow.com/*
// @author         Tim Stone
// ==/UserScript==

// Inspired by https://meta.stackexchange.com/questions/60777/
// With help from https://meta.stackexchange.com/questions/38600/
(function() {
    var initializer = (function($) {
        var START_IDENTIFIER = 'start';
        var afterCache = null;
        var rankToggle = null;
        // Make sure there's an accepted answer and we're on the votes tab
        if ($('.vote-accepted-on').length && $(".answers-subheader a.youarehere[href*='tab=votes']").length)
            addAcceptedToggle();
        function addAcceptedToggle() {
            rankToggle = $('<input type="checkbox">')
                .css({'margin-right': '6px', 'vertical-align': 'bottom'})
                .wrap('<span>')
                .change(updateAcceptedRanking)
                .parent()
                .attr('title', 'When checked, de-pins accepted answer and includes it in normal answer ranking')
                .append('Rank Accepted Answer')
                .css({float: 'left', margin: '8px 0px 0px 25px', 'line-height': '22px', color: '#555555'})
                .insertAfter('.answers-subheader > h2')
                .end();
        }
        function updateAcceptedRanking() {
            var shouldRank = rankToggle.is(':checked');
            var acceptedAnswer;
            if ($('#answers .answer')[0] == (acceptedAnswer = $('.vote-accepted-on').closest('div.answer'))[0] && shouldRank) {
                if (afterCache == null) {
                    acceptedAnswer.detach();
                    var votes = parseInt(acceptedAnswer.find('.vote-count-post').text());
                    var moved = false;
                    // Figure out where the answer "really" goes
                    $('#answers .answer').each(function(n) {
                        var currentVotes = parseInt($(this).find('.vote-count-post').text());
                        // Put the accepted answer "on top" of the equally-voted answers
                        if (moved = (currentVotes <= votes)) {
                            if (n) {
                                afterCache = $(this).prev();
                            } else {
                                afterCache = START_IDENTIFIER;
                            }
                            acceptedAnswer.insertBefore(this);
                            return false;
                        }
                    });
                    // It belongs at the bottom...That seems unlikely
                    if (!moved)
                        acceptedAnswer.insertAfter('#answers:last-child()');
                } else if (afterCache != START_IDENTIFIER) {
                    acceptedAnswer.insertAfter(afterCache);
                }
            } else if (!shouldRank) {
                acceptedAnswer.insertAfter('#answers-header');
            }
        }
    }).toString();
    var scriptBody = document.createElement('script');
        scriptBody.type = 'text/javascript';
        scriptBody.textContent = '(' + initializer + ')(jQuery)';
    document.body.appendChild(scriptBody);
})();
5
  • The css function does accept an object as parameter for adding in multiple CSS property - value pairs. Or is this some Greasemonkey limitation I'm not aware of?
    – Yi Jiang
    Sep 15, 2010 at 11:53
  • @YiJiang: Nah, just a limitation of my early-morning thought process/jQuery experience. Thanks for the heads-up!
    – Tim Stone
    Sep 15, 2010 at 12:07
  • If you upload a greasemonkey script to any website and give it the extension .user.js the user will be prompted to install it.
    – Gelatin
    Sep 20, 2010 at 0:30
  • @Simon Brown: Ah, good to know, thanks. I suppose I should read the manual next time, heh. In that case I'll at least move it over to my site once I get around to fixing up the bugs.
    – Tim Stone
    Sep 20, 2010 at 1:13
  • “just as easy to scroll through the list of questions as I do to click a tab” I will click tab once and system will remember my preference for a future. Apr 21, 2018 at 4:34
3

I think the accepted answer on top is very informative.

It's only one answer to scroll past. It takes a place of prominence, since, after all, the question only exists because the question asker wrote it, so their opinion of the best answer is justifiably important.

There are many reasons an unpopular answer is accepted.

Sometimes it means that only one person really understood the question. This is a hint to the question asker that their communication was bad.

Sometimes it means that the most popular answer is technically correct (and pretty) but it doesn't answer the question. This can be caused by a complicated question, poor communication, or both.

Sometimes it's a mistake.

At any rate, I think it's important to show what the asker of the question considered to be the answer that solved their problem. It transmits a lot of information.

2
  • 1
    Yes, but I'm not suggesting we take away that view. What I'm asking for is another view for those who want to see the answers the community thought were best. Statistically, they're more likely to be "right" than one chosen by one person, and the one person who didn't know how to do it, to boot :-) I understand the distinction between the accepted and the community-voted-best answer.
    – user14860
    Aug 13, 2010 at 2:21
  • 1
    @paxdiablo - Statistically, they're more likely to be "right" than one chosen by one person. Not relevant. If the question was "I know it's not good practice but I need to do X" there's a very good chance that the highest voted answer would be "It's not good practice, do Y" whereas the answer that actually solves the problem (and is accepted) would have low votes.
    – ChrisF Mod
    Sep 15, 2010 at 11:58
2

I’ve written a user script so that you can at least change it for yourself: https://gist.github.com/Michael-1/5295ad559731c238a11a885328bedc5b

It is also listed on Stackapps.

4
  • Unfortunately, I can’t run userscript on ipad Apr 21, 2018 at 4:37
  • It is not available on Stackapps Apr 21, 2018 at 4:49
  • A bot classified it as “abandoned” and “deleted” it on Stackapps. I think you can still see it when logged in. Alternatively, you can use the script directly from the Github link. Apr 25, 2018 at 10:16
  • It works perfectly from github, thanks. Apr 25, 2018 at 10:37

You must log in to answer this question.