Skip to main content
2 of 3
added 7 characters in body
Ben Aaronson
  • 5.8k
  • 11
  • 8

Posting code to check a box

A few times, I've seen questions where a considerable bulk of the question text is devoted to a question that's really more appropriate for StackOverflow or Programmers. But by posting code, the question manages to technically fulfill the requirements for a code review question, essentially adhering to the letter, but- I'd suggest- not the spirit of the site.

A recent example is this question: Dependency Injection into an Abstract Class, where the edit history is particularly revealing. Another one is Exceptions or something else? .


One possible line to take on this is that if an asker posts some code and a question relating to one particular aspect, an answerer isn't obliged to focus their review on the question. So we say: sure, an asker can try this box-ticking approach, but there's no reason to think they'll be happy with the result.

But often, especially if the off-topic question is interesting enough, an answerer will want to answer it. This happened with both of the above example questions- and for the second one, the "guilty" answerer was me. Plus, I'd suspect most askers who do this simply don't realise their question would be a better fit for another site. If their question is a better fit for Programmers, then they'd probably be happier with the response they get on that site.

So what you end up with is an off-topic question with a token code snippet attached to it, matched by an off-topic answer with a token code review attached to it.


So my questions are:

  1. Is this actually a problem at all?
  2. If so, is it a problem we can do anything about?
  3. If so, what can we do?
Ben Aaronson
  • 5.8k
  • 11
  • 8