I read with interest https://meta.stackexchange.com/a/108061/216381 and the comment http://weblogs.asp.net/alex_papadimoulis/archive/2005/05/25/408925.aspx. I also read Do I have to explain why I am asking a question on SO? and the infamous FAQ answer https://meta.stackexchange.com/a/66378/216381

With rare exceptions, such as https://meta.stackexchange.com/a/97172/216381, the MSO attitude seems to be that people responding to questions have a "right" to choose not to directly answer the question in favor of an answer which basically tells the OP they "shouldn't be doing it that way". The advice all focuses on the information the OP should provide to avoid this kind of response rather than suggesting that those providing answers should be respectful of questions and not make assumptions that there is some underlying problem that the OP is trying to solve that should be addressed instead.

In rationalizing the approach of not answering the question, two "carpenter" analogies were used, one involving a question about how to cut balsa wood and the other involving a question which of two non-tool household items is better to pound a nail. In both cases, they ask the rhetorical question of whether it's better to answer the question or challenge the question.

My MSO question here is: Why do so many seem to think they have to choose between these two ways of responding? Why don't folks consider answering the question and supplementing their answer as they wish with questions, challenges, additional information, editorial opinion, etc. Not only is that more respectful to the OP, it's more respectful to future readers who arrived at the answer based on the question asked. If I do a search about how to cut balsa wood, I don't want to land on an answer that just tells me what a bad idea it is to use balsa wood in house construction.

Update: While I don't want to focus on specific examples, in response to some of the answers/comments, here's a recent one where I was the one asking the question:

Although it would take me a while to uncover examples, the more common occurrences I run into are where someone shares some code and an error they are getting and ask why they are getting that error. Instead of explaining the error, the answers typically propose some other approach. Admittedly, the OP is often times satisfied with that answer and not knowing why the error occurred, but I would contend the community is the poorer for it and, as a rule, this practice unnecessarily runs the risk of offending.

  • If you are looking for information about cutting balsa wood correctly for your model airplane, and can only find warnings about not using it when building a house, then it would be perfectly fine to ask a new question that's explicitly about model building.
    – jscs
    Commented Oct 11, 2013 at 20:44
  • 1
    ;-) But wouldn't it be nice if an answer to a question about cutting balsa wood simply answered the question so that people cutting balsa wood for any purpose could use the answer, whether it's for model airplanes, the core of a fiberglass boat, decorative panels on a house or whatever? Commented Oct 11, 2013 at 20:51
  • 1
    Assuming that the technique is actually the same for the various end results, yes, I agree that would certainly be ideal.
    – jscs
    Commented Oct 11, 2013 at 20:52
  • 1
    I see nobody saying you must choose exclusively between the two options, and thus no false dichotomy.
    – Raedwald
    Commented Oct 11, 2013 at 23:11
  • The choice is explicitly discussed in the referenced weblogs.asp.net/alex_papadimoulis/archive/2005/05/25/… and all the MSO answers I referenced implicitly endorse an approach of responding to the question with solely a question/challenge/alternative. At least that's how I read them. Commented Oct 11, 2013 at 23:21

3 Answers 3


Most people come to Stack Overflow with a question, and the second they get to the answer they stop. Doesn't matter how you explain the problem with the original premise, doesn't matter how ill advised that route may be, the second they come to the answer they stop.

That lends itself to the behaviour of posting a challenge to the underlying assumption rather than answering the question. Odds are good that if one person is approaching this subject with this particular approach, there are more and will continue to be more.

For the good of future readers, I would rather post the kind of answer that would change the line of thinking than provide an answer and some others stuff they won't read. Rarely have I come across a question of the nature you are describing where posting the answer would be anything other than allowing a faulty premise to continue.

If you did find that hypothetical question where an answer could be provided and be useful to others searching later without the constraints, then I could see posting a qualified answer... but I've just not seen the cases where that makes sense.

  • 1
    While I could do the standard MSO thing and ask you "what evidence do you have that the second they get the answer they stop", I can certainly imagine that would sometimes be the case. However, that would just suggest to me that the supplemental information ought to be positioned first, perhaps with an introduction that says "I'll get to your question, but first I'd like to say ...". As for examples, I'll provide some in an updated version of the question. Commented Oct 11, 2013 at 21:55
  • @PeterAlfvin - Since I don't get the chance to talk to the people that use the site in person, I can only make an educated guess based on my time as an IRL educator; where I've seen the same behaviour played out time and time again.
    – AnonJr
    Commented Oct 14, 2013 at 17:53
  • @PeterAlfvin - as to the second part of your comment, it has been my experience that people at this stage of learning frequently have such tunnel vision that it doesn't matter how many warnings or prefixes you provide - they skip right to the answer they were looking for and carry on.
    – AnonJr
    Commented Oct 14, 2013 at 17:55

Some people do do that. I do it myself under certain circumstances.

Like so many things, whether you decide to do that is a judgement call, and depends on the context. It's not universally better.

If doing what they ask is something I wouldn't like to see, but wouldn't be actively harmful, and I can envision some circumstances in which it might need to be done, I would at least consider posting two solutions. If I would consider an answer to the question as asked actively harmful and that someone choosing that solution would be doing so because they didn't realize how bad it is and is likely to have serious problems as a result, then I would not include it.

Including both solutions is also often more effort; while there are circumstances in which it's justified, sometimes answering the literal text of the question is just wasting my time if I don't think they should do it and know that the readers are just going to use the other solution anyway.

If it's clear based on the response to an answer that an alternate solution more in line with what is literally asked would be helpful, or the OP responds indicating that the alternate solution is not possible/desirable/whatever, then you can go back in an edit in an alternate solution based on this feedback.

  • 2
    I know some people do do that. :-) I was asking why so many (i.e. the predominant MSO position) seems to imply one or the other. As an aside, note that your language (and the predominant MSO language) is in terms of "problems" and "solutions" rather than "questions" and "answers". I think the assumption that all questions have some "underlying problem the OP is trying to solve" as being a big part of this issue. Commented Oct 11, 2013 at 20:19
  • @PeterAlfvin And do you have evidence to the contrary? It has been my experience that the vast majority of questions behave in that manor, with only rare exceptions (i.e. the self asked question). Also based on my personal experience, I'd say that the percentage of situations in which providing both is a fairly small, so it can be appropriate, but it's not like you should be telling everyone to do it whenever they decide to provide just one solution (unless you're willing to back up why the other solution is really worth adding in that context).
    – Servy
    Commented Oct 11, 2013 at 20:24
  • Evidence of what? :-) What the predominant MSO position is on dealing with the XY problem? That most people posting on MSO think in terms of "problems" and "solutions" rather than "questions" and "answers"? That the latter contributes to how they respond to suspect "XY problem" situations? Commented Oct 11, 2013 at 20:35
  • You're still talking about "problems" and "solutions". :-) I usually ask questions when I have "gaps" in my knowledge that I can't readily fill with other investigative means. I typically will discover those gaps in the context of working on something, but once I discover the gap, my interest in it is independent of what I'm working on. Commented Oct 11, 2013 at 20:38
  • 3
    @PeterAlfvin Then you're absolutely falling into that category. If you're describing a problem but the real goal is to understand a particular programming concept then you're not really interested in someone proving code that produces the result that you want, you're interested in having the underlying concept explained. That's the real problem that you want to have solved. The answer to the literal question that you ask might or might not result in that explanation. If it wouldn't, you've asked an XY question. If it would, then, like any good question, an answer solves your problem.
    – Servy
    Commented Oct 11, 2013 at 20:42
  • There you go with "problem" again. :-) If I have a knowledge gap, I'll ask a direct question about that gap (e.g. Does language X have feature Y? What does method Z do?). There is no "underlying problem". Commented Oct 11, 2013 at 22:54
  • 2
    @PeterAlfvin You wanting to understand something is a problem. A problem doesn't necessarily need to be you needing to write some code to accomplish some task your teacher/boss/whomever told you to do. Your problem could simply be understanding why frobers frob instead of bazzing. That is (or can be) a problem.
    – Servy
    Commented Oct 12, 2013 at 0:39

In some of the lesser visited tags, where the technology and the techniques in the field aren't so well known, I think it can be valuable when someone asks one of these kind of questions to explain in an answer why this isn't the way that such a thing would be done, as long as the answer also explains and how it ought to be done. Additionally, it can still be worthwhile, sometimes, even if just as an academic exercise, to explain how it could be done using in the unconventional way, if it is, in fact, possible.

As a recent example in the Common Lisp tags (disclaimer: link is to a question that I answered) ,a user asked how they could define symbol macros that would behave in the same way as parentheses:

The short answer is that “you can't.” The longer answer is, “you can't, you shouldn't, why would you want to anyways, but…". However, this is good opportunity to illustrate that this can be done using other parts of the API, and to point out the pros and cons of them. Perhaps that qualifies as “too broad,” but I hope that that's an answer that future users will be able to find when searching on related topics.

I think this is important for a few reasons

  1. It gets the information out there as an answer, so that it can be used in the future, and maybe even to help the OP.
  2. It serves as a place to point future duplicates that make the same mistake (as opposed to just closing them as lacking a minimal understanding). Even if XY questions are questions that ask for code without enough understanding, they can be frequent enough that it's useful to have some canonical answers so that they can be closed as duplicates.
  3. (This might just be rephrasing the previous point) getting the "proper" answer and the "confused question" together helps other people who (mistakenly) start to follow the same approach that the original asker did.
  • In case it wasn't clear, I fully support the approach you're outlining. I really was focused on why the accepted MSO answers/wisdom is that this as an "either/or" situation (i.e. "just answer" or "just tell them about the alternative") vs. doing both within the context of their single response. Commented Oct 11, 2013 at 23:06
  • @PeterAlfvin Yeah, I guess I started in trying to make the point that "in some tags, it's not really treated as a dichotomy, but more of a spectrum," and then it just turned into an example. Commented Oct 12, 2013 at 18:40

You must log in to answer this question.

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