47

There is a rather poorly formed question that probably should be closed. However, there is an answer that states:

Fix the programming bug.

Once you do baseline debugging the error will become clear. And this is a skill you rather pick up now - most of programming time is spent debugging.

Go through the code step by step with your debugger. Look at all the variables. Look at the input variables the moment the error appears. Fix them.

Am I in the right to say this isn't an answer?

It may well be a poor question, but "go off and debug" doesn't strike me as an answer to it. Of course, if we all did our own research there would be no need for SO at all.

Then the only answer that does attempt to deal with the question has been downvoted. Yet, that answer does seem to deal with the (poor) question. Okay, so it needs a sentence of explanation. TomTom left the following comment on it:

"It is copy/paste code without a single line of explanation. "Do not use your brain, do not understand the bug, just copy paste and do not think".

This strikes me as a little abusive and vindictive, that such a (seemingly) basic code problem has been asked in the first place. But he is a 40k user, so I thought I'd ask here...

11
  • 3
    It's not an "answer" but neither is the other one there. Tomtoms is closest to giving useful information, but would be better served as a comment with an accompanying close vote.
    – TZHX
    Feb 13, 2016 at 8:07
  • 3
  • 14
    This is what happens when bad questions are not closed quickly enough. A problem that's forever growing, we just don't have enough SO users around anymore by a factor of 2, give or take. That is not something that can be easily solved, only Zen is to accept that this just happens. We'll get rid of this one, not the next one. Feb 13, 2016 at 10:39
  • It could be taken as an answer to "how can i resolve this problem?" though that doesn't make a useful Q and A pair for anyone else. Feb 13, 2016 at 14:10
  • 2
    I flagged for mod attention under this: Both answers in this post should be deleted because neither of them provide an actual tangible and useful answer. One suggests to debug, which can be easily said through comments, and not to be posted as an answer. The other one gives a solution, but not an answer, it lacks explanation and its pure code dumped into a textbox. None of these submissions provide substantial content to be considered a useful answer for other users.
    – Just Do It
    Feb 13, 2016 at 15:42
  • 5
    The whole mess has now been deleted. Feb 13, 2016 at 16:07
  • 5
    if we all did our own research there would be no need for SO at all: You can post a Q&A pair when you research something and find that no single source explains it well. I've done this a couple times. I've only asked a couple questions I haven't answered myself. One was after finding a lot of confusing / bad php tutorials while trying to fix a script for someone. Many valuable SO contributors hardly ever ask questions. I don't understand the mindset of people that ask googleable or debug-my-code-for-me questions. Clearly lazy, but I literally can't imagine thinking that way myself. Feb 14, 2016 at 0:28
  • @PeterCordes Sometimes you just don't see the problem yourself (otherwise chances are you wouldn't have made it in the first place), but "given enough eyeballs all bugs are shallow". I think it really depends on how the question was asked and if proper research has been done in the first place. Feb 14, 2016 at 14:04
  • 3
    @no.human.being: yeah, I get the "getting stuck" while debugging problem. There are some good Qs, where the asker shows exactly where they're stuck in their debugging, instead of expecting readers to start from a bare uncommented code-dump. (very common in assembly questions, where many bad questions come from people who literally don't even know how to use a debugger, and say so when prompted.) Feb 14, 2016 at 14:15
  • @PeterCordes I understand. Feb 14, 2016 at 14:21
  • 1
    The question (and its answers) have been removed. IMHO this meta question would benefit from being able to see the referenced question. Could someone (who has still access to the question) perhaps provide an image, obfuscated if necessary? Feb 14, 2016 at 18:36

3 Answers 3

48

TomTom's advice is good — I agree with it wholeheartedly. More people need to learn to use a debugger, it would save the rest of us a whole lot of time. I don't really like that Stack Overflow has turned into a code-debugging service. I especially don't like it when it seems like the user on the other end has already disengaged their brain.

However, the "answer" that he posted is so broad and generic that it could literally be used to answer 90% of the questions on Stack Overflow. Putting aside the issue of whether that is a poor commentary on the quality of questions on Stack Overflow, it certainly sets a bad precedent. Taken to its logical conclusion, we could close all such questions as duplicates of a "How to debug my code?" canonical question. Tempting—but I can't in good conscience support that. "RTFM" is not an answer.*
*(unless you carefully link to the specific, applicable section of the manual and explain how it applies)

If we want to encourage high-quality questions, there are better ways to do it. Namely, closing and not answering the low-quality ones. And in the meantime, we have to keep up high standards for our answers, otherwise we've given in and Yahoo! Answers has won.

Not to pick on TomTom here. Jerry Joseph's post is not an answer, either. It looks a bit more like one upon first glance, but it doesn't actually answer the question, either. At least, it doesn't provide anyone with useful information. When I read the first sentence—"Use a While loop instead"—the first thing I think is, "Why should I do that?" Now, it just so happens that if I think about it for a second or two, I know why this works. But then, I wouldn't have asked this question. So the answer is not intended to help me, it's intended to help someone who doesn't know enough about arrays and indexing to solve their own problem. If we don't want code dumps masquerading as questions, we should keep the same standards for answers.

So my opinion is that neither of these are actually answers, albeit for different reasons.

You'll notice that I haven't answered the question myself. It seems pointless, because the answer is already there in the question:

Source array was not long enough. Check srcIndex and length, and the array's lower bounds.

10
  • It really doesn't help that its a poorly formed question. In the comment the OA states the other array is dynamically growing; which implies more is going on. Feb 13, 2016 at 8:41
  • 15
    No, bad questions never help anything. But bad questions don't justify bad answers. We have better ways of dealing with bad questions. Feb 13, 2016 at 8:58
  • 1
    I love those detailed "when we RTFM, we see that ..." answers that quote & link the key bits of manual.
    – SamB
    Feb 13, 2016 at 18:11
  • 1
    "So my opinion is that neither of these are actually answers, albeit for different reasons." TomTom's isn't an answer (NAA flag is appropriate). It is good advice, but it's not an answer. Jerry Joseph's answer is an answer, it's just not a good answer (NAA flag would be declined/disputed/whatever). Feb 13, 2016 at 18:11
  • 5
    @SamB: Yeah, those are good answers (provided we leave the RTFM acronym out :-) ). Feb 13, 2016 at 18:11
  • I could "close as duplicate" many "debug my code for me" questions with a good "how do I debug my code" question/answer, and my conscience would be clear. Why wouldn't yours? Feb 13, 2016 at 18:34
  • 2
    @Yakk because the next person that actually debugged his code and found a batch, follows the duplicate path and finds ta da a question that tells him how to do what he have already done. If someone needs to "debug their code", answering isn't the right option, and marking it as duplicate is saying "we've answered this before".
    – Braiam
    Feb 13, 2016 at 22:59
  • 4
    RTFM is a good comment though, and a good reason to downvote, and in my personal opinion it should also be a close vote reason.
    – GolezTrol
    Feb 13, 2016 at 23:52
  • @Yakk Because they don't answer the question. Too many levels of indirection. Every question about Win32 programming could be "answered" by an Amazon link to Petzold's classic book. Any question on C++ could be answered by a link to the standard or the ARM. Every question could conceivably be answered by doing some research or debugging, that doesn't make them bad questions. The point of this site is to share knowledge. Yes, it would be satisfying for really bad questions, but then again, wouldn't it be better to just close those questions for a more appropropriate reason? Feb 14, 2016 at 13:48
  • @cody but wouldn't that help less than telling them how to debug? That is useful knowedge. And it is the correct next step for the asker of (some) questions to do. I mean, we could add "asker needs to learn how to use debugger" close reason, but why is that any better for your conscience than doing it via another mechanism? Feb 14, 2016 at 22:56
-2

I think it is a perfectly reasonable answer if the question wasn't a bad one. There are many of us that spend a decent amount of time troubleshooting an issue before asking for help.

However there are many developers that when they run into an issue they run into StackOverflow or other similar forums asking for help... And of course it is urgent! Why do you think we have so many duplicate questions and some answers that start with "a quick Google search shows this to solve your problem..."

Being honest I've even seen scenarios where they almost demand an answer and even ping well known developers with a link to the question to get an answer right away.

It is like asking for free consulting, right now and getting someone to do the job for them.

So while I am not saying that we should not help each other, I firmly believe that we as developers get better when we struggle and are able to resolve our problems.

-2

Well of course it's an "answer" (or at least a "reply"), but it's not helpful. I don't know how the question was asked (it appears to be removed). However, if a question was really "bad", especially if it's so bad that I couldn't provide a reasonable answer, since the question ain't precise enough in the first place, I'd rather leave it unanswered than posting a "rude" answer telling the user to "stop annoying me and do your cr*p yourself". ;-)

I mean no one forced you to deal with that question in the first place, right? It's your own decision to which questions you navigate and if you spend time here answering them. No need to get aggressive towards a newcomer, especially if they're not familiar with how SO works yet. There are always reasons to deal with such situations in a polite way and often the best thing is to just step away and ignore the question, in case it annoys you.

2
  • 2
    Newcomers have every opportunity to get acquainted with how SO works before asking their "low quality" = crap/off-topic questions. Most, however, choose not to do so. Ignoring do-my-debugging-for-me questions is not the solution. Downvoting and closing helps somewhat, but it would be better if there was a waiting period during which questions from low-rep users could not be answered, but could be downvoted/closed. You are right, though, that there is generally no reason to be nasty about it.
    – dandan78
    Feb 14, 2016 at 14:12
  • Well I also have a particular question going on at SO (which so far has not been downvoted) which deals with a very particular problem (but could be helpful later on for users of the same library, since the problem is pretty generic). Sometimes you just can't do it yourself or don't see the solution yourself and it's especially annoying if it gets you stuck at some point. Say you could principally write code to solve a big problem X, but you get stuck at just one point (or a few points). What would you do? Give up entire project and say "I'm too dumb for this" or ask other developers for help? Feb 14, 2016 at 14:17

You must log in to answer this question.

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