17

What is the recommended way to respond to questions that have a clear Yes or No answer?

Example:

"Does int[] pass by reference?"

or

"Is it possible to abcdef?"

Often there is a flurry of (sometimes sarcastic or vitrolic) "Yes" or "No" comment responses. Should these questions be flagged? Answered by comment? It seems kind of ridiculous to have an accepted answer which simply says "Yes, it does."

16
  • 1
    As far as is it possible questions goes you can normally close them as too broad as they are unbounded. Nov 1, 2016 at 16:06
  • 11
    Such questions have duplicates that explain the basics.
    – CodeCaster
    Nov 1, 2016 at 16:11
  • 1
    Relevant cross site dup: meta.stackexchange.com/a/183183/186381
    – Servy
    Nov 1, 2016 at 16:53
  • 29
    For crying out loud, whatever you say in your answer, actually answer the question with a clear yes or no, preferably right in the beginning. Don't ramble on and on and on without giving a clear answer. Nothing drives me nuts more than people who start giving alternative suggestions without even telling me whether what I asked for was possible or impossible, or if they just don't know.
    – user541686
    Nov 3, 2016 at 6:10
  • 10
    @Mehrdad: Or, worse, "Is it possible to do X?" "Yes, it's possible, try Y."
    – BoltClock
    Nov 3, 2016 at 6:28
  • 12
    I was very tempted to answer this question with: "Yes". Nov 3, 2016 at 14:31
  • Pass the question.
    – m4n0
    Nov 3, 2016 at 14:41
  • 2
    Answer "yes" or "no", and then pad your answer as necessary to bring it up to the SO required minimum length. Pad it with something useful if you can think of anything useful to say, pad it with "........" if you can't. Nov 3, 2016 at 15:01
  • @BlackVegetable There are also other questions in the post (such as the first sentence). "Yes" would, therefore, not be a complete answer ;-)
    – mhatch
    Nov 3, 2016 at 20:02
  • 2
    @Mehrdad: Agreed. The second most irritating thing is people who go off on a ridiculous "I bet you don't know the answer" or "just go away if you don't know the answer" tangent based upon zero evidence, simply because they are unhappy with some procedure or the way some information was presented. Nov 4, 2016 at 12:34
  • 1
    @Michael: No, absolutely do not do that. Nov 4, 2016 at 12:35
  • @mhatch Only the title would really be syntactically valid to answer with my one word; I agree. I simply meant it in the spirit of humor, not to offend or suggest your question was ironically hypocritical, as it isn't. Nov 4, 2016 at 14:52
  • 1
    This "No, it does not" answer has 66 upvotes: stackoverflow.com/questions/27936772/…
    – user663031
    Nov 4, 2016 at 16:49
  • 1
    @BlackVegetable I did not take your comment in a negative way at all... Just messing with you a bit - thus the smiley ;-)
    – mhatch
    Nov 4, 2016 at 17:53
  • There are two "primarily opinion-based" close votes o_O
    – duplode
    Nov 5, 2016 at 22:50

2 Answers 2

35

After saying "Yes" or "No", one should explain why "Yes" or why "No". Answers that only contain Yes or No are no different than code-only answers in terms of usefulness.

That said, as CodeCaster pointed out yes-no questions tend to be duplicates of canonicals (e.g Is "st"+"ring"=="string" in Java?), so it might be better to click flag > a duplicate... and do a quick search for a dupe target before answering.

6
  • 1
    Why do you think yes-no questions have higher probability of being a dupe?
    – Oriol
    Nov 2, 2016 at 0:20
  • 15
    For starters, inexperienced askers or habitual askers tend to ask before searching. If the answer to such a question is yes, there simply is a very good chance the how is already described elsewhere.
    – BoltClock
    Nov 2, 2016 at 5:12
  • 1
    If the answer is no, well, there's not much that can be said beyond that.
    – BoltClock
    Nov 2, 2016 at 5:13
  • 7
    @BoltClock I beg to differ Nov 2, 2016 at 7:41
  • 3
    "Answers that only contain Yes or No are no different than code-only answers." They're different in almost every way. The only way in that they are not different, is in their level of usefulness. Nov 4, 2016 at 12:34
  • 2
    @gnat: Despite the phrasing, that is not a "yes or no question". Nov 4, 2016 at 12:35
2

You shall not answer the question... at least not before it's edited. These question are not good questions, they don't "inspire answers that explain “why” and “how”", therefore yes or not isn't the most interesting answer of the question, and most likely the answer OP and the internet isn't interested to read.

There are several ways you can suss out the actual question, taken the context:

  • If the question explain the reason why they ask, you can change "Is X possible" to "How to do X?" or "Why X isn't possible under A, B, C circumstances?"
  • If the question doesn't explain, a comment asking "Why do you think it wouldn't be possible?", or "Have you tried doing X? What happened?", etc. can help to clarify the question they mean to ask, kind of the XY problem, they would ask whenever Y is possible, instead of asking how to do X, or why X isn't working, etc.
10
  • 1
    I disagree that they aren't useful. I've spent a lot of time trying to do things that aren't possible, and just that yes or no answer could have provided a lot of direction. Sometimes the real problem could be too complicated or domain specific to get an answer on SO, and the best you can do is get guidance on whether the general thing you are trying to do has any merit. Nov 4, 2016 at 12:49
  • @NicolasHolthaus you spend a lot of time trying to do thing that aren't possible, and didn't ask how to achieve your objective instead? That your method doesn't do what you expect, those mean that your objective isn't unattainable.
    – Braiam
    Nov 4, 2016 at 12:51
  • I've never asked a yes/no question on SO, but the times I've been tempted to do so were when I wasn't able to clearly describe my objective or write an MCVE. Nov 4, 2016 at 12:55
  • 2
    This gets my vote. Push comes to shove, these questions are perhaps not entirely X/Y but you just know they're the beginning of a chameleon question. "Yes" or "No" is going to be followed by "How?" or "What should I do then?". I just can't imagine that someone reads "yes" and then goes "Oh okay, well now I know that I'm going to invest research time".
    – Gimby
    Nov 4, 2016 at 12:57
  • @NicolasHolthaus in those cases, then asking the question isn't going to get any better, as it would be either closed as unclear or lacking MCVE. If you aren't sure of what you expect to achieve, how do expect others to know?
    – Braiam
    Nov 4, 2016 at 13:22
  • I'm not really interested in arguing, all I'm saying is that I believe knowing that something can or cannot be done is useful, even if you don't know how to do it. Just my opinion. Nov 4, 2016 at 13:24
  • I've re-read your answer a few times. I think the first paragraph comes off a little strong, by outright saying they aren't good questions. I agree with changing "Is X possible" to "How to do X", but explaining is not always necessary because it's not per se an XY problem.
    – user247702
    Nov 4, 2016 at 13:35
  • @Stijn I'm not saying that it's a XY problem, right?
    – Braiam
    Nov 4, 2016 at 13:48
  • @Braiam Aren't you strongly hinting towards that in the second bullet point? Or am I misinterpreting it?
    – user247702
    Nov 4, 2016 at 13:50
  • 1
    @Stijn kind of, XY problem is that you ask about a problem with solution Y, instead of how to solve problem X, in my answer says: they ask whenever X is possible, instead of how to do X. Therefore, kind of.
    – Braiam
    Nov 4, 2016 at 14:15

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