2

I voted to close this question as off-topic because it has working code and is looking for an way to improve it.

It turns out that the code that works only covers part of their solution and will require code duplication to make it work in whole. Based on the answer to part 1 of this question:

If you have a question about a piece of code that meets all of these criteria:

  1. You wrote it or you contributed to it
  2. It currently works as intended
  3. You're looking for improvements to it (e.g. optimization, refactoring, patterns, security, etc)

It's probably better on Code Review than on Stack Overflow.

Technically I see this question meeting all of the criteria (or at least it would if it was written completely). Is it still off topic?

2
  • 4
    Definitely part N, never use literals in your code, dummy
    – Ben Brocka
    Apr 8, 2012 at 1:52
  • @BenBrocka - Of course. How could I be so careless?
    – M.Babcock
    Apr 8, 2012 at 1:54

1 Answer 1

1

It's pretty subjective, I'd say.

There's a clear distinction between improving code that works (but doesn't do some little thing), as opposed to code that doesn't work at all. However, that doesn't mean that all code that is seeking improvement automatically belongs on Code Review.

My feeling - it's best to flag the question, and if someone feels that it belongs on Code Review, then so be it. If it's too subjective to call, I'd let it be, and if I could, help the person out.

2
  • I agree that it should be flagged (I've done that) but I'm really curious about the guidelines that should be met before a question is voted for close and flagged. Is there a set of rules to dictate when a post should be voted closed as off topic for cr, or do I have to leave it up to a moderator?
    – M.Babcock
    Apr 8, 2012 at 3:33
  • 1
    @M.Babcock Similarly to how there is a set of rules to dictate when a post should be migrated to Programmers, but still we reject more than 1/3 of the questions that come from Stack Overflow? ;P (and about half of the survivors aren't really of exceptional quality...)
    – yannis
    Apr 8, 2012 at 3:42

You must log in to answer this question.

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