In the Help Center, under What topics can I ask about here?, one of the rules currently states:
However, if your question is not about a particular piece of code and instead is a generally applicable question about …
- Best practices in general (that is, it's okay to ask "Does this code follow common best practices?", but not "What is the best practice regarding X?")
then your question is off-topic for this site.
The analysis by @rolfl reminded me of a question that I had previously voted to close: Using a for-loop instead of sleeping? I nominated that question for closing not because I think though it was too short or that it was a poor question to ask, but rather because I considered it to violate the rule above. Considering that we have been closing similar questions before based on that rule, I thought it would be fairest to apply the rule consistently.
I still believe that if a rule exists, then there should be some consistency in enforcing it. However, after further analysis, I came to the conclusion that it was not a bad question, but rather a bad rule (or at least well intentioned but poorly phrased).
I'd like to clarify the rule to read:
However, if your question is not about a particular piece of code and instead is a generally applicable question about …
- Best practices in general (that is, it's okay to ask "Does this code follow common best practices?" or "Does this code follow the best practice regarding X?", but not "What is the best practice regarding X?")
then your question is off-topic for this site.
The key point of the rule is to express the mission of Code Review: we review code, and the question must be about your code.
In that light, perhaps the best-practices rule is redundant with the "Does my question contain code?" and "Is it actual code from a project rather than pseudo-code or example code?" tests, and should be deleted altogether. Eliminating the rule might also remove an unnecessary source of confusion and controversy.
What do you think? Should we revise or delete the best-practices rule? Can you think of any good examples of questions that support either position?
Background: This rule has been discussed and revised before.