You're on Stack Overflow and you've found a question that seems to be about improving code. You are trying to be helpful, and you put a comment in the question:

You should try asking on CodeReview.SE instead. —YourName 2 minutes ago

… and suddenly, out of nowhere CodeReview.SE users swoop in saying:

@YourName No, this isn't a good question for Code Review. —AnotherName 5 seconds ago

or they might say:

@YourName This could be a good question for Code Review, if (…) —AnotherName 5 seconds ago

Why are they saying that this isn't a good question, as it is, for Code Review? What is in scope on Code Review?

What should I look for when determining if a question should go on Code Review? And why do they sometimes seem to get so annoyed about the referral?

This question is Code Review's version of a similar question on Meta Programmers.SE.

share

1 Answer 1

What distinguishes Code Review from Stack Overflow?

Different communities have different rules to address different needs. A quick summary:

$$ \begin{array}{l|l} \textrm{Code Review} & \textrm{Stack Overflow} \\ \hline \textrm{Open-ended questions} & \textrm{Questions with a specific goal} \\ \textrm{Answers can suggest any improvement} & \textrm{Must answer the question} \\ \textrm{Code must already work} & \textrm{(No such requirement)} \\ \textrm{Prefers code in its "native habitat"} & \textrm{Prefers distilled examples} \\ \textrm{Code in question must be preserved verbatim} & \textrm{Readability edits allowed} \\ \end{array} $$

What are the most important considerations?

  • Before referring a Stack Overflow user to Code Review, consider: Is it really off-topic for Stack Overflow? Just because a question is said to have "working code" and seems to be on-topic on Code Review, doesn't mean that it is automatically off-topic for Stack Overflow. There are many questions that are on-topic on both sites. The Stack Overflow Help Center doesn't say that code reviews are explicitly off-topic there. Don't migrate for the sake of migration.
  • Before posting a question on Code Review, read How do I ask a good question?, which covers the common reasons for questions being poorly received on Code Review.

Some commonly referred inappropriate questions

Please, we don't want the following kinds of questions: they will attract downvotes or close votes on Code Review, leading to frustration for everyone involved.

Questions where the code does not work as intended, or it's unclear whether or not it works

The most common reason for questions to be closed as off-topic on Code Review is that the code simply does not do what it is meant to do. Code Review is not about fixing bugs, and it is not a place to go for help adding a new feature to your program.

Questions asking "Does this code work?" or "Is this correct?" should be tested before being posted here. You should believe that your code works before you ask for a Code Review. There is a difference between asking "Does this code work?" (off-topic) and "This code works, how can I do it better?" (on-topic)

Questions with stub code, example code or pseudocode

Code that contains placeholders such as // do something, Foo/Bar, or someMethod() cannot be meaningfully reviewed. Hypothetical example code is off-topic for Code Review.

Unlike Stack Overflow, we prefer to look at real, complete code instead of example code or code that has been stripped of context for generality.

Questions with no code at all

Without code embedded directly within the question, we just cannot do a Code Review. We review Code and not unimplemented concepts.

If it seems like a question would belong on Code Review if the OP included their actual code, it is extremely important to point out that they need to include the code in their question.

Questions with insufficient context

A question that does not describe properly what the code does, while not immediately off-topic, is very likely to collect down-votes. To help reviewers give you better answers, Code Review questions should include a description of what the code does. The more you tell us about what your code does and the purpose of it, the easier it will be for reviewers to help you.

So what questions do you want?

  • Finished, working code that does what it is meant to do
  • Ideally, an asker willing to receive feedback on any aspect of the code

On all cross-posted questions, please add comments with mutual links. This helps everyone save time when triaging and answering questions.

So, why so upset?

Good referrals are genuinely appreciated. However, an inappropriate referral causes grief for everyone involved:

  • The original asker, cross-posting the question on Code Review, becomes puzzled or unhappy about receiving close votes or downvotes.
  • The close votes or downvotes make the Code Review community look hostile, when we are just doing our duty to inform the poster that the question is unanswerable.
  • The original asker may become frustrated that Code Review answers are "missing the point of the question", because on Code Review all questions are considered to be open-ended.
  • Stack Overflow looks unhelpful for giving someone the runaround instead of answering the question.
  • As long as we receive a significant number of inappropriate referrals, we cannot consider making Code Review a standard migration target on Stack Overflow.

Code Review has a much smaller community than Stack Overflow. We get about 30-40 questions per day. Stack Overflow gets about 8k questions per day. Even if a small fraction of Stack Overflow questions ends up being inappropriate referrals, the effort required to undo the damage imposes a large burden on the Code Review community.

What you should not do

Please do not vote to close with a custom reason that "it belongs on Code Review". Nothing in the Stack Overflow rules justifies such a custom reason, and sloppy reasoning perpetuates inappropriate referrals. Instead, vote to close as too broad or primarily opinion-based.

We know that the GUI is misleading and we would like to do something about this. There are many occurrences of a Stack Overflow moderator saying the same thing.

So, what can you do?

  • Think about if it's a good question for Code Review.
  • Flag it for migration if it is. Help the mods out by explaining why you think it's off-topic for Stack Overflow and a good fit for Code Review.
  • If you find that it is off-topic for Stack Overflow vote to close as "primarily opinion-based" or "too broad"
  • If it's a really good question, ask in chat here for us to help it move along.
  • Avoid bouncing users from one site to another (and possibly having the question get closed on each).
  • Try answering good questions on this site to understand what we are looking for.
share
6  
I think that table would be easier to read as an ascii-based table. – Ethan Bierlein Jul 22 at 3:27

You must log in to answer this question.

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