8

Generally, when I see a question that says "My code is slow, how can I make it faster?", I suggest that this should be asked on Code Review instead.

Here is a recent question: My code is taking too long at time of execution

My general rule is: If the code works and the user just wants an improvement, then it should be moved.

Is this the kind of logic we should be applying here? i.e. Should I keep suggesting the move? Or are we happy to let these questions stay on SO?

The reason I ask is I can see this question easily getting an answer here on SO (which it since has), because it's exactly the kind of thing users like to answer and they usually get a good bit of rep for decent answers. But should we be avoiding answering these and focusing on getting them moved? There is nothing stopping anyone answering the question post-move, so they can still do their bit (they just won't get SO rep for it)

3
  • "...when I see a question that says "My code is slow, how can I make it faster?", I suggest that this should be asked on Code Review instead..." Normally the first comment on CR is then "Did you profile it?". Migrating these questions would do nothing. "If the code works and the user just wants an improvement, then it should be moved." No, if the users wants a code review, then it should be moved, there's a difference. I also disagree with a migration path from SO to CR...there would be a lot of crap migrated. Sep 3, 2013 at 11:37
  • 1
    @M.NightDemonbobby: So what is your definition of a code review? If not some code that wants reviewing (in this case somebody to review and suggest improvements). What is the user asking in this case if not for a review?
    – musefan
    Sep 3, 2013 at 11:41
  • 3
    @musefan just asking "how can I make my code faster" is not a good question anywhere. Just like needing to do your own research and make an attempt on Stack Overflow, profiling fits into the idea of doing your research. If you know what specific part of the code is causing problems and don't know how to speed it up, that is one thing, but just asking "how do I make it faster" is not a good question. Sep 3, 2013 at 11:58

1 Answer 1

9

When Code Review graduates and becomes a permanent site in our network (and they're well on their way to reaching that goal), it's very likely that they'll become one of the available migration paths from Stack Overflow; in fact it's likely that the path will be mutual.

Yes, questions that contain only working code on the premise of "Is this the best way" or "How can this be faster" are generally a better fit on CR, but it's a subjective call at times. If the question has working code but is more about compiler level optimization then you have to be careful - it might just be a better fit for Stack Overflow.

You can flag as 'other' for now and indicate that the question probably belongs on CR until the path is established, but flag and move on. If the question was well received then it's definitely not the end of the world if it stays on SO (and might just belong there), and if not, it's likely to be put on hold and / or migrated anyway.

4
  • Shog9 wrote, a while back, "Be a bit jealous of your site – don’t blithely turn askers away simply because their question could be asked somewhere else. Don’t hit them over the head with your scope, help them tailor their question to fit into it – and if that means your site’s scope overlaps a bit with another site’s, so be it." Doesn't this contradict that (apart from half a sentence). Why are compiler level optimisation questions on-topic but not others? Sep 3, 2013 at 12:10
  • @benisuǝqbackwards You're reading a little too literally I think, what I meant was just because you see working code and a question about optimization doesn't automatically make it a good candidate for migration, I was using compiler optimization as a meta example, that's all :)
    – Tim Post
    Sep 3, 2013 at 12:19
  • Thanks @Tim; reading it that way around makes sense too! Sep 3, 2013 at 12:20
  • @benisuǝqbackwards Worth some clarification in the post I think, edited. Thanks! :)
    – Tim Post
    Sep 3, 2013 at 12:25

You must log in to answer this question.

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