Recently I've come across a question that didn't contain any code. The questioner instead asked for code, as some new users do. So far same business as usual, but a user went ahead and posted a solution, since the question isn't closed (yet).

The question shouldn't have been answered to begin with, but now we are in a situation where there exists an answer. So what should we do?

  • Only comment on the answer? Something along

    You didn't review the questioner's code, since there was no code to begin with. Therefore, both your answer as well as the original question are off-topic for this site. Please have a look at [help/on-topic] and vote to close off-topic questions instead of writing answers for low-quality questions.

    (Might be a candidate for the FPCs)

  • Downvote?
  • Flag for moderator intervention?
  • Post on Meta?

In an ideal situation, the question would get closed before an answer has been written, but there will always be some edge cases.

PS: There is a similar meta question, but it concerns broken code questions. Here however we don't have any code to fix at all.

  • 6
    \$\begingroup\$ No code is even worse than broken code. Close the question and eventually throw it away. \$\endgroup\$
    – Mast Mod
    Nov 5, 2017 at 20:43
  • 1
    \$\begingroup\$ As the asker of the 'similar meta question', I don't see how it's restricted to 'broken code questions' only. The question and the answers can be applied to most, if not all, off-topic reasons. However it addresses questions, where this question addresses how to deal with answers. \$\endgroup\$
    – Peilonrayz Mod
    Nov 6, 2017 at 12:18
  • \$\begingroup\$ As I said in my very similar question codereview.meta.stackexchange.com/q/7085/4203 I believe that what constitutes an answer should be taken in the context of this site. So, if there is no code in the question, you can't possibly have a code review as an answer, so all answers to questions with no code are NAA. That said, the mods don't agree so I stopped flagging them as such. \$\endgroup\$
    – forsvarir
    Nov 15, 2017 at 11:54
  • \$\begingroup\$ I'd say that the answerer did a good job by reviewing all the code. Moreover, they haven't missed any single problem, not even a typo nor the slightest convention violation. That's just fantastic! \$\endgroup\$
    – maaartinus
    Nov 17, 2017 at 2:45

2 Answers 2


Off topic questions shouldn't get answers. If we're just too slow in closing off-topic questions, they still shouldn't get any answers.

Drop the poster of the answer a comment, indicating that the question they answered is off-topic. Usually you don't need to downvote for that reason alone, but I've seen that most such answers are of pretty low quality, too...

Proceed to just close the question and if you want to be extra involved: keep an eye on the q&a to make sure that it's cleaned up by the roomba (or trusted users)

  • 1
    \$\begingroup\$ Usually you don't need to downvote for that reason alone - Agreed. Just because an answer answers a question that's off-topic doesn't make it deserve a downvote. No vote is better than a down-vote IMO. \$\endgroup\$ Nov 5, 2017 at 21:28

Only comment on the answer?

You can certainly tell the answerer that such off-topic questions shouldn't be answered so that they won't do it again in the future. They may likely understand this and comply, otherwise a moderator may decide to formally warn them about answering blatantly off-topic questions.


It's your vote, so it's up to you. One benefit of doing this is that if the answer somehow has upvotes, bringing it to 0 or lower (assuming it's not already accepted) will allow the question to get cleaned up if it's closed and has a similarly lower score. However, if this doesn't end up happening, then a mod may just get rid of the question since ones without code really aren't useful on this site.

Flag for moderator intervention?

This wouldn't quite warrant moderator intervention assuming the answer itself is an answer, regardless of the question it's answering. You can still flag (or vote) to close a question if it isn't already. A mod may still come across the question and deal with the answer if necessary.

Post on Meta?

No, not for every question. This Meta question is good so that it'll help the community figure out how to deal with such questions. Meta questions for individual main site questions would be best for case-by-case situations, which may not apply to this one.

  • \$\begingroup\$ A mod may still come across the question and deal with the answer if necessary. - Deal with the answer how? \$\endgroup\$ Nov 5, 2017 at 21:29
  • 1
    \$\begingroup\$ Such as by commenting it on themselves or deleting it if warranted. \$\endgroup\$
    – Jamal
    Nov 5, 2017 at 21:36
  • \$\begingroup\$ "assuming the answer itself is an answer" Since all answers should contain a review and you can't review code that's not provided, what would such an answer look like? \$\endgroup\$
    – Mast Mod
    Nov 16, 2017 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .