60

More often than never (that would be around several times a day, and about half the questions asked under the tag), questions can be answered using basic debugging.

Reading the stacktrace, following the breadcrumb to the line of error, identifying the culprit, all this I feel any professional and enthusiast programmers should know or be in the process of learning.

On Android in particular, using ADT, you only have to double-click on the first red line that contains the name of your package to see where it went wrong.

However, I am not going to write a complete debugging guide for each of those questions (not to mention that it does not actually answers the question), and I feel that Eric Lippert's How to debug small programs mentioned in the help is not specific enough and is too generic for most.

So basically I don't know what to do.

5
  • 3
    In this situation (very frequent under the iOS tag as well), I always feel the urge to reply (or comment): "Was heißt Denken?" But somehow I never do...
    – matt
    Commented May 9, 2014 at 2:16
  • It's not just in the android tag. It's in a lot of tags - I see it a lot in ruby too and always want to comment 'did you actually READ the error!?' Commented May 9, 2014 at 6:19
  • 17
    Forget reading the error, half the time they can't be bothered to copy and paste it into a freaking search engine. Or click on any of the various duplicate questions that always pop up...
    – Charles
    Commented May 9, 2014 at 7:17
  • 11
    Heh , under "c" tag yesterday was a problem where the guy even posted the compiler message saying "requires ; before if" but didn't seem to connect that message with the required remedy.
    – M.M
    Commented May 11, 2014 at 22:19
  • See also meta.stackexchange.com/questions/215406/…
    – Raedwald
    Commented May 13, 2014 at 23:22

4 Answers 4

53

We expect askers at Stack Overflow to have some basic troubleshooting skills, and to have used those skills to narrow down the problem to a specific part of the code. If the OP hasn't provided that specificity (in essence, they've posted a "what's wrong with my code, it doesn't work" question), close it as "Insufficient information to diagnose problem."

Stack Overflow is not a debugging service. If the OP hasn't performed some basic troubleshooting themself, and cannot tell you

  • What the problem is ("it doesn't work" is not a problem statement)
  • What the error message is
  • Which line of code is causing the error message, and
  • How the program is supposed to work

Then you don't have enough information to solve the problem. If you can spot the error just by looking at the code, then you're certainly welcome to answer the question, but you can't be expected to reproduce the OP's entire environment just to debug their code for them.

Further Reading
Are there legitimate “fix my code” questions?
Write Canonical Posts, and close commonly-Googled questions as dupes

42
  • 19
    So why did we get rid of the "minimal understanding" close reason? This sounds like a perfect example.
    – gunr2171
    Commented May 8, 2014 at 21:01
  • 2
    Because it was being widely abused to mean "minimal effort," which is not quite the same thing.
    – Robert Harvey Mod
    Commented May 8, 2014 at 21:02
  • 53
    They are weasel-words. Everybody knows what the problem is, the OP needs to learn how to use a debugger. No additional information is required. If you insist we need to distinguish between "minimal understanding" and "minimal effort" then we need an extra bullet in the dialog, not weasel-words. Commented May 8, 2014 at 23:31
  • 11
    Those are not weasel-words. They are rude words, can't say them either. Although I'd guess that's exactly what the OP muttered under his breath when he saw the question. The means for reasonable communication were made unavailable, you can't simply state something as obvious as "I don't think this question belongs here, the answer is widely available". A big reason why we get so many of them lately. Can't get there until we stop having to resort to using weasel and rude words. Commented May 9, 2014 at 1:21
  • 3
    This clearly falls under the minimum understanding close reason. Even with the abuse is it more desirable to have the new feed polluted with low quality questions? Commented May 9, 2014 at 2:02
  • 5
    @HansPassant The thing is that in real life there are a lot of additional bullets that could be included in the Close dialog (and I wish they were). I've already said elsewhere what they are. Things like "Expects us to write your code for you." "Too lazy." "What is Google? Howzabout using it?" "Too gormless. Don't just sit there: try something!" "Too ignorant: not ready for Stack Overflow. Do some basic learning, then come back."
    – matt
    Commented May 9, 2014 at 2:21
  • 11
    I've occasionally closed questions with the exact wording expressed in this question: "This question is off-topic because it can be solved with basic debugging." But I also get annoyed typing that all the time, and just close answers with "Insufficient information to diagnose problem." I agree with Hans' sentiment that we really do know what the problem is, we just don't feel like dealing with yet another first-time programmer who's too lazy to learn how to debug. What happened to the “You're Just Lazy” close vote reason? Commented May 9, 2014 at 5:18
  • 10
    The thing is, if code for reproducing the problem is posted, of course there is enough information to diagnose the problem. It feels like removing the "minimal understanding" close reason is just forcing us to abuse the other reasons. A question that would have had 5x minimal understanding votes before, now gets 2x lacks info, 2x too broad, 1x unclear.
    – OGHaza
    Commented May 9, 2014 at 8:40
  • 2
    @ChrisStratton: Then offer a viable alternative. Something other than doing nothing at all.
    – Robert Harvey Mod
    Commented May 9, 2014 at 15:27
  • 3
    @ChrisStratton: This is the kind of question I'm talking about. There's no waiting on questions like that. They just need to be closed. Next? There are hundreds of questions asked like that on Stack Overflow, every day.
    – Robert Harvey Mod
    Commented May 9, 2014 at 15:42
  • 4
    @ChrisStratton: The likelihood of that question being rehabilitated is close to zero. That's not our fault; it is the fault of the asker. The same problem that plagues such questions also prevents their rehabilitation: lazyness.
    – Robert Harvey Mod
    Commented May 9, 2014 at 15:46
  • 5
    @ChrisStratton: I know you're not going to understand this, but there are an infinite number of possible questions that can be asked by an infinite number of monkeys, so we have to reserve our limited and precious free time for those folks who deserve it, meaning those folks who will take the time and effort to help us help them. The only way we can do that is by reducing the noise. See also catb.org/esr/faqs/smart-questions.html
    – Robert Harvey Mod
    Commented May 9, 2014 at 15:48
  • 3
    @ChrisStratton: How does one find those questions in the sea of noise that is the front page of Stack Overflow?
    – Robert Harvey Mod
    Commented May 9, 2014 at 16:02
  • 3
    @ChrisStratton: You mean like the PHP tag? Or the Android one? Tags that are flooded with newbie questions from folks lacking basic knowledge?
    – Robert Harvey Mod
    Commented May 9, 2014 at 16:04
  • 5
    I actually agree with @Chris here - closing is entirely the wrong tool for the job, regardless of whether the goal is helping people improve or reducing noise: it's just too damn labor intensive for everyone involved. We've made it as friendly as possible, and gotten a nice little bump in improvement from the tiny handful of folks who actually care about learning - but statistically, you have to assume that if you're closing a question, it's gonna stay that way and probably get deleted.
    – Shog9
    Commented May 9, 2014 at 16:48
18

Consider taking a page from the PHP folks' book here: create a few canonical posts for commonly-googled errors and then dup-close everything that fails to read them.

Plenty of folks will still ask them anyway, but the more you reference them the easier they'll get to find for anyone who isn't perversely dedicated to not searching.

3
  • 3
    The Java NullPointerException question comes to mind here as well. Commented May 9, 2014 at 15:03
  • @JonathonReinhart like this post?
    – assylias
    Commented May 12, 2014 at 11:26
  • @assylias Yeah, that post exactly. Commented May 12, 2014 at 14:23
16

Leave the question open and downvote. There is no "not enough effort to solve the problem yourself" close reason and that's how the community team likes it.

further reading

7
  • 8
    This is the non-weasely answer, it is accurate. It is going to be unpopular. Commented May 9, 2014 at 2:31
  • 1
    Yep, "This question does not show any research effort" is what the down arrow says. Why waste community time pointing to answers via the duplicates close reason, which rewards the asker by providing an answer via the link.
    – A. Webb
    Commented May 9, 2014 at 3:02
  • @A.Webb Why? Because until they are deleted, they show up in Google searches and the link to the duplicate will help others. Commented May 9, 2014 at 4:57
  • +1 This answer certainly seems to be the official stance (despite Rob's opinion above differing), but I'd probably be abusing one of the other close reasons myself (exactly what removing the "minimal understanding" close reason was supposed to avoid....).
    – OGHaza
    Commented May 9, 2014 at 8:36
  • 6
    Plus, as a bonus, if we don't close them, rep whores will answer them. This helps SE's goal of building the world's biggest archive of duplicate (and often wrong) answers to the same questions over and over spread out over many different ad-revenue-generating pages, make making the site stickier because a user will have to go through many pages to solve their problem. Everyone wins!
    – Wooble
    Commented May 9, 2014 at 10:14
  • @MatthewLundberg Follow the further reading link in this post. I agree with Shog9 there. You must also realize all negative statements are tinged with irony; we wish the problems were solvable in other ways.
    – A. Webb
    Commented May 9, 2014 at 12:35
  • 3
    It's not much of a strategy to build a bigger web site. After years of experiencing geometric growth, SO stopped growing in the fall of last year. You can't draw more visitors when you web pages are filled with uninteresting crap. A quarter of a million questions per month doesn't make much of a dent when you try to get past the 40 million mark. Commented May 9, 2014 at 14:10
5

I have noticed a lot of these questions under the PHP tag. I normally downvote the question and ask the people to do some basic debugging. Depending on the response I choose to remove my downvote or further vote to close the question as a duplicate of ... (or as a problem that can no longer be reproduced).

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