News for hackers. Stuff that matters.
Re:Stack Overflow Sunsetting Documentation by PaulHoule on Thursday August 03, 2017 @08:10AM (#14918824)
Lately I have been writing a lot of Python and I am seeing a lot of bit rot in Stack Overflow lately.

For one thing, it seems almost all the code snippets use "print-without-parenthesis" from Python 2, so you cannot just cut and paste them into Python 3. It isn't hard to fix this, but it's a clear sign the lights are on and nobody is home.

The lack of curation is a problem too. Often the first answer is wrong, or less than optimal. From the viewpoint of somebody looking for answers you don't really want 10 people's opinion, you want one really good answer.

Re:Stack Overflow Sunsetting Documentation by fovc on Thursday August 03, 2017 @10:33AM (#14919916)
It's even worse with javascript. Often times there will be 10+ duplicates with legacy kludgy answers that are irrelevant now or using jquery, when the correct answer should use new APIs or less buggy browsers.
Re:Stack Overflow Sunsetting Documentation by tedmiston on Thursday August 03, 2017 @10:41AM (#14919981)
The solution to this is to get the original question asker to consider changing the accepted answer. You can leave a comment on their question if it's many years old to bring it to their attention.
Re:Stack Overflow Sunsetting Documentation by Chaebixi on Thursday August 03, 2017 @10:49AM (#14920045)
That assumes the original question asker is still even active, which is not a reasonable assumption on a crowd-sourced platform.
Re:Stack Overflow Sunsetting Documentation by tedmiston on Thursday August 03, 2017 @11:33AM (#14920456)
Yeah, success definitely varies if the person is no longer active and doesn't respond to the email notification. I've had mixed results with it in the case where the asker (new to SO) didn't realize upvoting answer(s) and accepting an answer are different things.

If it's a really popular question I think making it a community wiki is an alternative.

Re:Stack Overflow Sunsetting Documentation by Ajedi32 on Thursday August 03, 2017 @09:28AM (#14919325)
Agreed. I think a lot of this could be solved if they unpinned accepted answers from the top spot on questions and weighted votes based on how recent they are. That way new answers to old questions would have a better chance of rising to the top of the page more quickly.
Re:Stack Overflow Sunsetting Documentation by tedmiston on Thursday August 03, 2017 @10:43AM (#14920001)
You can change this as a user when browsing a question like that by changing order by from votes to active.
Re:Stack Overflow Sunsetting Documentation by Ajedi32 on Thursday August 03, 2017 @04:25PM (#14923500)
But then you're not sorting based on quality at all. The idea is the best answer should be the one on top. That's not necessarily the most recent answer, but it's also not necessarily that one answer that is really outdated but has accumulated tons of votes by virtue of being around a long time either.
Re:Stack Overflow Sunsetting Documentation by tedmiston on Thursday August 03, 2017 @06:52PM (#14924701)
Active sort is still based on quality -- it's not strictly most recent, but some combination of recency and votes... maybe like Reddit's hot sort.

For instance, on this question I posted a nicely upvoted thorough answer to a popular old question whose other answers were dated. By active sort it becomes #2 (#1 is always the accepted answer), but by votes sort it's #4.

https://stackoverflow.com/questions/695151/data-protocol-url...

The part about an old answer that was highly upvoted but is no longer right definitely exists — I'm not sure if they've thought about solving that one.

Re:Stack Overflow Sunsetting Documentation by tedmiston on Thursday August 03, 2017 @10:39AM (#14919966)
You can edit other people's answers to update them or fix this. Most people are very open to it. I do it regularly if the code isn't linted or if SQL keywords are lowercase vs uppercase to improve readability for everyone.
Re:Stack Overflow Sunsetting Documentation by shagie on Thursday August 03, 2017 @11:07AM (#14920211)
You can, but there is a very strong "don't modify other people's code; down vote wrong or not useful answers and provide your own" culture.

This becomes especially noticeable when answers based on an old version of the language or library no longer work for a newer one.

Re:Stack Overflow Sunsetting Documentation by tedmiston on Thursday August 03, 2017 @11:30AM (#14920419)
I agree if it is fundamentally changing the nature of their code, but expanding an answer to include a Python 3 solution alongside an existing Python 2 one is something I've done myself and haven't experienced any issues with. IMO the most important part is to preserve and extend the original answer vs re-write it completely.
Re:Stack Overflow Sunsetting Documentation by rhizome on Thursday August 03, 2017 @04:41PM (#14923662)
You don't have to modify, and I never do except to improve readability (read: eliminate or reduce horizontal scrollbars). It's not unusual to see a good contributor add an answer to an old question that uses newer syntax or version features. "The accepted answer is quite old but this question is the top result for 'javascript arrays' (e.g.), so this is how you do it in ES6."
Re:Stack Overflow Sunsetting Documentation by jschulenklopper on Thursday August 03, 2017 @02:11PM (#14922144)
Sure, but can answers be un-accepted once technologies have advanced and better solutions have become available? I see a lot of accepted answers that were correct and relevant once, but not in (Summer of) 2017.
Re:Stack Overflow Sunsetting Documentation by tedmiston on Thursday August 03, 2017 @05:00PM (#14923846)
Yes, it is possible and best practice to re-accept if the previously accepted answer is no longer correct. Only the asker can change the accepted answer.

https://meta.stackexchange.com/questions/93969/is-changing-t...

https://meta.stackexchange.com/questions/120568/is-it-possib...

Re:Stack Overflow Sunsetting Documentation by mark-r on Thursday August 03, 2017 @07:21PM (#14924915)
And that is the problem, the asker has generally moved on and will never visit the question again.
Re:Stack Overflow Sunsetting Documentation by the8472 on Thursday August 03, 2017 @09:29AM (#14919339)
> so you cannot just cut and paste them into Python 3.

I think that's not such a bad thing. https://i.imgur.com/Uq6tksu.jpg

But yes, answer rot can be a bit of an annoyance. Often it helps to check the answering date. The official answer to the problem is that one should post a new answer to an old question, but it would be great if one could just drive-by flag things as outdated, needs update or something like that.

Re:Stack Overflow Sunsetting Documentation by tokenizerrr on Thursday August 03, 2017 @09:44AM (#14919482)
Yes, when a language changes itself in a backwards incompatible way then older answers are no longer compatible with the new version.