I frequently come across SO questions that have code snippets just copy/pasted from poor online sites and asking what is the problem with that code and why it doesn't work.
The main problem with these types of questions is that these questions shown no effort in showing that OP has tried anything for diagnosing/solving the problem. For example, the bare minimum that they could've done is that start using a debugger or just add cout
/print statements to see what is wrong with the code. But they often did none of these things.
So, I usually close these type of questions as duplicates of What is a debugger and how can it help me diagnose problems?.
Now, in a recent discussion it came across the following comment:
At least one SO moderator has strong feelings about gold tag-badge holders who habitually misuse their unilateral close votes. And "lack of effort" is not - nor has ever been - a close reason.
(end quote)
The main problem that I've with these type of question is that:
If this is allowed, then I(or someone) can copy/paste 100s of random code snippets from online articles that don't work and post them as 100s of different questions on SO asking what is wrong with them without trying by myself to diagnose the problem. The user(OP) atleast IMO have to try to diagnose the problem and show us what they've tried.
Also, as you can see in the above quoted comment, the user has said the "lack of effort" has never been a close vote reason.
So, my question is is it acceptable by SO standards to close these type of questions as a duplicate of What is a debugger and how can it help me diagnose problems? when the user(OP) shows no effort from their side in diagnosing the problem.
If not, I suggest that SO should add Lack of effort as an official close reason. Doing this people can vote to close a question if they see that OP has made no effort in diagnosing the problem and then we would've a more accurate closing reason than as a duplicate of What is a debugger and how can it help me diagnose problems?.