An unhelpful Help Center…
Questions asking for open-ended suggestions to improve working pieces of code appear to be unwelcome on Stack Overflow, and many such questions do get closed. However, it's not obvious why such questions would be against by the rules. Some excerpts from the Help Center:
Stack Overflow is for professional and enthusiast programmers, people who write code because they love it. We feel the best Stack Overflow questions have a bit of source code in them, but if your question generally covers…
- a specific programming problem, or
- a software algorithm, or
- software tools commonly used by programmers; and is
- a practical, answerable problem that is unique to software development
… then you’re in the right place to ask your question!
Some questions are still off-topic, even if they fit into one of the categories listed above:
- Questions seeking debugging help ("why isn't this code working?") must include…
- Questions about a problem that can no longer be reproduced or that was caused by a simple typographical error.…
- Questions asking for homework help must include a summary of the work you've done so far…
- Questions asking us to recommend … off-site resource…
- Questions about general computing hardware and software…
- Questions on professional server, networking, or related infrastructure administration…
That's a lot of specific prohibitions, yet there is no explicit prohibition against requests for open-ended critiques. The de facto prohibition appears to hinge entirely on one word in the page: specific. That's a Help Center page that isn't helpful. If this were code, the adjective I'd pick to describe it would be underhanded.
… leads to befuddled users.
Although there is no bullet item explicitly prohibiting code critique requests, many users believe that such questions are off-topic. Every few hours, somebody votes to close a question with this custom reason, or some variant of it:
I'm voting to close this question because it belongs to codereview.stackexchange.com.
By Stack Exchange network policy, a question being a better fit elsewhere is insufficient grounds for closing a question — it actually needs to be off-topic. And this commonly given reason fails to explain what Stack Overflow rule makes it off-topic, or what kinds of questions are actually appropriate for Code Review. The problem is, when the phrase "belongs on Code Review" gets tossed around with no explanation, users start parroting the meme any time they see a lot of code.
This confusion leads to a bad experience for all users involved, especially for the poor author of the question, who is barraged by downvotes, close votes, advice to re-post the question, advice to flag for migration, and rebuttal comments as other members squabble over the fate of the question.
And the original poster might not have even done anything wrong to deserve such treatment, since the Help Center didn't provide good guidance.
The "proper" procedure…
According to the current rules, the proper procedure for closing such questions is to use "Too broad" as the closure reason, and leave a free-form comment.
… is unintuitive.
I had to ask a moderator in chat to learn that procedure.
A question like "How do I get started with writing my first Android app?" is Too Broad. There is no reasonable good answer for that kind of question, because a thorough treatment could be a book.
But using the same reason to shut down a question like "How can I improve my solution to Project Euler Problem 7?" takes a stretch of the imagination. That kind of question, though non-specific, is entirely answerable. In fact, there is an entire site entirely dedicated to such questions, which proves that such questions are not, in fact, Too Broad.
Rather, Stack Overflow chooses to rule these non-specific questions as out-of-scope. In other words, non-specific code critique requests are not too broad — they are off-topic.
As an analogy, look at English Language and Usage. Do they say that proofreading requests are "Too Broad?" No, proofreading requests have their own explicit off-topic reason:
Proofreading questions are off-topic unless a specific source of concern in the text is clearly identified.
Isn't that what code critique requests are? Proofreading code? This is what users mean by the shorthand expression "It belongs on Code Review". The question is intuitively off-topic, but no canned off-topic reason exists, and "Too Broad" feels wrong, so this meme is the most succinct way to express that sentiment, even though comparative forum-shopping is not a valid closure justification under Stack Exchange rules.
Improvement is needed.
Stack Overflow users deserve a better mechanism for closing non-specific code critique requests: a standard response that helps close-voters communicate their judgement accurately, and that guides question askers to get the help they seek.
To be clear: I am not saying that the existence of the Code Review site should prompt Stack Overflow to carve out a niche from its scope. Rather, it appears that Stack Overflow has always intended to treat non-specific code critique requests as off-topic, but never provided a standard way to close such questions. The growth of Code Review has merely exacerbated and exposed the latent problem. How can we fix it?