Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

I'm referring to Check if a spelled number is in a range in C++. It was featured in the most recent StackOverflow newsletter.

It is admittedly an interesting question with a very cool and elegant top-voted answer. Overall, this question doesn't really constitute too much of a sore spot for StackOverflow.

Nonetheless, this seems like one of those questions that, while a good question elsewhere, would normally be closed on StackOverflow. It has a request for an algorithm and lists a few examples of input/output, but that's it. It doesn't show any attempt to come up with a solution before posting, no hangups or problems encountered, no code, etc... It's a classic "here's what I need" question.

The reason I'm asking about it here (instead of just casting a close vote) is that I noticed that it was recently edited by a moderator. I'm assuming that if a moderator read the question and it was the kind of question that should be closed, it would just be closed right then. So I'm wondering if I have it wrong -- is there some quality in this post that makes it acceptable on StackOverflow that other questions with similar lack-of-prerequisites do not have?

share|improve this question
17 answers. I'm so glad I'm not on the C++ tags. – Aaron Bertrand Sep 26 '12 at 18:19
I guess it's one of those "this is quite fun" kind of deals where people forego on voting to close because they like the puzzle. It happens from time to time. – Bart Sep 26 '12 at 18:20
I see it's been closed as NARQ. Not convinced that applies. Maybe too localized. – Martin Smith Sep 26 '12 at 18:32
The question has been closed. These types of questions are appropriate on – Gilbert Le Blanc Sep 26 '12 at 18:33
@GilbertLeBlanc Checking with the Code Golf mods to see if they want it. If so, I'll migrate the landmine off of SO. – George Stocker Sep 26 '12 at 18:36
Aren't almost all questions along the lines of "here is what I have, give me something to fix it"? At least this one provided requirements and sample input/output, which is more than I can say for many other questions :) – Rachel Sep 26 '12 at 18:37
@Rachel we expect some sort of effort on the part of the OP; in problems like this, it means, "Show me the code you've tried." The OP doesn't have that here. – George Stocker Sep 26 '12 at 18:38
@Rachel "Here is what I have" is different from "This is what I want". – Bart Sep 26 '12 at 18:39
@Rachel - I was puzzling about that as well. I thought lack of research effort was a reason (indicated in the tooltip) for downvoting rather than an actual close reason except if the request was too broad/vague to be a real question or too localised to be of help to anyone else. – Martin Smith Sep 26 '12 at 18:39
"It doesn't show any attempt to come up with a solution before posting, no hangups or problems encountered, no code, etc... It's a classic "here's what I need" question." There are loads of questions like that. Should this be closed then? – Martin Smith Sep 26 '12 at 19:07
up vote 11 down vote accepted

It is admittedly an interesting question with a very cool and elegant top-voted answer. Overall, this question doesn't really constitute too much of a sore spot for StackOverflow.

Sounds like a good reason to keep it around to me. Let's check the FAQ:

We feel the best Stack Overflow questions have a bit of source code in them, but if your question generally covers …

  • a specific programming problem
  • a software algorithm
  • software tools commonly used by programmers
  • practical, answerable problems that are unique to the programming profession

… then you’re in the right place to ask your question!

Hmm, well, the first bullet in that list pretty much nails it. Ok, what about exceptions?

You should only ask practical, answerable questions based on actual problems that you face. Chatty, open-ended questions diminish the usefulness of our site and push other questions off the front page.

Your questions should be reasonably scoped. If you can imagine an entire book that answers your question, you’re asking too much.

No, doesn't fall into those traps either.

So... What's the problem then?

It doesn't show any attempt to come up with a solution before posting, no hangups or problems encountered, no code, etc... It's a classic "here's what I need" question.

Ah, right, the "What Have You Tried?" problem. Funny thing about that - there's no close reason that covers "hasn't just welboggin' googled it". However, there is

This question does not show any research effort; it is unclear or not useful

...but that's the advice for down-voting, not closing. The question in question currently has six down-votes and forty up-votes. It's clear, well-written, addresses a specific problem, and frankly I wouldn't even down-vote it.

But if you want to ding it, that'd be the way to go.

share|improve this answer
And this is not give-me-teh-codez how exactly? Or should those be simply downvoted as well and not closed? If so, fair enough, but then you might want to make that pretty clear to the community at large. – Bart Sep 26 '12 at 18:50
There is no "question asks for teh codez" close reason. In fact, many fine answers include code, and I've rarely seen this criticized (code only answers are another story, but even then I've rarely seen folks suggest that they should be banned. Note that many "plz send teh codez" questions have issues far beyond their ability to be answered with code - being ridiculously broad and/or not defining the problem being probably the most common; for these, there's "Not a Real Question". – Shog9 Sep 26 '12 at 18:53
Oh come on, you cannot deny that it's a pretty common practice for questions to get closed if they are an overt request for code with no effort being shown on behalf of the OP. Many questions have been brought up on Meta asking for a close reason specific to those questions, to which the answer has invariably been "use one of the existing ones. NARQ possibly". I'm not arguing about this particular question, but if what you say really is the case and should be the norm, then we have to be pretty clear about that from now on because it does not seem to be general practice. – Bart Sep 26 '12 at 18:56
BTW: I read that question as "please suggest an algorithm" rather than specifically asking for code. The top-voted answer doesn't even contain code... – Shog9 Sep 26 '12 at 18:56
Hmm, perhaps. The C++ tag trips it up for me in that respect though. (Which is also part of the title) – Bart Sep 26 '12 at 18:57
Although it is nominally acceptable to ask a language-agnostic question on SO, I suspect this isn't widely known; the question was originally tagged c c++, and while it has answers with code in those languages, it's possible the author requested this simply because he's familiar with them rather than leaving it open. – Shog9 Sep 26 '12 at 19:00
It has "C++" in the title too. But it's not really C++ specific. It's not a "show me the codez" question, strictly speaking. More of a "show me the algorithmz". Which makes it qualify for point #2 above in questions-to-ask as well, "a software algorithm". Anyway, I agree with Bart that it seems common practice to close questions like this, even though based on the FAQ there really doesn't seem to be any good reason to do so (barring any other common problems, of course). – Ben Lee Sep 26 '12 at 19:00
@Shog9 Hmm, perhaps we should edit it to be language agnostic then. Still, the whole issue is pretty slippery-slope. Especially with current closure behavior. Perhaps I'll ask a general question for clarification on this soon. Not sure if we'll settle on one decision or the other, but the situation at the moment does seem fairly fuzzy. I don't mind either way, but would prefer some clarity on it. – Bart Sep 26 '12 at 19:08
@Bart: The questions folks tend to be thinking of when they talk about "show me the codez" questions are... Just piss-poor questions. Even when the author does show their work, they're not very good: poorly written, extremely localized eyesores that no one wants to edit. The ranks of q-banned users are full of these. Not doing any research first is certainly part of the problem, but by focusing specifically on "show us the code you've written" as the response (or reason for closing) we end up hurting ourselves by ignoring the other (often more severe) problems. – Shog9 Sep 26 '12 at 19:10
code only answers are another story, but even then I've rarely seen folks suggest that they should be banned. Is there any benefit to allowing code-only answers while blocking code-only questions? – Yannis Sep 26 '12 at 19:12
@Shog9 Sure, there are gradations in that. And I won't robotically vote-to-close every such question. I still judge it on its merrits. But even in this case you have to admit that it doesn't go much beyond "this is what I want". And many of those get closed even if well formulated and potentially interesting. Perhaps we shouldn't do that then. My worry now simply is that we don't show consistent behavior. (Though admittedly that's difficult in a community as large as this one). – Bart Sep 26 '12 at 19:14
As a "question smell", lack of visible effort is great. As a stand-alone reason for closing, it makes no sense - particularly when you realize that asking a very specific question can itself indicate research (hey, cool, you've managed to narrow down your question from "How can I create a login system?" to "How should I interpret this response from an OpenID provider?"). Feel free to bring this up as a separate discussion though, @Bart. – Shog9 Sep 26 '12 at 19:21
Yeah, that's not at all controversial, @Yannis. Don't get me wrong, this has been discussed numerous times - but the response has usually been, "it depends". – Shog9 Sep 26 '12 at 19:25

Probably because life is not fair.

Yea, I'd close that question, but only because I hate fun.

Looking at it objectively, there's no good reason why it should be open.

And yet... it is.

Vote to close it if you feel it should be closed, but I'm not stepping on that particular landmine. Yet.

It looks like the question has been closed. I wouldn't be surprised if it were re-opened and closed a few times. This looks like one of those lightning rod questions.

share|improve this answer
"but I'm not stepping on that particular landmine." - What that supposed to mean? :P – Mysticial Sep 26 '12 at 18:26
It means that even I, the great close Nazi, have limits to my power. – George Stocker Sep 26 '12 at 18:28
"The Great Close Nazi"... almost sounds like a magic act. – Bart Sep 26 '12 at 18:30
Closed as NARQ, you skipped the landmine (this time ;) – Yannis Sep 26 '12 at 18:31
@Mysticial He doesn't have the limits, he just doesn't have the guts. I do, fortunately =) – casperOne Sep 26 '12 at 18:36
@casperOne hehe... :) I doubt anyone will complain if a mod casts the 4th or 5th vote. It's usually the unilateral closes that we bitch about. – Mysticial Sep 26 '12 at 18:38
And there I thought it was just a part of your master plan to remove all joy from the universe. – toniedzwiedz Sep 26 '12 at 18:52

You must log in to answer this question.

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