I've been "watching over" RSpec questions for a while now, answering many of them in my effort to learn more about RSpec and get to 10k. Now that I've reached the last goal, I'm cutting down time on SO, but would still like to stay involved with RSpec questions.

As part of that and with less interest in rep farming/whoring, I thought I'd focus on questions that have been around a while and didn't have an answer. I encountered Getting Nil Value in function that I am running an RSpec test on...?, which was self-resolved with some apparent help from a comment, but in such a way that there's nothing easy to post as an answer.

I'm resisting the temptation to analyze/debug the wall of code, which I assume would be relatively straightforward, although time consuming. I know I could ask the OP to withdraw it or answer it himself, but I'm curious about what the right close category is for a self-resolved question that provides a block of code, describes the expected output and effectively asks others to find the logic error with no reason to believe there is any issue with library behavior, etc.

It's obviously not a duplicate, it's not too broad, it's not unclear and it's not opinion based.

And given the recent replacement of the previous "minimal level of understanding" off-topic category, which I could have imagined shoe-horning this into on the grounds that people should generally debug their own code, I'm at a loss in terms of what standard category applies, if any.

Or maybe these questions are perfectly ok and I'm just off base. If someone just presents some arbitrary code and asks us to find the bug, is that acceptable? Is it acceptable if and only if the code is relatively short? If so, how short is "short enough"?

Update: I guess there are really two questions here which I probably should have separated. The first concerns essentially self-contained, wall-of-code questions where the OP is essentially asking us to find the bug. The second is what to do with self-resolved questions where the OP basically says in a comment "never mind, I figured it out" and the answer is neither obvious nor likely to be useful to anyone else. Further, after subsequently spending only a minute or two looking at the referenced question's code, I was able to find the defect, so it's not the best example in terms of degree-of-difficulty.


Use the new custom close reason:

"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."

Questions that the OP has solved himself, without enough explanation for others to reproduce... well, they can't be reproduced, can they?

| improve this answer | |
  • Based on the comment thread, I'm assuming it can be readily reproduced. I'll update the question to make that explicit, though. – Peter Alfvin Jan 10 '14 at 21:23
  • 1
    @PeterAlfvin Then why can't a meaningful answer be given? – Servy Jan 10 '14 at 21:37
  • @servy It can. I made the assumption, however, that SO is not a "debugging service" where folks can present their code and ask SO folks to "find the bug". If it is, then I'll leave it alone! :-) – Peter Alfvin Jan 10 '14 at 21:39
  • @servy There's also the matter, in this particular case, that the OP has apparently already found the bug, so it really doesn't seem worth the effort for someone else to go through the analysis/debugging just to close this out with an answer. – Peter Alfvin Jan 10 '14 at 21:41
  • @RobertHarvey Given the question about reproducibility, I decided to go ahead and spend the time analyzing the code in the referenced question. Turns out it was relatively straightforward. When I went to answer, however, I see that it was closed by you. I put the answer in a comment and voted to re-open. On a related point, I'm still interested in my generic question(s). – Peter Alfvin Jan 10 '14 at 22:29

You must log in to answer this question.

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