{justCSS}

Just plain CSS

est. 2015

The problem with StackOverflow karma

Something has been bugging me about StackOverflow for quite a while now … I have a serious problem with wrong answers being up-voted and/or accepted, simply because they were posted first and the solution worked, even though there might be a better answer that makes more sense programatically/semantically.

I’m sure you’re familiar with StackOverflow – the Q&A site where developers post their problems and the community answers their questions or offer solutions in exchange for karma points. It is a great resource and, because of it’s popularity, you’ll probably find it dominating Google search results pages when searching for answers to your code related problems. All this is good and well, but I have to wonder how some users accumulate so many points (and when they do any actual work) with so many feeble to downright shit answers.

I was reminded of this again today when I saw a question relating to the styling of <sup> tags and the subsequent line height issue. The accepted (and most up-voted) answer proposed:

sup { vertical-align: top; font-size: 0.6em; }

… and …

sup { vertical-align: top; position: relative; top: -0.5em; }

… both methods setting the vertical alignment of the superscript element to top and then messing with either the font size or pulling off a positioning hack to move the text into position – in either solution, you will find that it messes up the line height of the surrounding text. A much better solution (also the one that I use) would be:

sup {
    font-size: 0.83em;
    vertical-align: super;
    line-height: 0;
}

… which simply sets the line height to 0 and fixes the issue with surrounding text having an adjusted line height to accommodate the <sup> height/position.

The above solution aside – my issue is not with the right/most correct answer, but with the fact that the person who posted the first answer has 308K karma points and that his/her answer was up-voted because the solution worked, not because the solution was the correct one. Furthermore: no-one ever changes their acceptance of an answer (I think it is possible, given certain time frames), which means that a person searching for a similar solution is directed to an answer that is less than ideal and likely implemented verbatim … and so the rot spreads.

I think the problem can be solved in 2 easy steps:

  1. There needs to be a cool off period before an answer can be accepted as the correct one, to allow other users the opportunity to post their answers for consideration.
  2. Once the cool off period is over the OP (original poster) MUST accept an answer, if the OP fails to do so within a given time frame, the most correct answer needs 3 votes from a mod (or user with sufficient privileges) to be accepted and the karma points awarded (another bug bear of mine – where OPs never accept an answer … typically someone who only ever uses SO once to solve one tiny problem and never bothers to check in again after their problem is solved).

I don’t think it’s a very difficult problem to solve and/or solution to implement and may help stem the tide of false prophets rising up the ranks – what do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *