I've said it before, and I'll say it again: we have an abundance of users who are too focused on their reputation, and don't care enough about the site's quality. Or maybe they do, but their definition of "quality" differs from mine.
Just this morning, I encountered a question whose title was something like "Remove last array element" and whose content was something entirely different. Namely: parsing a comma-separated string which could contain a trailing comma (foo,bar,
) into an array containing each separated element. The OP specified they wanted to remove the single, last empty element.
The OP showed their code (simplification mine):
inputString = "foo,bar,"
array = inputString.Split(',')
// now array contains 3 elements, "foo", "bar" and ""
What the OP didn't address:
- If the input string always ended with a comma.
- Whether there could be multiple trailing commas (
foo,bar,,
).
- Whether there could be enclosed repeated commas (
foo,,bar
).
- Whether they wanted to fix the problem before, during or after splitting the comma-separated string.
- What they had tried to solve the problem.
Yet over the course of 30 minutes, that question received 9 answers (of which 4 remain) from users having between 80 and 95,000 reputation.
And almost every single one of them answered the question's title, without taking a single look at the question. Posting answers like this:
array = array.Take(array.Length - 1).ToArray()
inputString = inputString.Substring(-1)
inputString = inputString.Trim(',')
array = array.Where(a => a != "")
Which is indisputably crap code. It is not reusable, makes fatal assumptions that will make it break (and maybe not in the OP's case, but definitely in others'), and it is simply wrong. There is one correct answer: leveraging the framework's String.Split()
option RemoveEmptyEntries
. Or, you know, use a CSV parsing library.
Apart from it being a duplicate of at least 1000 different questions, the question should not be answered before the OP added clarifications on the missing points mentioned above. The answerers shouldn't have hurried to answer the title, but try to understand the OP's problem instead (and then flag as possible duplicate).
My point with this simple example is that this happens hundreds, if not thousands of times per day. There's not always someone present who wants to carefully review every answer, who asks code dumpers to also add explanation to their answers, who sometimes recognizes copy-pasted text in answers and asks for source attribution, who thoroughly understands the OP's problem and sees that the answerers are misguided.
In other words: there are too many answerers who aren't quite good enough at what they're doing in order to be able to help create a site full of quality content. They might be able to help an OP over a single bump in the road, but they're not helping answer general questions with broadly applicable solutions. And yes, a oneliner can be that. At the same time, there are not enough knowledgeable users who want to review what is being posted, and they can't find the questions worth answering through the sheer volume of low-quality posts.
But people just want to gain reputation. They want to "help" the OP by pasting their question title in Google and copy-pasting the first hit. They don't want to spend time engaging with the OP (who might never come back), they just want to jot down some untested, barely working pseudocode that doesn't even address the problem. Because they're "helping", right?
There is no solution, other than to start all over.
Or, maybe there is, like the suggestion I've supported before: make questions from risk groups (new users, low-rep users, users who ask more than they answer) on hold by default, until they are reviewed and requests for clarification have been answered. And any people who Just Don't Get It and keep robo-reviewing (as in: vote to open a question that will be closed again quickly afterwards), just get a review ban for life.