15
\$\begingroup\$

TL;DR

Please clarify: is a previously unknown bug a reason to close a question as off-topic?


Yesterday I was interested to answer this question, where an already written answer pointed out the presence of a bug, but didn't explain its cause nor added any review comments.

The bug happened in a unique edge case (only one special combination of values for the two arguments of the function), so it's clear that the OP's hadn't noticed this bug yet when posting his question.

So I wrote my own answer, including both explanation and correction of the bug, plus some review comments.

But today I see that the question has actually been closed as off-topic. I'm pretty surprised because, as far as I can understand the rule, this shouldn't happen when the OP honestly ignored the bug at the time he posted.

Looking for precisions about that, I found only discussions which all seem to assert the same, as illustrated by this answer in meta:

The "spirit" of the "working code" rule isn't to forbid code with bugs - in fact part of the peer review exercise is to highlight unforeseen edge cases and other issues - it's very possible that a programmer might have written code that works for the input they're feeding it, but that breaks in other situations; if OP isn't aware of this, they won't be asking for solutions to such specific issues.

or this one:

The rule states that the code must work correctly, to the best of the author's knowledge. Usually, if the author does not mention any known bugs, then it's an allowable question.

So not only I don't understand the question is closed while it seems it shouldn't, but furtherly I'm disappointed to feel I actually wasted my time because I wasn't aware the OP could be closed.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I think it is more than an edge case but I would not have VTC \$\endgroup\$
    – paparazzo
    Commented Dec 28, 2016 at 19:28
  • 1
    \$\begingroup\$ @Paparazzi Maybe coming from my poor English (so I don't correctly interpret the meaning of the word), I don't understand why you deny this case to be qualified "edge case". It happens for a list having only one item, so it has nearly no chance to be encountered in real life. \$\endgroup\$
    – cFreed
    Commented Dec 28, 2016 at 19:50
  • 1
    \$\begingroup\$ Let it go. Comments are not for discussion. I don't even have the privilege to VTC on the site. Encountered in real life and run in real life are not the same. \$\endgroup\$
    – paparazzo
    Commented Dec 28, 2016 at 19:57

2 Answers 2

14
\$\begingroup\$

I'm one of the users who voted to close. I saw that at least two bugs were discovered, and that made me think the code is severely buggy and therefore troublesome to review.

But I saw it wrong. After re-reading the post, the answers, and this meta post, I realized there's really only one small bug, truly an edge case as you said it, with a trivially easy fix. In light of that, I reopened the question now.

So not only I don't understand the question is closed while it seems it shouldn't, but furtherly I'm disappointed to feel I actually wasted my time because I wasn't aware the OP could be closed.

I'm not sure why other 4 users voted to close, I can only say that my part in it was a simple oversight. You did the right thing to raise the issue here on meta. I hope you'll remember to have faith in the system, we do listen, don't get disappointed so easily!

\$\endgroup\$
1
  • 3
    \$\begingroup\$ Thanks for reopening the post, and mostly thanks for posting this answer! As a non-native English speaker, when outside of the purely technical domain I often have trouble to be sure about plenty of subtle interpretations: so is the current case, where it was difficult for me to clearly appreciate the limit between on/off-topic. And I was somewhat angry due to what appeared to me like an injustice against the OP. Now being sure of what is right or not is very much comforting. Thanks again. BTW, "disappointed" is probably more than what I wanted to say: again, comes from my poor English! \$\endgroup\$
    – cFreed
    Commented Dec 28, 2016 at 22:46
6
\$\begingroup\$

Since I wasn't involved in this question at all, I'll just try to make sense of the situation based on the norms of this site.

The first answerer, @Dair, wasn't originally aware that the code was broken, but decided to keep the answer since it still had some value. Perhaps this user would've also voted to close if it were possible (insufficient rep), or would've also agreed that it could've been an edge case.

The second answerer, @Roland Illig, should've just left a comment and voted to close without answering anyway. In these situations, it's just best to remind those users of this, especially those with vote-to-close privileges. One of the other mods has already done this, too.

Moreover, this may have been seen as more than just an edge case, since such questions can still stay open if this is evident. That's probably where it's best to hear from those who voted to close and to have other users determine if the questions should be reopened.

As for your answer, it's probably not clear if you wasted your time, depending on whether or not the question gets reopened. But, if you believed it to just be an edge case, then answering it would be justified.

\$\endgroup\$
6
  • 4
    \$\begingroup\$ Example of a question that can stay open even with bugs discovered: codereview.stackexchange.com/questions/147192/… \$\endgroup\$ Commented Dec 28, 2016 at 17:56
  • 1
    \$\begingroup\$ @EBrown We have a couple of those. Finding bugs doesn't make the question off-topic by definition, the severity of the bug is important as well. Here for example a lot of cases were tested and still a bug slipped through. But to the best of my knowledge, it worked as expected. Questions should be closed if they don't work as expected, but sometimes a bug slips through and makes your code fail edge cases. In case of the question I linked, even the on-line judge thought it was working in order, which resulted in a bug report :-) \$\endgroup\$
    – Mast Mod
    Commented Dec 28, 2016 at 18:23
  • 1
    \$\begingroup\$ @Mast Questions should be closed if they don't work as expected is correct. To the best of your knowledge (and the post I mentioned) the code worked exactly as expected. It may have failed edge cases (or test cases we didn't think of because we don't use them), but in the end, it worked for our requirements. In the end, I think 'works as expected' is the defining term. You can have code that crashes in a specific situation, does that make it broken? Well, not necessarily. It may be designed to crash in that situation, and that's 'working as expected' in that case. \$\endgroup\$ Commented Dec 28, 2016 at 18:26
  • 1
    \$\begingroup\$ Thanks for this answer: you carefully (and indeed correctly) traced what successively happened. But, no offense, I insist: it doesn't answer to the main question, which is "Should the post be judged off-topic when there is no known or obvious bug at the time it's posted?". One thing is sure: there are several cases where it didn't happen, like the one reported by @EBrown, or the one I answered a few time ago (codereview.stackexchange.com/a/150158/69690), where the bug was far more obvious! I think that the current uncertainty about how to judge is a real "philosophical" issue. \$\endgroup\$
    – cFreed
    Commented Dec 28, 2016 at 18:44
  • 1
    \$\begingroup\$ @cFreed: I suppose I indeed didn't make that clear, but no, these questions shouldn't be closed. However, not everyone can easily tell if a question is either broken or just fails to satisfy one condition. As such, this is the time when new voters should cast reopen votes if they disagree with the closure (or any mod can just force it open again). \$\endgroup\$
    – Jamal
    Commented Dec 28, 2016 at 18:51
  • 1
    \$\begingroup\$ Thanks for the precision: now it's pretty clear (and BTW matches what I thought was "the right" answer. So for the sake of equity regarding the OP, and since I don't have reputation enough for casting votes, I'll flag the post to ask moderators to reopen it. \$\endgroup\$
    – cFreed
    Commented Dec 28, 2016 at 19:09

You must log in to answer this question.

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