16

This thread: Debug this code for me questions suggests to close as "too localized", but that is not available any more. So, what to do with users posting one question after another about the same piece of code, with different elementary mistakes, or about those dumping code and asking to find an error? I can't find an appropriate closing reason, but keeping these questions on SO seems like a waste of space as they will never be helpful to anyone else ever again.

The current relevant closing reasons:


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

Doesn't apply because error is a very specific problem (in fact, it's too specific) and the code is certainly presented.


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.

They don't ask for code. Everything after that is irrelevant. (In addition, "minimal understanding" is most likely present, since the person was able to write the code, and it sounds offensive)


Other (add a comment explaining what is wrong)

Yes, that could always be used, but I feel like it should be used rarely, because if the reason is not listed in standard closing reasons, most likely it shouldn't be closed. Again, what would I write here? "too localized"? "obsolete"? Both of these were rejected previously and so I suppose are not valid reasons to close. Even if there is some message people can come up with, let's add it to the list, it should be standardized.

  • 5
    I run into this problem all the time, too. There is a Meta discussion somewhere about why "Too localized" had to go and which close reason(s) we should use instead, but it's so complicated, I couldn't tell you what its outcome was. "Too localized" really needs to come back. – Pëkka Nov 18 '13 at 22:46
  • 3
    demonstrate a minimal understanding of the problem being solved i guess – user221081 Nov 18 '13 at 22:47
  • 1
    @mehow yeah, but that doesn't really feel fitting if it's someone competent who just overlooked a syntax error, or used a mySQL reserved word as a column name... – Pëkka Nov 18 '13 at 22:48
  • Yes, I saw the thread about it but it never got a conclusive response. meta.stackexchange.com/questions/185102/… – sashkello Nov 18 '13 at 22:49
  • @mehow This is what I did often use, and it does apply sometimes. But not always. It sounds offensive and doesn't really apply if a user has posted some complex piece of code, but had a variable typed with capital letter or something like that. Such questions are not really bad, everyone makes mistakes, but they still shouldn't be kept on SO. – sashkello Nov 18 '13 at 22:53
  • For things like simple typos, I write in a custom close reason. – Joshua Taylor Nov 18 '13 at 22:56
  • @JoshuaTaylor Which is "too localized" I guess? :) – sashkello Nov 18 '13 at 22:56
  • It also feels like such questions should be handled in some standardized way rather than writing custom message every time. – sashkello Nov 18 '13 at 22:57
  • 4
    @sashkello Sometimes I include the phrase "too localized". I usually try to make the point that there's not anything in the question that would be particularly helpful to future users (since the question doesn't ask about the typo), and people with a typo wouldn't be able to find the question. I agree that it'd be nice if there were a standard reason for this. – Joshua Taylor Nov 18 '13 at 22:58
  • I often use the "describe the specific problem" reason - it often makes enough sense for the given question. – Dukeling Nov 18 '13 at 23:13
  • @Dukeling Well, an error is quite a specific problem, I don't think it applies here. I think it should be used when poster says "How to build a forum" or something along the lines, or doesn't show the code. – sashkello Nov 18 '13 at 23:15
  • 1
    It would be nice to indicate that accepted questions are those which are likely to be of value to others -- not only indication as a reason for voting to close, but somehow put this in front of new question askers. I see many questions which are valid for the poster but just not a good fit, and I think it's common for people to post these questions without bothering to read the FAQ/site expectations, etc. – mah Nov 19 '13 at 17:06
4

Some say the "minimal understanding" reason applies here; if so, we need to change the wording. New users can't be expected to know that "asking for code" doesn't necessarily mean asking for code (or that it has a very counter-intuitive definition - reasons should be clear, given that there's plenty of Meta discussion around this, it clearly isn't). I suggested just removing "asking for code", but that didn't go over too well (perhaps someone else has a better suggestion a suggestion the community will like more?).

I'm inclined to think we should actually use the "describe the specific problem" reason, as this already includes a link to SSCCE.org, which is often (but not always) where we want to point users asking these types of questions (the "short" part often covers what we want to say).

As an initial draft, change it from:

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.

to:

Questions concerning problems with code you've written must describe the specific problem — and include a short, valid, complete program that reproduces it — in the question itself. See SSCCE.org for guidance.

(bold is just to indicate the change, not what should be made bold in the final product).

2

Perhaps the phrasing Questions asking for code must demonstrate a minimal understanding of the problem being solved. should be changed a little to also include the fact that minimal knowledge of programming itself should be known and that SE is not a programming tutorial website, there are better resources for that.

1

I see a lot of questions where I wonder why the poster didn't bother to start a debugger (Here is the latest example: I am trying to program finite state machine in assembly language but i am stuck). Because if he had, then he would have found the issue in no time. I mean, if somebody is able to write a piece of assembly code, then he should see some type of error immediately when observing it in the debugger.

While some problems can indeed be easily overlooked by a beginner, many questions are not of this type. Maybe we should have a kind of additional review type "Homework/debugging" and a question can be flagged as such.

Another problem with this kind of questions is, that google is polluted a lot by SO. So when I try to find a solution to some problem, most of the time some irrelevant piece of beginner questions crops up, making it hard to find usefull information via google.

  • Homework and debugging questions are not off topic, if they are otherwise good. – Raedwald Dec 14 '13 at 11:20
  • And what benefit is it fo SO if the only answer is something that can easily be debugged, being something that is of no relevance to anybody else? AFAIK SO should answer questions that are of interest to many people, and not just for single persons unable to properly debug their own code. As I understood it, SO does not want to be a beginners tutorial or debugging site. – Devolus Dec 14 '13 at 11:23
  • Too be clear, almost all debugging and homework questions I see are off topic. – Raedwald Dec 14 '13 at 11:25
-2

If they're asking you to debug their code, and you are going to close the question, then it's logical you're going to choose:

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.

Otherwise, why would you feel it's necessary to close their question?

  • 4
    "it's logical" - really? It's not at all logical for me (and I'm a logical thinker). I don't see how "find the problem with my code" = "give me code", and the code given can classify as the "attempted solution", giving the error can be "why they didn't work" and the expected results can also be there. The only words that really make sense here is "demonstrate a minimal understanding", which, when surrounded by those other not-so-applicable words, doesn't make all that much sense. – Dukeling Nov 22 '13 at 21:34
  • That the poster has posted his code, shows that he has "a minimal understanding". The problem here is that many seem to be unwilling or unable to use the appropriate tools, and they will not understand this by telling them that they have to have "a minimal understand" because from their point of view, they have. – Devolus Dec 7 '13 at 12:30

You must log in to answer this question.

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