It is a common misconception that questions "requesting code" are off-topic. Usually these people express their opinion with the following line:
We are not a code writing service
Yes we are. We write code. We do it all the time. People ask questions, we write code. This is not the only thing we do, but we do write code, and we are a service. So yes, we are a code writing service. Sorry to burst your bubble.
Here is another common comment that you may recognize:
We are not going to do your homework for you
Well... we probably are. You may not, whoever upvoted your snarky comment may not, but someone is going to do their homework for them. You being snarky about it isn't going to change anything.
What do you think they are asking for? Code.
None of us like low quality questions. But taking offense to low quality questions and close voting them out of spite by picking the first close reason you see whether it applies or not is probably the worst thing you could do for the situation.
If a preset close reason does not apply, you probably shouldn't be voting to close it. There are exceptions to this rule, but they are few and far between.
Just because a question is off-topic, does not mean that the first thing you should do is vote to close it.
- If you can edit the question to make it on-topic, you should do that.
- If clarifications or more information from the poster will make it on-topic, you should request that in a comment.
- If there is anything that you can do to make the question even a little bit more on-topic, you should do that.
If the scope of the question is just too broad, or it covers too many topics, it is off-topic. How broad a question is should be determined on a case by case basis. Just because the answer to a question is more than you want to write, does not mean that it is inherently off-topic, you might just not like writing long answers. Right now we close a lot of questions as too broad that are not really all that broad.
There is a difference between you not comprehending the question, and the question being unclear. If you just don't know what the guy is talking about, it might mean that it is something you don't know. It might also mean that he is making no sense at all.
If the question is not actually asking a question, i.e. it does not have an interrogatory statement, but you can infer the question from the problem statement (the problem statement "X code has Y error" implies "How do I fix Y error?" and possibly "Why is Y error happening?"), then you should judge the question based on the implied question statement.
- If it would be otherwise on-topic with a proper question statement, please edit it
- if not then close vote it for whatever the next on-topic close reason would be. It sucks when you close a question as unclear because it doesn't have a question statement, then and obvious question statement is edited in which makes it too broad. Now it is clear but overly broad.
If it is asking for the question is asking for opinions...