71

Software changes. Good answers become bad. Stack Overflow does not currently have useful tools to account for that. How can we use the existing site features most effectively to handle outdated content? To give one example of many, I'll refer to the Q&A below:

Built-in module to calculate least common multiple

The top-voted and accepted answer is now incorrect due to the Python 3.9 release, but many of the usual recommendations we find on meta are unsuitable, e.g. they rely on the asker and/or answerer still being active to respond.

Comment to answerer that the information is outdated?

Answerer is last seen approx two years ago (Feb 2019). And there's already a comment there.

Comment to OP asking them to change accepted answer?

The OP is last seen approx two years ago (Feb 2019). Even when they're active, this idea only rarely works.

Go ahead and edit it so that the top answer is correct.

It would make the second answer entirely useless. (nb: usually this is my choice, but it seems impolite when it invalidates other answers)

Downvote it, upvote the current answer.

It was a good answer, as the score reflects, and will probably keep getting upvoted as long as accepted answers stay pinned to the top. Many users are reluctant to downvote so voting will never rebalance these answers correctly.

Upvote that commenter who points out that the answer is outdated.

Okay, but it doesn't really help much. Comments are ephemeral and have lower visibility. The answer remains wrong.

That poster of the 2020 answer should have just made the edit...

Now, this one I strongly agree with! But that ship has sailed. Unfortunately I've often seen users (and even moderators!) prefer to post a late answer to boost their stats, rather than just making the necessary edits to put the current information where it will be of most utility.


Have I missed any workable solutions here? How can we best keep the knowledge base current for what I believe is the silent majority, those users who search and find solutions to their problems without posting at all, without them having to wade through outdated content?

23
  • 12
    I think what would leave least harm, is to edit the (accepted) top answer with a note at the end, linking to the current answer, and upvote the latter along. Nov 17, 2020 at 18:42
  • 29
    "I've often seen users (and even moderators!) prefer to post a late answer to boost their stats " - that's an assumption and a half. Especially considering that is the generally accepted guidance Nov 17, 2020 at 18:45
  • 10
    @πάνταῥεῖ Perhaps. For me that's a little like going into someone's house and telling them that their neighbor's house is much nicer - difficult to do without seeming rude.
    – wim
    Nov 17, 2020 at 18:46
  • 2
    @Nick This was not just an assumption, it was a direct admission from a diamond mod when I discussed this in chat. I'm not saying that user is wrong, they're very successful at posting late competing answers. Just that different users have different motivations.
    – wim
    Nov 17, 2020 at 18:48
  • 6
    "Little incentive" is not the same as "I do it for the points" Nov 17, 2020 at 18:49
  • 8
    @wim "difficult to do without seeming rude" I won't see anything rude in that action, it's just a technical addition like "For the current standards see this [answer](<link>) also please.", much like errata. Nov 17, 2020 at 18:50
  • 1
    Sticking with the specific example you gave, I don't see how it is wrong except for the opening statement There is no such thing built into the stdlib. I would say that editing this out and upvoting the more up-to-date answer would be the best thing to do in this scenario. You keep the answer with its original intent but also removing false statements. As to the general case, of course it is hard to say
    – Tomerikoo
    Nov 17, 2020 at 18:53
  • 24
    Is there any reason we can't just edit in the versions to which the old answer is applicable to the top of the post? Something like, This answer is valid for versions X.XX - Y.YY..
    – BSMP
    Nov 17, 2020 at 18:56
  • 1
  • 4
    @wim Leave it alone. The accepted answer is the one that helped OP most when the question was posted, period. Very rarely do good programmers blindly grab the most upvoted or accepted answer and assume it will work. Multiple answers are allowed for good reason. This answer of mine is in a sea of other answers and to say it's more correct than the rest is contestable stackoverflow.com/a/48858518/2191572. As soon as you edit the accepted answer then anyone using Python 3.4 will arrive at a wrong answer.
    – MonkeyZeus
    Nov 17, 2020 at 21:09
  • 4
    @MonkeyZeus but also good programmers rarely have time to read everything until the 30th answer to find out whether there's something which might work. That the OP accepted it as working at the time of posting is exactly what is the subject of debate here, and the debate as to whether the accepted post should pin to the top at all. Having a notice at old, popular questions where the answer changes upon version, a note which somehow says "This is for version X, see here for version Y", or even adds newer functionality would be much better IMO.
    – Adriaan
    Nov 17, 2020 at 22:14
  • 2
    @MonkeyZeus That the accepted answer has helped the OP most when the question was posted is a fact that will remain true, even if the Q&A were to be updated (or even deleted) later. What's the benefit of leaving the outdated info forever, when very few and eventually no new visitors finding the Q&A in the search will be running such old versions?
    – wim
    Nov 17, 2020 at 23:08
  • 4
    Somewhat related: Please unpin the accepted answer from the top
    – Ajedi32
    Nov 18, 2020 at 4:23
  • 11
    That answer isn't "incorrect", it just needs to say "for Python version X.x"; there are still many people using non 3.x versions of Python. The idea that everyone is, or should be, using v3 is incorrect. Plenty of legacy situations out there where what's running must stay running, as well as older machines, etc.
    – fyngyrz
    Nov 18, 2020 at 16:08
  • 4
    and there are still people using 2.7 (notMe)... so answers pertaining to some older versions are still worthwhile to have Nov 18, 2020 at 20:40

5 Answers 5

22

As you and others have noted, it tends not to be great to edit the accepted answer to contain an entirely different answer, since:

  • That's not the answer people voted on
  • The author of the accepted answer may not have the required knowledge, skills, or time to evaluate the new answer and so may not want it in their name, or may have ceased using Stack Overflow (as in this case) and so not have a chance to judge at all. That's not a cast-iron reason not to act, but it is unfortunate to attribute an entire new answer to a person who didn't write it.
  • Such an edit would often (as in this case) duplicate other answers

Editing in a note or heading to indicate which versions each answer refers to therefore seems preferable to me. Bonus points for doing so consistently across all worthwhile answers, so the reader can see at a glance which answers refer to which versions. I've gone ahead and done so; this seems like a close-to-optimally reader-friendly solution to me (though not perfectly optimal - in an ideal world the Python 3.9 answer would one day rise above the Python 3.8- answer, which it won't), and avoids all the downsides of other approaches you rightly enumerated.

Screenshot of the current answers

6
  • 1
    Yeah that sounds good. Nov 19, 2020 at 15:12
  • 6
    "in an ideal world the Python 3.9 answer would one day rise above the Python 3.8- answer, which it won't" It might. Some day, SE might finally get around to implementing what most of the community wants. :-) Nov 19, 2020 at 19:35
  • 1
    "Note of header". Not a note at the bottom, a header at the top, only - to make it very clear. Like in your example.
    – einpoklum
    Nov 20, 2020 at 9:40
  • I recently reverted a few years old accepted answer to a previous version, since the latest one added an incorrect solution, but otherwise did not modify it. I left a comment about it. Would this be "okay" too? stackoverflow.com/a/46961493/777985
    – Ray
    Nov 20, 2020 at 16:11
  • 1
    I don't think this is "close to optimal". In fact, I think it's very, very far from optimal. Everyone having to scroll past an out-of-date solution (or possibly multiple ones, since this also applies to highly-voted answers) to get to the solution they want is a pretty significant issue in my opinion. Although it seems like the best option we've got. Nov 20, 2020 at 16:20
  • I agree with the general idea of this answer. But in the example, I would not have used the header "Python 3.8 and earlier", since it does work in Python 3.9. Instead, I would have edited the first sentence to say "In Python 3.8 and earlier, there is no such thing in the stdlib"
    – Flimm
    Feb 22, 2021 at 9:19
41

I think the best thing to do is to edit the answer to mention that it is no longer valid for current versions of Python. Something like:

This solution is for versions of Python prior to 3.9.

There are a lot more examples of accepted answers becoming outdated and incorrect but still being featured first. A solution could be to have a new post status called "expired accepted answer". After a few years instead of the accepted answer getting a green checkmark it could get a gray one and no longer automatically appear on top of all of the other answers. The original poster would still have the power to re-accept the answer after it expires if they wanted to. Perhaps I should make a new post proposing this as a feature-request. Is that still the correct way of proposing changes to Stack Overflow?

I've had an experience were a random person made a change to the top answer on this question, that basically said the same thing as what I posted a couple of answers below. I tried to update my answer so it wasn't completely irrelevant, but now there are 2 answers that basically promote the same solutions, so that is something we definitely want to avoid making happen.

6
  • 5
    A solution could be to have a new post status called "expired accepted answer". After a few years instead of the accepted answer getting a green checkmark it could get a gray one and no longer automatically appear on top of all of the other answers. The only problem with this solution is that many question askers leave as soon as they get their answer. And some accepted answers don't become obsolete, so we can't automatically mark them as such.
    – 10 Rep
    Nov 17, 2020 at 23:04
  • 3
    It would still appear on top if it has the most upvotes. I was trying to go for a way of allowing the accepted answer to have to start fighting to maintain its status as the first answer while giving it some sort of emblemage if it was no longer on top. Nov 17, 2020 at 23:45
  • 1
    Leaving it as a green checkmark with a different behavior or having no indication at all that the answer was once the accepted answer both seemed like worse ideas. We wouldn't have to use the wording of "expired accepted answer" we could just make it so that hovering over a gray checkmark has the hover message prefixed with "this message was accepted x+ years ago", and then make it lose its immunity to always being on top. Or some other similar message. Nov 17, 2020 at 23:48
  • Or maybe something like: Warning, this accepted answer is really old. It may be obsolete.
    – 10 Rep
    Nov 17, 2020 at 23:57
  • An answer with identical code, but with a better explanation is still valuable. The "why" and "how" of an answer is at least as valuable as the "what."
    – Booga Roo
    Nov 18, 2020 at 4:51
  • True. I just feel kind of miffed because I was on track to become the top answer on that question until some newbie edited the top question to copy mine, but it is what it is. Nov 19, 2020 at 19:40
19

Unfortunately, there is nothing we can do at the moment. To solve this issue properly we would need better tools from Stack Overflow. There is no way to mark an answer as obsolete or make it less prominent if it is accepted.

However, there is a workaround we can do in some cases. If contacting the user or editing the answer is not an option, you can just add a note to the top of the answer explaining the pitfalls. If there is a better answer you can say something along these lines:

This answer applies only to Python < 3.9. If you are using Python 3.9 or newer then please see this answer.

Example.

Be careful not to do this for trivial reasons, especially if you are trying to direct users to your own answer.

The same goes for answers containing broken code or containing security vulnerabilities. We have to remember that such answers can still be useful to a very narrow band of users and removing them is not an option. If these answers are bad then we should do what we can to direct users to valuable answers, but we can't remove existing ones. We can only downvote them and upvote the better ones.


Having said that, I really think we should have a better way of dealing with obsolete content. Every day, there's more and more of such information that is useful only to a handful of people supporting legacy systems. This is even more true in web environments which have matured and rapidly changed over the years. A lot of answers are nothing more than noise to people learning these technologies now.

I actually have the same problem. There is a PHP answer that is just copied from old PHP manual which contained a broken example. The example does not help to explain the use of transactions and is actually confusing PHP beginners. The PHP manual page was recently improved but the Stack Overflow answer stayed in the old state. I have added an answer of mine and now added a comment asking the author to improve it.

4
  • 7
    That narrow band of users you mention are definitely out there. Plenty of people are stuck with old software through no fault of their own. Answers for old software aren't really "obsolete" if they're still correct and someone still needs it.
    – Booga Roo
    Nov 18, 2020 at 4:54
  • The only thing that we have ready is the meta effect. We could actively collect a list of outdated content and try to generate updated content and vote on the updated content. The biggest problem is the accepted check-mark that distorts the sort order. I'm sure there are numerous feature requests about that. If only we and the company together could focus on that... Nov 18, 2020 at 8:30
  • @BoogaRoo I would argue that answers that work for obsolete software versions are even more valuable than current solutions. Where would you find the information otherwise? As you say, sometimes people are stuck using old stuff. Nov 18, 2020 at 17:39
  • 4
    If you're worried about self-promotion of your own answer, just be generic and point out that there are other answers rather than editing in a link to yours. Nov 18, 2020 at 17:41
5

The problem of outdated accepted answers is a subset of a more general problem of bad accepted answers.
To solve this problem, as well as the more general problem, make the bad accepted answer slowly lose the green color of its checkmark and its top position in the thread. Yes, this is more than existing tools allow, but I thought this idea is useful.

As other answers get upvoted relatively to the accepted answer:

  • The green checkmark next to the accepted answer should slowly lose its color, and fade from green to gray.
  • The accepted answer should slowly lose its top position.

The end result is that a relatively bad (outdated or otherwise) accepted answer should end up with a grey checkmark and below the better answers.


Details:
The specifics of fading out the color and moving the bad accepted answer down the thread should be determined experimentally, perhaps by giving the "acceptance mark" a specific weight in relative votes, between 0 and 100%.
A weight of 100% corresponds to the current situation: accepted answer always stays on top and its checkmark stays green forever. That would be true even if an accepted answer has 1 vote and another answer has 10 votes. Not good.
A weight of 0% corresponds to completely ignoring the fact that an answer was accepted. If a question has 2 answers: an accepted answer with 9 votes and another answer with 10 votes, the accepted answer loses its top position and gets a gray rather than green checkmark. Not good either.
Obviously, the optimal solutions are somewhere in between these two extremes.

3
  • 1
    The problem with this is that some answers may not be outdated. In that case, it would be a bad thing for that answer to lose it's top position. However, your answer has no votes, and I do like the idea, so +1 :)
    – 10 Rep
    Nov 19, 2020 at 4:20
  • 1
    "Slowly" is not good enough, where a clear indication of the problem (as per the accepted answer here) is immediate. -1.
    – einpoklum
    Nov 20, 2020 at 9:40
  • @einpoklum Good point! When the problem is clear, as in the OP, this slow method needs to be combined with any of the fast methods from other answers. E.g., as Dharman suggested in the current thread, add something like this at the top: "This answer applies only to Python < 3.9. If you are using Python 3.9 or newer then please see this answer." But sometimes the problem is not clear, e.g., when the community is in the process of slowly switching to the next version of the software. Nov 20, 2020 at 15:44
1

TL;DR: I am going to suggest implementation of a complicated feature similar to the closing posts system.


Currently, there's only one thing to do: edit the answer in question to include the fact that it's obsolete. By all means, if you see an obsolete answer, then please edit that in. But, as Dharman said, there needs to be a better solution.

This is a good solution becuase it doesn't require much effort: one person can edit it in, and if the OP comes along and updates their answer, then they can also remove the warning.


But, what if you are a user without 2k edit privileges? You see an old question with a huge amount of obsolete answers. You cannot edit them all, can you? What does one do in this scenario?

One way to fix this would be to allow users who have a bronze badge in one of the question's tags to vote an answer on the question obsolete. They cannot be the one to edit the tag into the question. They can then request other people to vote an answer obsolete in a chatroom and provide a reason for why the answer is obsolete.

We could also make it a score of 5 instead of a bronze badge, as it's hard to find 3 bronze badge holders on a small technology, especially in a chatroom.

Gold badge holders would have a binding vote, as we do with the dupe hammer system. As long as they are not the person who edits the tag into the question, they can, with one click, mark an answer obsolete, along with a reason.

Whenever an answer is marked obsolete, the owner of the post gets a notification that goes along these lines:

Your answer has been marked obsolete by your peers. Please update it, as Stack Overflow is like an encyclopedia and we don't want outdated information here!

Then, once the author edits it, the voters/gold badge holder would get a notification to review it and see whether or not it's obsolete. They can then remove the obsolete mark.

To encourage the voters/gold badge holder to review it, there could be a few badges, similar to review queue badges.

Obsoleter: remove/keep 1 obsolete answer

Remover: remove/keep 20 obsolete answers

Vacuum Cleaner: remove/keep 100 obsolete answers


I know this is a very.... what's the word? Convoluted solution, I think. It may be worth more trouble than this problem actually is. But I like it, and it would be really cool if this was implemented IMO.

4
  • 12
    It is similar to a suggestion here in 2014. The problem is we can ask for new tools till the cows come home, for years we're not seeing useful new features for curation of content, no matter how popular the suggestion was on meta. That's why this question specifically asks for what we should do with the existing tools.
    – wim
    Nov 17, 2020 at 23:13
  • @wim then I will highlight the existing tool part more.
    – 10 Rep
    Nov 17, 2020 at 23:16
  • A user who is prepared to spend time earning a "vacuum cleaner" badge is a pretty sad user in my view. Users who do this kind of maintenance do it because they have OCD not because they earn badges. Nov 18, 2020 at 18:19
  • 1
    We don't need more badges. Just more stuff that people will try to game. Nov 18, 2020 at 18:21

You must log in to answer this question.

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