News for hackers. Stuff that matters.
Re:The most copied StackOverflow snippet of all time is flaw... by jsmeaton on Thursday June 17, 2021 @03:03AM (#27536889)
An idea I've had for a long time is that "the community" can vote to override an accepted answer. There are many times when the accepted answer is incorrect, or a newer answer is now more correct, but the only person who can change an accepted answer is the OP.

I think community-based changes to the accepted answer would go a long way to solving your problem too, but it requires someone to be reviewing newer answers and identifying when there's another that would be more appropriate.

It'd incentivise writing newer answers to older questions. Correcting accepted answers that probably weren't ideal to begin with. A new "role" where users hunt through older questions and answers looking for improvements to make.

Stack Overflow answers are supposed to be community-based, but we unfairly prioritise the will of the original questioner *forever*. I don't think that's optimal.

Re:The most copied StackOverflow snippet of all time is flaw... by irrational on Thursday June 17, 2021 @04:32AM (#27537374)
As a side gig I teach an intro to web development class online. Every semester I get students asking for help about why their code isn’t working. Nine times out of ten, they are trying to use some jQuery code they copied from stackoverflow because it is the accepted answer. They don’t yet know enough to recognize that it isn’t vanilla JavaScript (which they are required to use).
Re:The most copied StackOverflow snippet of all time is flaw... by dotancohen on Thursday June 17, 2021 @07:54AM (#27538584)
The best way to address these students is to ask them "Why do you think that this should work?"
Re:The most copied StackOverflow snippet of all time is flaw... by tacticalDonut on Saturday June 19, 2021 @01:08PM (#27562240)
What platform do you use to teach the course? I've been teaching an ML from scratch course for junior devs at my company and think it'd be useful for others.
Re:The most copied StackOverflow snippet of all time is flaw... by dotancohen on Thursday June 17, 2021 @07:53AM (#27538576)

  > but the only person who can change an accepted answer is the OP.
This system makes the person arguably _least qualified_ to understand the situation the single arbitrator as to which answer is accepted.

Was it the most efficient? First to answer? Copied-and-pasted right in with no integration work? Written by someone with an Indian username? Got the most upvotes? Made a Simpsons reference? Written by someone with an Anime avatar?

Re:The most copied StackOverflow snippet of all time is flaw... by NaturalPhallacy on Thursday June 17, 2021 @11:38AM (#27540788)
>This system makes the person arguably _least qualified_ to understand the situation the single arbitrator as to which answer is accepted.

Devil's advocate: If it fixed their problem adequately, it's acceptable.

Maybe separate "acceptable" and "ideal" answers would be a nice feature?

Re:The most copied StackOverflow snippet of all time is flaw... by dotancohen on Thursday June 17, 2021 @04:20PM (#27544131)
In the vast majority of cases, OP did not check (or even define) edge cases, race conditions, memory usage, network activity, etc etc etc.
Re:The most copied StackOverflow snippet of all time is flaw... by aweiland on Thursday June 17, 2021 @10:38AM (#27540038)
Seems like the answer is to add a community accepted answer that's easier to change over time, while keeping the accepted answer feature as is.
Re:The most copied StackOverflow snippet of all time is flaw... by passivate on Thursday June 17, 2021 @02:52PM (#27543110)
>This system makes the person arguably _least qualified_ to understand the situation the single arbitrator as to which answer is accepted.

What is the argument for the OP being the least qualified?

Re:The most copied StackOverflow snippet of all time is flaw... by Leherenn on Thursday June 17, 2021 @04:25PM (#27544169)
The argument is probably that while they are the best qualified to know whether it solved their issue, they're not qualified about whether it was the best way to solve their issue, since they had to ask in the first place.
Re:The most copied StackOverflow snippet of all time is flaw... by dotancohen on Thursday June 17, 2021 @04:19PM (#27544120)
Of all the people involved, he was the one who _didn't_ know how to resolve a specific issue.
Re:The most copied StackOverflow snippet of all time is flaw... by passivate on Thursday June 17, 2021 @05:00PM (#27544469)
Well, they do know the tech stack, the domain, the specific problem. Now they know whether the solution resolved their specific problem, if their code review/testing caught any bugs, etc, etc.

If anything, they have the most amount of information in this context. I really don't think of them as being the least qualified.

Re:The most copied StackOverflow snippet of all time is flaw... by jsmeaton on Thursday June 17, 2021 @07:23PM (#27545579)
Yeah there’s an argument for that. I think it’d hold more weight if narrow, specific, and loosely defined duplicate questions were allowed - but they aren’t.

Questions and answers belong to the community. I think the accepted answer should too - maybe after some period of time.

Re:The most copied StackOverflow snippet of all time is flaw... by dTal on Friday June 18, 2021 @08:40AM (#27549681)
(or she :))
Re:The most copied StackOverflow snippet of all time is flaw... by dotancohen on Friday June 18, 2021 @01:38PM (#27552815)
Why you always on about women, Stan?
Re:The most copied StackOverflow snippet of all time is flaw... by Breza on Wednesday June 23, 2021 @08:20AM (#27603587)
Currently the only incentive to post a new answer to an old question is you get a special badge. That's neat but limited. I've gone through old R questions and posted answers with a more modern syntax and my answers rarely get much attention.

I'd be cautious about overriding an accepted answer. Imagine a situation where there's an easy-to-understand algorithm that's O(n^2) and the "Correct" algorithm that's O(n). If OP only has a dozen datapoints, the former might be the best answer for her specific problem, despite it clearly not being the right approach for most people finding the thread via Google in the future.

Re:The most copied StackOverflow snippet of all time is flaw... by inglor on Thursday June 17, 2021 @04:54AM (#27537494)
They actually recently added this feature - you have a "this answer is outdated" button you can press. Note sure what the reputation threshold to see it is.
Re:The most copied StackOverflow snippet of all time is flaw... by jsmeaton on Thursday June 17, 2021 @08:18PM (#27545944)
I've browsed a few tags and haven't been able to see that button and my reputation is 40k+ so I'd expect to have all features enabled.

Are you able to point me to a Meta/Blog post or even just a screenshot please? I'd be keen to see it.

Actually it looks like https://meta.stackoverflow.com/questions/405302/introducing-... is the announcement for wanting to tackle the problem. Not sure if they've implemented it yet though.

Re:The most copied StackOverflow snippet of all time is flaw... by weinzierl on Thursday June 17, 2021 @05:57AM (#27537933)
"An idea I've had for a long time is that "the community" can vote to override an accepted answer."

I don't know if this is still a thing, but for some time in the past when an answer was edited more than a certain amount of times it automatically turned into what was called a "community wiki" answer.

Re:The most copied StackOverflow snippet of all time is flaw... by zatkin on Thursday June 17, 2021 @04:30AM (#27537363)
Or you could just edit the accepted answer if it’s wrong? I’ve seen a few posts where the top contains an “UPDATE” that, in summary, links to another answer.