9

I often see questions such as this:

Hey my code isn't working. It's supposed to do XY but I can't figure out why it doesn't work. Here is my code:

{ insert 300 lines of code here }

I'd like to help these kind of people with their problems, but it just isn't economical for answerers to sift through 300 lines of code to try to deduce the problem, and it doesn't teach the asker how to debug their code.

Thus, usually these questions go unanswered.

Is downvoting such a question appropriate? What about moderator flags to place the question "On Hold"?

What kind of comment is helpful in this situation to encourage the user to improve their question? I don't even know where to start in explaining to them why this is a terrible question.

5

3 Answers 3

9

There are a few approaches. I use a combination of these depending on the needs of the particular question:

  1. Downvote the question because it is lacks research effort and is not useful.

  2. Comment to explain the deficiency and ask for an improvement. Consider providing a link to the Stack Overflow question checklist or to SSCCE.org which contains information about creating short, self-contained, correct examples.

  3. If the question really as void of detail as you described, vote to close as off-topic:

    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.

  4. If you are feeling generous and can find the answer, go ahead and provide it and vote to close the question. In this way, the OP leaves with a good feeling about the site, but the extra clutter is removed.

5

If the OP is just throwing in 300 code lines in the hope somebody notices what is wrong with it, I would close it as off-topic. There is a closing reason that suits well for those questions.

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

You can flag the question, and choose "it doesn't belong here, or it is a duplicate…" and then "off-topic because...." That is if you cannot vote to close; otherwise you can vote to close the question for that reason.

0

Sometimes I feel like using aggressive rudeness. You want me to spend more time fixing your code than you have? WTF?

Then I relent a little and consider posting a sarcastic comment. Sure. Please send me payment. My hourly rate is £100, minimum payment is 1 hour.

Then I calm down and vote to close and down vote.

1
  • We all feel like this, but it's probably best to refrain from posting such comments even though they might go through your head. There is some benefit in being nice to new users, even if they can be frustrating. Jul 20, 2013 at 9:10

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