There are many questions that contains only some code and a remark like "it doesn't work."

https://stackoverflow.com/questions/5283635/php-and-mysql-update-problem is one example.

Judging by "extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet," I'd say that these questions are indeed too localized: nobody is interested in them but their OPs.

But of course for the "enthusiast Q&A site" paradigm, such questions are most welcome as they usually become a source of easy rep for the enthusiasts. This increases the number of ads shown.

Do such questions merit closure as "too localized" In fact, doesn't the "too localized" rule contradict the Q&A site paradigm? If so, maybe it would be reasonable to remove it as a close reason.


Update: Too Localized has been refined a bit, and is now the preferred choice for these. Note that the new description begins with, "This question is unlikely to ever help any future visitors" - this is a perfect fit for a question that requires readers and answerers to sift through a pile of code to figure out what the actual question amounts to. If it's possible to edit such a question to highlight the root problem in a way that can be found and used by others, good - but otherwise, close.

Of course, "Not a real question" is a pretty good fall-back for all sorts of quality issues. The expectation is that askers will describe a problem (scenario, desired behavior, observed behavior) and include relevant code (ideally sufficient to reproduce but no more), and this question fails - at very least - the first part of that. We don't know what the code is supposed to be doing, and have only the vaguest idea of what it is doing ("it says that it doese but I wont"). Of course, this is followed by a fairly large amount of code... Code that the asker almost certainly didn't write and obviously doesn't understand.

  • 3
    Plus, "It's difficult to tell what's being asked here." is as self-explanatory as it gets. – BoltClock's a Unicorn Mar 12 '11 at 16:39
  • @BoltClock, that text was replaced by "This question is unlikely to ever help any future visitors" a day or so ago. – Pops May 19 '11 at 22:14

I've seen two major subcategories of these questions. Questions in the first category are just a wall of code and "fix this plz" or "why doesnt this work." Questions in the second category are similar, but also include the particular error message that came up, or perhaps a stack trace.

In my opinion, the first type of question is worthless, as it will never help anyone other than the OP, and likely won't even help the OP very much, in the long term. All the answerers could have spent their time much more productively on better questions.

Response to the second type of question should be a bit more nuanced. If it's possible to reformulate the post into "what is a FooBarException and how do I fix it" form, then do that. Other people will eventually encounter FooBarExceptions and need to know what they mean and how to resolve them. If it can't be edited, treat it like the first type and downvote/vote to close.

I was listening to SE podcast #01 while writing this answer, and Joel started addressing this very issue just as I finished writing, saying

"The one problem here is that, compared to everything else that happens on Stack Overflow, you haven't left an artifact that makes the Internet better."

Then Jeff followed up with

"I have a good example of where this can be useful. If you have a specific error message... other people will encounter that error code at some point, they'll search for it, and they'll be like 'oh cool, here's how I fix this error code.'"

So I guess I was onto something!

I just noticed that Jeff weighed in on this a few weeks ago:

If it's about a specific error code that can be somewhat narrowed down, it's ok-ish.

If it's about "oops, I forgot to put a semi-colon at the end of a line", then I don't see any value in it, and it should be flagged for deletion.


Doesn't "too localized" rule contradict with Q&A site paradigm?

There are many things that can be learned by looking at someone else's problems. Some questions have a generic answer that apply in many places and can be useful to others. Some introduce a new concept. This is not always true, but I like to give the benifit of the doubt. I tend to only vote 'to localized' when a quesrion is very local. As in there is no way I could even try do answer without knowing a lot morw about your specific situation.


Doesn't "too localized" rule contradict with Q&A site paradigm?

Q&A doesn't necessarily mean that the community is here to answer any and all questions that someone might ask for their own benefit. The stipulation that a Question and accompanying Answer be beneficial for a range of people gets around this potential contradiction. A question is thus about a programming language, rather than about some specific piece of code.

  • In general you may be right, I don't know. Bot the only intention of this very particular Q&A site named stackoverflow is what you just have said: to answer any and all questions that someone might ask for their own benefit. – user145842 Mar 12 '11 at 17:12
  • That's really funny, but people even don't understand if you happen to ask them some discussion question, not a practical one. They continue to bring practical answers, lol. That's amazing show. – user145842 Mar 12 '11 at 17:14
  • @user145842: No it's not – Lightness Races in Orbit Jan 17 '13 at 3:01

Both "too localized" and "not a real question" have been replaced; both categories in which I would have applied to these sorts of questions.

With the new close categories, these types of questions fall firmly into the off-topic category, but the reason can differ between the two.

For instance, if a question is a straight vanilla, "My code is broken and I'm not sure why, could someone look at it?", then this close reason applies most appropriately:

Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist

If a question is a pure stack trace and lots of error logs, without any context, then this close reason applies most appropriately:

Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.

If it's kind of a combination of both (that is, a huge wall of code, stack traces, and little context to go off of), then asking for clarification is ideal. If it isn't provided, then this is an appropriate close category/reason:

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking.

I would say, though, in either case, first give the asker the benefit of the doubt. Ask for clarification if you believe the question is worth saving. Help them along by editing the question.


I've asked a question about "Why doesn't this work?" at How do I do YAML in JRuby in 1.9 with Syck?

The important thing is to try to make the question readable by minimizing the amount of code involved.


It appears that "too localized" no longer exists as a reason for closing.

I find it a bit troublesome, though, that there are so many of these "fix me" questions where the OP doesn't seem to have a clue about debugging. I don't see how anyone benefits (other than reputation points) by helping people write programs that they don't understand.

Put another way, these questions are effectively duplicates -- where the correct answer is:

"To understand what your program is doing, either use a debugger or insert print statements."

Once they have stepped through their code, if they still don't understand, perhaps they can post a question about why a particular line of code behaves the way that it does.

Of course if StackOverflow were limited to well-informed questions, the opportunities for gaining reputation would tend to be mostly limited to questions about new technologies.


  • I don't ever recall a time in which "insert print statements" was correct, unless the requirement was to print out some bit of information at this interstitial spot in the code. It's also not always entirely about debugging, either; it's tough to debug what one may not necessarily understand. – Makoto Sep 8 '13 at 8:01
  • @Makoto: "Insert print statements" is an effective method of debugging in some cases. The purpose of debugging, in my example, is to develop the understanding that the OP may be lacking. In the cases that I am thinking of, the OP would be better served by learning to debug simple programs rather than asking StackOverflow to do it for them. – nobar Sep 8 '13 at 8:26
  • @nobar in general, "Insert print statements" might be an effective method of debugging, but it doesn't mean it is a proper SO answer. I like Makoto's answer better on how to deal with these in the new close system – psubsee2003 Sep 8 '13 at 9:46

You must log in to answer this question.