7
\$\begingroup\$

From time to time questions with snippets of code crop up and the poster usually asks: "Why doesn't my code work".

Have a look at this recent question for an example of what I mean.

I have been voting to close such questions as too localized, but in most of the cases they don't get closed. I'm also kinda unsure about the value of these questions.

What's your take on this? Are these questions valuable to our site? Keep them or close them?

\$\endgroup\$
7
\$\begingroup\$

This is one of those things where I think mob rule has pretty much determined the answer to that.

It seems like the consensus from looking at voting patterns is that it's definitely on a case by case basis. It's pretty easy to tell from the question whether or not the person understands what they're doing. Fundamental misunderstandings and questions by people who don't understand how to code are generally voted down. Questions about API and specific functionality in some library (i.e. "here's what I'm trying to do but not getting the expected result") are usually acceptable.

That being said, I've always told people that they should vote what they think. If you think that question you posted is bad, vote it down and explain why. I wouldn't worry too much about what other people think.

\$\endgroup\$
  • 6
    \$\begingroup\$ OMG, they added mobs to Gamedev? Oh wait, you meant us peasants... :) \$\endgroup\$ – Cyclops Oct 13 '11 at 0:37
  • \$\begingroup\$ Sounds reasonable. I guess the voting system will take care of this. \$\endgroup\$ – bummzack Oct 13 '11 at 11:48
5
\$\begingroup\$

If the question is reasonably well put together and contains enough information to answer, I'd answer it. The more a question is about the usage of a particular API, versus "help me debug this snippet," the better -- but I'd still answer the latter.

However (and especially for "debug this for me" questions), if the question lacks sufficient information, or if it contains too much information, I won't.

If the only thing I can do is speculate as to what might be wrong based on assumptions I can make about the missing pieces of code or the problem description, I might put those in comments. But I believe a good answer contains relatively little speculation, so if that's all I can do, the question isn't answerable until edited. In those cases, I'd downvote and comment or vote to close (or perhaps both).

\$\endgroup\$
3
\$\begingroup\$

I have a hard time categorically saying to close these because often - say 30% of the time - it ends up being a common problem someone else will have later. For example, if you follow Python Stack Overflow questions, confusion about list.sort sorting in-place rather than returning a new list is common.

Answering this is valuable first because you can create a canonical answer explaining the problem and hopefully redirect future askers to it (close as dup is usually easier to find agreement on than close as too localized), and second because it does create a resource that stops people from asking, if they are the people that actually read the suggested questions when asking, or search rather than immediately ask.

Unfortunately you often don't know whether it's a good or bad question until you put the work into answering it anyway.

\$\endgroup\$
2
\$\begingroup\$

I believe that there's a "natural control" of this kind of questions. Usually they will get less attention than other questions precisely because they are "too localized", and less people will take the time to look into it (it's boring to look for errors in other's people code).

On the other hand, some people might enjoy helping out, and in the future other people goggling for the same error might find the solution in this site.

And by "natural control" I meant that when posting this kind of question you will have less attention than other more interesting questions. And, probably, that's what you deserve.

\$\endgroup\$

You must log in to answer this question.

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