4

Do these questions belong on SO or Code Review? I would say Code Review, since it is for improving the code, but...

meme

thus I felt I should ask.

Stimulus: https://stackoverflow.com/questions/36221561/how-can-i-change-this-code-to-be-more-efficient

8
  • 7
    Questions that don't state how much faster it needs to be belong on the garbage pile. There's a world of difference between making it 1.5x faster vs 10x faster. The most common reason such an obvious goal is not stated is because they just don't know. So there is no actual problem to be solved. Commented Mar 25, 2016 at 14:23
  • 2
    Doesn't have to belong anywhere if it isn't a good question. There's no imperative to find everything ever posted a home. Commented Mar 25, 2016 at 14:24
  • 2
    Obligatory link to 3 questions to ask in SO comments. Note that they have quality standards just like we do, and that particular question is horrible. Commented Mar 25, 2016 at 14:24
  • 1
    The question that was linked to as Stimuli got deleted
    – Pimgd
    Commented Mar 25, 2016 at 14:32
  • Faster? No, I meant "use less power" Commented Mar 25, 2016 at 14:57
  • Use less power? No, who cares about that? I meant "use less memory" Commented Mar 25, 2016 at 14:59
  • 1
    No, I don't care about RAM, but it has to fit in 16k of flash. Commented Mar 25, 2016 at 15:00
  • Most of such questions are just noise. Commented Mar 25, 2016 at 15:01

4 Answers 4

7

I disagree with the general sentiment that these questions are appropriate for Stack Overflow. If they fall within the guidelines for codereview, they should be asked there. Generally, if I see these questions on Stack Overflow, I choose the following close reason:

Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Questions without a clear problem statement are not useful to other readers. See: How to create a Minimal, Complete, and Verifiable example.

That's really important enough for questions on Stack Overflow that the bolded part should be its own close reason.

Here's why I think those questions are off topic for Stack Overflow (but on topic for code review, their guidelines notwithstanding):

  1. These questions typically have a title that no one would ever search for with their issue. If we believe Stack Overflow is built to expand the sum total of programming knowledge, then a question that can't be found can't add to that knowledge. And that's not theory, that's a practical concern when the vast majority of our traffic comes from search.

  2. The questions also typically lack any programming terminology or algorithmic concepts that would help searchers to find them. This typically stems from the people asking them not understanding enough of what they're trying to do to actually ask a good question in the first place.

  3. Due to the two problems above, the answers typically are very localized to the specific question asked; and it's hard to generalize any answer for others without completely reworking the question and the answer.

These questions should be closed; and the asker should be pointed to code-review's guidelines. I'd love to migrate them to codereview, but the CR community typically takes a dim view of that.

4
  • Why did I post a full answer instead of just saying "ask them on CR?" because at some point someone is going to want to debate whether these questions are on topic for Stack Overflow in the first place; and I wanted to have a complete answer from the perspective of a moderator available to link to.
    – George Stocker Mod
    Commented Mar 25, 2016 at 14:42
  • 1
    The answer makes sense, but it requires careful reading. It's easy to slip up and think you would close questions like this even if the asker didn't want a general review.
    – Pimgd
    Commented Mar 25, 2016 at 14:52
  • Yes, redirect them all to /dev/null Commented Mar 25, 2016 at 15:02
  • "I'd love to migrate them to codereview, but the CR community typically takes a dim view of that." Yes, and we'll know it when you recommend us anyway. The amount of crap SO will sling our way when we open a migration path is staggering. There have been many meta asking for a path anyway. Find us in The 2nd Monitor if you're interested in discussing this further (or just saying hi), comments are not fit for such.
    – Mast
    Commented Mar 25, 2016 at 15:51
10

We at Code Review made this page on our Meta specifically for answering the question above, which has been asked many times:

A guide to Code Review for Stack Overflow users


See also:

5

It depends on what type of answer the asker is looking for - if the goal is to fix the performance issue, and any other improvements are noise, then Stack Overflow it is.

If the goal instead is to "improve my code" in general, then Code Review is a better fit - Stack Overflow is on topic as well, if you were to provide an actual question ("What's your problem with this piece of code?").

And of course, code dumps without explanation are off-topic on both.

1

A question, like the one that you provided, that just dumps a bunch of code and says, "make it more efficient" is going to be Too Broad on SO (as well as Unclear). It's possible that you could focus the question by adding more details, such as by narrowing the scope of the problematic code as much as possible, to the piece that is taking unacceptably long, explaining what it's doing that seems superfluous and/or inefficient, what other approaches were considered for how to solve the problem, and why they didn't work.

The problem would also need clear guidelines for what is "too slow" and what is "good enough". If you do all of that it's possible that the scope of the problem could b narrowed enough that you could conclusively state whether or not a given answer successfully answers the question, and ensuring that such an answer wouldn't need to be enormous.

You're more than welcome to ask on Code Review's meta, after looking through their help center, if such a question is acceptable, or what it would take to make such a question acceptable (since I assume it wouldn't make a good CR question for exactly the same reason it's not a good SO question, but I'm not a CR regular).

1
  • 1
    We generally try to simplify the major on-topic criteria down to three points: code works, not hypothetical and is complete. There are a few more on-topic requirements but they're a bit more specific
    – Quill
    Commented Mar 25, 2016 at 14:30

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