Say you spent some time on a code answer to a SO question (example). Is it OK to forward the same code to Code Review or should any comments be left to happen in SO? If it's OK to ask for a review, should we have a protocol for linking the two questions?

Edit: I've forwarded some code here and here so we can better discuss a protocol and/or details in figuring out scope.


3 Answers 3


Yes, such questions should get moved over here.

My ideas for a protocol

  1. The code has to work. This site is not about fixing random bugs, it's about the design of the code and program. So he example linked in the OP should be migrated, since it's a design / scalability issue and not a plain bug. But it would be really bad if we move a question over here only to find that the code doesn't work and the question can't be answered because of random bugs popping up. So if there are obvious bugs in the implementation of an algorithm or the code fails with random segfaults, it should not get moved over here. Code should get fixed on SO and then be improved here on CR (as I said scalability is not considered a bug in this case).

  2. The code should be refactorable. Don't move question from SO over here that basically consist of a ton of ugly, unindented code, that's filled with bad practices. While yes, one could answer this with a ginourmous post about what's all wrong with the code, this doesn't fit the sites purpose. We want to give clear answers, not links to refactoring books or listing posts. Also, such a question would have a high potential for ranting and it would be probably more work for us, then for the OP. So these kind of questions should stay on SO/Programmers and get answered / closed there.

  3. The questioner should show (high?) interest in solving his problem. From my experience on SO, there's not much sense moving around questions where the questioner just posted his question and didn't respond to comments etc. Most of the time, such a question - if migrated - gets no attention at all. This is especially bad on this site, because we need the feedback from the author in order to write good answers and help him. This is not a rant against 1 rep users. I've seen people with 1 reputation writing excellent question and being very kind in regards of questions about their code. So we should look both at the account and the authors attitude. If he has low accept rate, that's a bad sign. If he writes no / hard to understand comments, that is another sign that we should probably leave the question on SO instead of moving it over here.


The question needs to be understandable, the code needs to have no bugs that would qualify it for SO and should be in a state where it can be actually refactored without doing a complete rewrite of a couple of thousand lines. Additionally, the questioner needs to be cooperative. He needs to show that he actually wants to work with us in order to clean up his code and we should be certain about him not desserting the question when it gets migrated to CR.

  • \$\begingroup\$ Move the whole question? I was talking about reviewing the answer (which meets the 'works, edited for clarity, etc.' benchmark), not the OP's code. But +1 for a nice set of requirements for moving questions. \$\endgroup\$
    – TryPyPy
    Commented Jan 20, 2011 at 14:27
  • 1
    \$\begingroup\$ I agree @TryPyPy, actually migrating a question would probably degrade SO as the question contributes to SO's value. A link or a repost saying "here's what we came up with, can we make it better?" is sufficient I think. \$\endgroup\$
    – LRE
    Commented Jan 21, 2011 at 3:57
  • 1
    \$\begingroup\$ Every time I read this answer, I like it more. I think this should be a FAQ point, a foundation to our bylaws and taught to newcomers. Totally stealing it though. \$\endgroup\$
    – TryPyPy
    Commented Jan 21, 2011 at 6:48

Popping the code over here for review helps the separation of concerns between the two sites, so yes I think it is OK.

I agree with @cbrulak's vote for a protocol - provided that protocol is clean and simple (maybe even just a comment to the effect of "go here for the original")


protocol needed.

I think a review could be added if you were looking for something specific.


You must log in to answer this question.

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