11

I am kind of surprised by the number of questions in SO where the author could have found the answer him/herself by just printing the variables he/she is using.

Should such questions be accepted on SO? If not, what is the correct way to handle them?

10
  • 2
    I usually just comment something along the lines of "What do you get when you print x?" Commented Nov 12, 2015 at 20:37
  • 5
    "What does this code do?" - half a million results ...
    – Jongware
    Commented Nov 12, 2015 at 20:40
  • Do you have an example or two?
    – jscs
    Commented Nov 12, 2015 at 20:40
  • 3
    Typically, I leave a 'Debugger............DCV' comment and Down Close Vote. Commented Nov 12, 2015 at 20:43
  • @Jongware 226 results in title alone. :( Commented Nov 12, 2015 at 20:47
  • 7
    Trying to do more than DCV is nearly always a futile waste of time. Such posters don't want to do the hard work of debugging, or they can not because they just copied some gunge from some site or another student and are so clueless that they don't know how/where to insert a printf/cout/whatever. Commented Nov 12, 2015 at 20:53
  • 1
    For completeness, have one example: stackoverflow.com/questions/33680740/… Commented Nov 12, 2015 at 21:14
  • stackoverflow.com/questions/33681698/… Commented Nov 12, 2015 at 21:31
  • I agree this is really irritating, but fortunately most of the questions are of better quality :) Thanks for the comments.
    – stellasia
    Commented Nov 12, 2015 at 21:57
  • stackoverflow.com/questions/33682116/… Commented Nov 12, 2015 at 22:01

1 Answer 1

20

A lot of people like the old adage that "there's no such thing as a stupid question". I disagree. I think that a stupid question is one that wastes your own time, i.e., it would have taken you less effort to answer it yourself than to ask someone else. That's still a pretty low bar: the vast majority of questions, on Stack Overflow or anywhere, get over it easily. But I think it's a useful rule of thumb.

If someone has gone to the trouble of typing out and posting a question asking what some code does, without having run or inspected the code, that's probably a "stupid" question.

Such a question should often be downvoted. It will tend to generate either very terse answers that don't explain anything and won't help anyone else, or long debugging comment threads that also won't help anyone else.

Depending on what the code is doing, and how much of it there is, it may also be worth voting to close the question as "unclear" (what exactly do you not understand?) or "not reproducible" (this code is nonsense and explaining it is probably a waste of time).

Note, though: this still requires some care and discernment. I have sometimes seen questions that look like "I didn't bother to try this" which are actually about a subtle feature of a language or framework, where uninformed experimentation may not reveal the correct answer. (Some experimentation will still produce a better post, of course.) These are usually good questions, and are actually often the distillation of a debugging situation.

It's also the case that a poster may have run the code and inspected the output and not understand that. As long as it's clearly explained, such a question has the potential to become a good search target for people in similar situations. That's one that we want to keep.

2
  • 1
    To your second to last paragraph, that's still typically a question that merits closure, because it meets the criteria for the reasons you've listed, but it's one of the rarer cases that has real potential to be reopened, because adding the missing information actually leads to a quality question.
    – Servy
    Commented Nov 12, 2015 at 21:12
  • Thanks for the detailed answer. I thought that might be a specific way of dealing with these, but this might be because of my irritation ;) A comment + DV seems indeed more in the SO logic.
    – stellasia
    Commented Nov 12, 2015 at 21:55

You must log in to answer this question.

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