8

Users in SO have two contradicting points towards this question, I've seen something like this:

This is not debug.stackexchange.com

and something like this:

We will be happy to debug your code but we will never write a code for you!

I know that SO wants the users to post their try at first to help them, but does that mean that these questions are acceptable?

2
  • 5
    I'm not sure if we are happy to debug but more often than not in such cases we are asked to while(OP!=happy) { fix(); run(); debug(); }
    – rene
    Jan 11, 2014 at 14:12
  • @gnat the two questions are sonehow related but I'm talking about a specific problem here. I'm asking if this type of questions is allowed.
    – Mohammad
    Jan 11, 2014 at 14:41

2 Answers 2

7

It depends, but it is great help to look at the (new!) close message here:

This question was caused by a problem that can't be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was solved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting the shortest program necessary to reproduce the problem before posting.

(emph. mine). Implying that that it's not ontopic to be asking about simple errors like that. Simple of course being not very objective.

Another emphasis could be on "help future readers". If you made a random bug, it's hardly an interesting question anymore after you've added the ;. But if you make a mistake that sounds logical for some (e.g. a lot of people do it) and only after explanation one understands that this is not the right way, it might be helpful to answer.

(and some extra attention to the comment @rene posted: watch out for the trap of fixing a bug, and then getting into a comment spree/edit spree where the OP goes "but now it does this on the next line" ad infinitum)

7

The amount of effort I will put in to an answer is directly proportional (usually) to the amount of effort the OP has put in to their post. Sometimes, people have not even bothered to compile their code before they have posted a question about it. Sometimes a few seconds in the debugger will have told them the answer immediately (NullReferenceException anyone?).

That said, sometimes people have tried debugging themselves, but to no avail. Perhaps they've even included images of stack traces/quickwatch etc. And are scratching their head. I am more than happy to help here as effort has been put in to it - and if I can get a workable example going, I will debug it. Usually the answer is pretty simple, the OP missed something - or sometimes it is more esoteric.

So, the effort I will expend is directly related to the effort of the original post.

1
  • 1
    +1 I feel like the quality of questions would improve if question askers also used that rule of thumb. Jan 11, 2014 at 17:39

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