3
$\begingroup$

We get maybe one question a week which is of the form "please debug my code". These questions are on-topic on Stack Overflow (assuming they fulfil the MCVE rule and describe what is wrong), but maybe they'll benefit from more specialised eyes here. Sometimes with graphics programming, an expert can look at the image and immediately see what might be wrong with the renderer that produced it. That said, often the answer to these questions is just that the questioner needs to debug in the usual ways: by stepping the code with an interactive debugger, by printing out some key variable, by changing one thing at a time, etc. The on-topic help page as it stands includes the following:

Questions about a specific graphics programming or debugging problem,

We have a tag, but as discussed previously, it's mainly intended for questions about debugging, rather than for questions containing debugging. As SO has found, while some debugging questions have lasting value, many of them don't, and take a lot of effort to make answerable. Too many "debug my code" questions may drive away the expert users we need to attract to grow the site.

What should we do about these questions? Here are some overlapping possibilities:

  • Try to answer them all, and make it clear they are on-topic
  • Have the same MCVE rules as SO
  • Have a canonical question "How do I debug my graphics program?" with general debugging advice, and close specific debugging questions as duplicates of that one
  • Say debugging-related questions are only on-topic if they can be answered without needing to see the code - i.e. if they're not asking us to debug a specific problem
  • Have a more complex rule about which debugging questions are allowed - note that the questioner needs to know whether their question fits the rule even if they don't understand the bug
$\endgroup$
3
$\begingroup$

I like the idea of a canonical question. It would be definitely useful, as all of us sooner or later will face a complete black screen and need to learn how to debug it, and often the steps are the same.

There are many other situations that are very typical and can get an answer that will be useful to future visitors. For example the shadow acne artifact that was asked about recently. Any question that would make people think "I've seen this before!" probably falls into that category.

For more specific debug questions, especially the "I want to do X but it doesn't work, here is my code" kind, we can (and should) close as "Off topic/Debug my code". Those questions take a lot of work to answer, have little value for future visitors, and tend to make the community look inactive while they stay unanswered.

$\endgroup$
3
$\begingroup$

I would add that in many cases the OP should be required to show an image of the problem if the error isn't sufficiently or easily explained (not for compile or runtime errors, but rather for graphical artifacts). There have been a few questions where the OP shares code and states that there's a problem, but the problem is either ambiguous or the code is difficult to run even if it's just a small self-contained snippet. I would guess that most people don't actually run the provided code, but just look at it and see if they can spot errors. The questions with provided images seem to have much higher response rates.

$\endgroup$

You must log in to answer this question.

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