The accumulated corpus of Stack Overflow content is probably worth less than you think. There is a lot of outdated code on SO.
It’s a growing issue for the platform as the community prefers to direct people to existing answers, and Google tends to reward older URLs that still attract traffic. The result is that a lot of searchers are learning how things were done years ago, instead of how they are best done now.
Platforms change, APIs change, languages change. That means the “answer” to how to do things changes too.
Imagine asking “what would happen if libraries threw away all their outdated computer books?” Obviously they do, and it’s good for their patrons as long as there are updated books replace them.
If Stack Overflow went away tomorrow, one of the many other places where people can talk about coding would become the go-to place to get answers. A more ephemeral approach to answers would probably be better in the long run.
That's a trivial dismissal. Plenty of stuff gets outdated after a few years, Python 2.x being an extreme example that comes to mind. But because (as a hypothetical example) "the Python 2.x way" answer has 12.4K votes, and the newer "Python 3.x way" has only 200 points, so guess which one is still being implemented more? More generally, there was a day before your favorite language had its version of async in release builds, and there was a day after that. Somewhere in there, probably less than six months, a better way to do some things came about.
And there are answers that are still correct after many years, if Python2 to Python3 transition is an issue then make sure to google "python3" or something.
IMO a professional developer should be at least competent enough to detect if an answer is for an outdated version of the language, library or framework, we should not delete or hide old answers just because n% of developers jumped to latest version yesterday or implement some policy that works for XLang globally so XLang users don't copy paste like ... invalid code that won't compile without a minor change.
>IMO a professional developer should be at least competent enough to detect if an answer is for an outdated version of the language, library or framework
That's mighty tolerant of you: because there can't possibly be a "professional developer" who doesn't realize something's not being done the correct way, right?
Couldn't possibly be the case a Go dev has to do something in Python, and doesn't know they should use the Python 3 method instead of the 2 or 1, right?
So what is your point? We need to optimize Python answers for the super rare professional Go developer that was assigned to edit some python but he clueless so he must find the correct answer that just works with a copy paste? I would optimize for the larger number of people that still have to use Python2 projects using python2 libraries.
Btw the Go dev since is a Pro should already know to not copy paste the first answer and look at the comments , dates and the other answers
That older Python 2 answer can be edited/amended to either include the "Python 3 way" (if it's simple enough), or to add a notice that there's a better/newer way of doing this in Python 3, possibly with a link to another answer.
I don't think they way Stack Overflow deals with this is perfect, but there are tools to deal with this.
Can users other than whoever wrote the to-be-updated answer do that?
I think it requires action by either the poser of the question (if they can change the ‘winning’ answer months or years after picking it) or the user writing the winning answer.
Anyone can edit anything; you don't even need an account. Edits from users with <2,000 reputation and anonymous edits need to be approved, and it's not a wiki where you can radically depart from the original author's intent, but many answer have improvements, additions, etc.
It’s a growing issue for the platform as the community prefers to direct people to existing answers, and Google tends to reward older URLs that still attract traffic. The result is that a lot of searchers are learning how things were done years ago, instead of how they are best done now.
Platforms change, APIs change, languages change. That means the “answer” to how to do things changes too.
Imagine asking “what would happen if libraries threw away all their outdated computer books?” Obviously they do, and it’s good for their patrons as long as there are updated books replace them.
If Stack Overflow went away tomorrow, one of the many other places where people can talk about coding would become the go-to place to get answers. A more ephemeral approach to answers would probably be better in the long run.