I've noticed that sometimes I end up reviewing code despite the question's violation of our policy that it must contain working code. I bring this issue up because it is related to Changing wording of the code-to-be-written and working-code off-topic reasons, but I don't want to sidetrack that discussion.
Specific examples of such questions include:
The question was about understanding a compiler error. The question was not closed at the time, and in fact attracted several answers before I weighed in with a more thorough code review. (Incidentally, this was the first answer I wrote on this site, a year ago, when I was unfamiliar with the rules.)
This question was blatantly asking for code to be written, and in fact ended up attracting downvotes. Nevertheless, there were obvious improvements to be made, so I wrote a partial review that suggested a better data structure and indicated a correct algorithm to use. The answer was accepted.
The code was acknowledged to be not working. However, the author clearly needed major hints to get close to a solution, which I provided. The author subsequently incorporated those remarks into his code.
In all three examples above, I was able to write a decent review despite the questions' rule violations. The answers were clearly helpful to the authors who posed the question. However, I'd like to ask:
- Is it harmful to this site to bend the asking-for-code-to-be-written and must-have-working-code rules? It might help the individuals, but allowing the poor examples could damage the quality of the site in the long term.
- Does code really have to work to be reviewed? Should we recognize sensible exceptions or nuances to the rules, or be more specific about what code deficiencies are tolerable in a question? For example, could reviewers agree to provide guidance rather than a complete solution if the question contains incomplete code?
- For questions that are marginal (not blatantly asking for strangers to do all the work), what is the appropriate action? Is closure too punitive and unhelpful? Should we just downvote instead? Flag the question for migration? (Would Stack Overflow or Programmers SE necessarily be better, though?)
I'll also point out that "working code" is somewhat subjective. A posted program could produce correct output, but it might be based on such an inefficient algorithm that we would advise discarding all the code — in which case, it doesn't really matter that the original code "worked", except to demonstrate that the poster had put some effort into solving the problem. The author could even suspect that a bug exists. If you wanted to game the system, you could just keep your mouth shut about known bugs when you post the code.
No doubt, the on-topic rules serve a very useful role in maintaining a threshold for the quality of the questions. I'd just like to re-evaluate how strictly they should be applied.