relix a year ago

I often encounter the opposite. I would have a complex problem that I can legitimately solve by something reasonably simple yet I don’t posses the expertise on. Asking how to do Y, I need to spend an godawful amount of time wasting to convince people that no, it really is not an XY problem, and could we just focus on the literal problem description, which you could answer in like 3 minutes, instead of you trying to score points by being able to claim it’s an XY problem.

This is because I was not up front about all of the context of course, but to fully explain the context and constraints that I’m working in, which I have already synthesised into my original question, would take two days due to complexity of the problem.

Let’s just get on with the problem solving instead of playing the meta game.

(I understand that knowing more context might be necessary to answer the question. I am referring to situations where that is not the case)

  • saghm a year ago

    I like to call this the "YZ answer"; I'm asking Y, which is the actual question I have, but someone else tries to convince me that my "real" question is "Z" because they happen to know the answer to that.

    Tangentially related, but does anyone else besides me have an irrationally strong dislike of the name "XY problem" for this phenomenon? I feel like that name could apply equally well to basically any problem where you have two things you could call "X and Y", which is...a lot of problems. Why not call this something like the "mistaken question" problem or the "incorrect premise" problem?

    • JdeBP a year ago

      I refer you to Mark-Jason Dominus's original explanation of what X and Y had to be. It got renamed "XY Problem" after the fact, and that name didn't take off for a long time, really not until Stack Overflow appeared and became popular, well over a decade after MJD posted about this and well after many of us had for that time not been calling it this on volunteer-support mailing lists and Usenet newsgroups.


    • plagiarist a year ago

      On Stackoverflow in particular, there is also a ~YY answer. You explain that you specifically don't want Y, then someone tells you you are wrong and to simply use Y.

      • kloch a year ago

        Might as well just call this the "Stackoverflow problem", although it is really a family of problems where either the requestor or (typically) the responses are less than helpful.

        As a third party searcher looking for answers to a specific problem, I would prefer to see a direct solution to the stated question first, even if it is followed by admonitions that "you probably don't want to do that" or "this other thing is a better approach".

      • einpoklum a year ago

        Well, yes, but many of the times people on SO say they don't want to use Y, it's because of some assumptions they have about Y, and actually they do want to use Y, or use it differently than usual etc.

    • pishpash a year ago

      You're saying the problem isn't what the XY problem is, but that it isn't called Z. So an XYZ problem. /s

  • matsemann a year ago

    I'm sorry, but if people often do this to you, maybe reflect on them actually being right? Or that you're legitimately asking a stupid question given your self-proclaimed lack of expertise?

    People don't answer that way to be smug or so. They do it because the thankless person they're spending their own free time helping will just come back with a new asinine question the moment one answers their posed question. It's from experience after helping thousands of people, not pettiness.

    If perhaps you're the one in a million case where this isn't applicable, just add the context, then. Don't be angry about having to do it, that's quite entitled given that you're asking people to solve your problem for free..

    • skohan a year ago

      Did you reflect on the case that actually you might be the smug one in this scenario, assuming that every person who asks a question doesn’t know what they are talking about, and you know better than them?

      I have experienced this many times, and it’s extremely frustrating, when people ask for the context, and I answer something to the effect of:

      > the context is quite hard to explain but I assure you I thought through this question and this is precisely what I need to know

      And people will still insist that you don’t know what you are talking about and this must be an XY problem.

      Even in the case that someone might be wondering down the wrong path, it’s more valuable for the community to let them make their own mistakes and learn from them. That’s how we become experts, not from blindly trusting the “authority” of people who spend a lot of time earning karma on Stack Overflow.

      I think it’s good to answer a question in the form: “this seems like a strange question because X, but here is the answer”. It’s also fine to ask for context.

      But it’s quite arrogant to harass someone into providing context until you are satisfied they are solving a problem in a way you deem worthy. If you don’t like the question you’re free to not engage with it.

      • pickledish a year ago

        > > the context is quite hard to explain but I assure you I thought through this question and this is precisely what I need to know

        I dunno, I mean, to me this just sounds like the "senior developer" phrasing of the same logic that the noob was using in the linked page. The core problem is that you don't know what you don't know, right, and no one is immune to that, regardless of age or experience.

        IMO that we should all try to avoid believing things that sound like "I assure you I thought through this question and this is precisely what I need to know", since -- while we may be right pretty often (maybe even more often than not!), there will be times we're wrong, and in those times, our attitude about it will make us even harder to help than the "noob".

        • skohan a year ago

          In some cases the context is hard to explain because it's complex, or it relates to something about the domain of the use-cases which is very particular to this implementation. If all you need is some small detail, like how to accomplish something with X library, it would be a waste of everyones time to write several paragraphs to explain some context which will be irrelevant to everyone else.

      • albedoa a year ago

        > the context is quite hard to explain but I assure you I thought through this question and this is precisely what I need to know

        Oh man, I field questions on a technical subreddit, and you wouldn't believe the sheer number of non-expert askers who confidently believe this. It doesn't take much follow-up to realize that not only is the context easy to explain for anyone who truly understands it, but the asker is actually asking about X.

        You are one in a million, congrats. The vast majority of people who say what you said are bringing their own arrogance, simultaneously accepting that they need help while preparing to reject the help of the actual experts they are appealing to.

        > “this seems like a strange question because X, but here is the answer”

        This is a good first response and how I answer suspected XY Problems. It often leads to the asker reevaluating their assumptions, which is a valuable teaching moment and the goal if my true motivation is to help people.

      • uoaei a year ago

        The simplest way I can put it is, be careful that you're not rationalizing when you ought to be reasoning.

        The former is the main source of the XY problem, and comes up very often in cases where people are stuck and asking for help. The main issue they would be having is that they're framing the problem incorrectly in their heads and working through the logic of the ideal solution based on faulty grounds.

        I would like to point out the subtle irony in responding to these comments with a meta-scale XY problem: you think your problem is other people don't see the Y for what it is (people don't understand my questions are really about Y and not about X), while you are yourself blind to the X (I may not be framing my problem correctly in my mind which is leading to my overconfidence that it is Y and not X).

      • matsemann a year ago

        If you know what you're talking about so well, why is it so hard to explain the context? You know the old saying about if you can't explain something, you don't really understand it.

        If you know what you're talking about so well, why are you unable to solve your problem? Perhaps the context would help someone help you.

        If you can't be bothered, don't bother asking for others to use their own time to help you.

    • marcosdumay a year ago

      > they're spending their own free time helping

      Oh, man, if it's such a bother, just don't. Nobody is forcing you to spend your own free time.

      But well, let's be clear. This is a Stack Overflow problem only. And it's Stack Overflow only because every interaction on that site includes a veiled threat of "do what I say or I'll make sure nobody ever answers your question and you are blocked away from this site".

      Any unreasonable comment on a random forum is just a bunch of text you can jump over. Any unreasonable comment on SO is a demand from unforgiving authority that people do your bullshit. People have every right to be pissed of the people making those comments.

      > If perhaps you're the one in a million case

      From the answers I see on SO, the odds there are around 80% that you are wrong.

      • matsemann a year ago

        From me reviewing thousands of questions in the review queue, odds are you're the one in the wrong. You perhaps only see the cases that actually survived.

        When you have to weed through a hundred questions to see the one of any actual quality, it's no wonder people seem a bit jaded. I know it's a meme here that SO is super bad, but no one would visit if it didn't have the strict moderation. It would be a waste field of low quality stuff.

        • marcosdumay a year ago

          Yeah, that model of unpaid people weeding through thousands of questions in a review queue... is not a great one.

          Just the fact that SO made it barely work is incredible.

      • rprospero a year ago

        > This is a Stack Overflow problem only.

        Were this only to be true. I first encountered this issue on a coding forum before StackOverflow even existed. Though the term XY problem hadn't been coined yet, there was a regular poster who would come in and accuse people of asking the wrong question. Someone would ask how to make an HTTP connection in Objective-C and he'd explain that Objective-C was the wrong tool for that job and that they should be using C#. The poster would then explain that they were writing an iPhone app, ruling out C# in early 2008, but he would then explain that an iPhone app was the wrong tool for the job and that the poster should be writing a Windows desktop app. Someone would point out that making an iPhone app was a decision made at the CEO level and beyond their capacity to change and this fellow would say that they should quit their job and work for a company that makes desktop apps for Windows.

    • permo-w a year ago

      the general gist of what you’re saying is fair, but I’m extremely sceptical of the claim that there’s no smugness involved. these kinds of forums are full to the brim with smug, vindictive assholes who can’t wait to point out how silly and misguided you are. in my experience there’s no correlation between your propensity towards helping people online and a positive disposition

      in fact there are definitely people who, if they aren’t helping as an excuse to be rude in the first place, feel it’s okay to be rude because they’re helping. you get this offline too. Gordon Ramsey is a good example

    • rendaw a year ago

      Even if they're wrong, why not answer their question as stated?

      If they're asking how to delete all the files on their root disk, tell them how, they can try it, and either you've solved their problem or they've learned something valuable. But more importantly, maybe someone else will come along who actually does want to delete all the files on their root disk and be helped by your answer after the fact.

    • relix a year ago

      Of course, because every time it happens, unless I don't want the answer, in order to move forward I do need to explain the context.

      So I do. And invariably either the original responder goes radio silence, or admits that my question is the correct one and they can't help me with it.

      I think saghm really hit the nail on the head with his YZ answer:

    • petabyte0 a year ago

      People do it often because it's a cheap way to feel smart without putting in any effort. It's the same reason how people mention Dunnking-Kruger any chance they can.

      I doubt adding full context would help much in terms of getting a quality answer. Someone who answers questions in good faith will answer if they are there. All it would do is remove all the XY people I guess

  • resonious a year ago

    Yeah the whole premise of the "XY" problem seems like it was written up by someone who regulars Stack Overflow. It's pretty frustrating when the highest-upvotes answer to a question is "actually you don't want to do that. do something else instead".

    • pie_flavor a year ago

      The goal of asking a question is not to get the exact answer to the words you spoke, it is to solve the problem the question is inspired by. It's a funny psychological thing, though, where people perfectly comfortable with the idea they don't know the answer to a question are easily offended by the implication that they don't know what question would lead to a solution, even though the foundational knowledge to answer the question is often the same as that required to ask it.

      The reason people assume it's the wrong question is because they've seen a thousand other people ask the wrong question. This assumption is not a reflex that comes naturally, it is learned.

      Experienced people who really have the question, understand XY just fine and start off with the context, but are happy to provide more; experienced people who say they are offended at common assumptions of XY tend to be in complete denial about legitimate cases of XY.

      • tzs a year ago

        > Experienced people who really have the question, understand XY just fine and start off with the context, but are happy to provide more; experienced people who say they are offended at common assumptions of XY tend to be in complete denial about legitimate cases of XY.

        That's not how it works on Stackoverflow and similar sites. Here's what happens when an experienced person who really does have the question, understands XY just fine, provides context, and is willing and able to provide more context is needed tries to get an answer on Stackoverflow.

        1. They do a search and find that people have asked X before on Stackoverflow.

        2. They read those questions and answers and find that in all of them the answerers decided that it was an XY problem and answered Y. Maybe the answers were right or maybe they were wrong, but in either case nobody answered X.

        3. They post a new question asking X, explaining that the existing questions and answers do not apply because the person actually needs X and provides sufficient context to show this.

        4. The question quickly gets closed as a duplicate of one or more of the others.

      • hgsgm a year ago

        People are OK with what they know they don't know, as no one knows all the "trivial details", but not OK with what they know being wrong.

    • JdeBP a year ago

      It wasn't. Mark-Jason Dominus was the cause of that name.

      I, Raymond Chen, Charles Cazabon, and Eric S. Raymond didn't use that name at all.

      I, in particular, chose a name that reinforced the an important part of the concept, missed in this discussion here, that the problem was nonsensical as posed.


      • mjd a year ago

        Thanks! But it was actually Greg Bacon (responding to my original article) who thought of calling the phenomenon "XY problem".

        • JdeBP a year ago

          That's why I went with "cause" not "coiner". (-: People took your "X" and "Y" and ran with them, and the fact that "X" and "Y" are not blatantly nonsensical together caused some of the meaning to be lost. I've watched this happen over the years on the likes of Stack Exchange.

          If Greg Bacon had gone with "Bacon and Hand Drill Problem" instead, perhaps this wouldn't have become so distorted. Although I know a group of Wikipedia writers who would no doubt insist that bacon logically goes with everything. (-:

    • arcanemachiner a year ago

      I think this is because people Googling a question often end up at a SO post that answers a slightly different question. But since the keywords blazed a trail to a certain answer, that's the one that gets the upvotes, even though it's not the "correct" answer.

      This has happened to me many times.

      • travisjungroth a year ago

        That’s incredibly common and so frustrating. The title will be “How do you delete a column from a dataframe?” and then they’ll include a bunch of super specific code and paragraphs of context. The only answer will be “You actually don’t ever use that column. Just don’t add it in the first place.”, which is not an answer to the title question at all.

    • ilyt a year ago

      It does happen very often when person trying to fix the issue is not an expert in the domain they are tinkering with and it is just some extra needed for their job and not main part of it.

      We see it all the time with developers for example:

      "I need sudo access to do XYZ"


      "Because I can't access this directory"

      "Ok, I fixed permissions and put it in CM, test it without sudo"

      "Oh, it works, thanks".

      But, of course, on SO you don't have that context.

      • einpoklum a year ago

        That's why a good question gives some context regarding the motivation, or says something like "I have to do Y for reasons. Please don't answer about problems X or X' or X'', I just need to do Y."

  • lelanthran a year ago

    Yeah, it's a false positive identification of the XY problem.

    The audience falsely identifies your problem as an XY problem. This is, IME, due to the audience wanting to refactor the problem into something they can understand.

    It's worse in JavaScript probl ms, where, due to the actual inability to do something simple like pause the runtime for 5s, the experts all spend tons of effort trying to convince you that there is no situation in which this is reasonable rather than simply say the runtime environment is too crippled to allow this.

    It's nonsense of course.

    • circuit10 a year ago

      It’s true that with the way JS is designed, you almost never want to freeze up the entire program like that because it doesn’t exactly have threads so it would freeze the whole page or application even if you could. You can get a similar effect using async functions which can pause for a bit while still allowing events to be processed (or do it the old way using callbacks)

      So both are true; yes, you almost never want to do that, and the reason you don’t is because is because of JavaScript’s design, which you could argue is a flaw but it does also have advantages

  • haswell a year ago

    I think this highlights that the usefulness of the XY problem framing will depend on context.

    As a platform product manager working with customers (both internal and external/paying), the most important thing I can do is know with certainty what problem I’m trying to solve and why. Maybe it’s annoying right now, but it ensures we don’t spend 6 months building something that solves nothing. I can’t count the number of times someone asked for features instead of describing their problem and after returning to the problem it quickly became apparent that the feature ask was not the only path forward and probably not the best path forward.

    In the context of engineers seeking help from other engineers, I can understand why this can quickly become something else.

    As with all things, context matters. Don’t insist on understanding X to the nth degree just because you encountered But don’t assume that someone trying to understand X is just trying to assert their superiority.

  • pyb a year ago

    Pretty much stopped asking any questions on web forums because of this. Some people tend to "XY" you whenever they don't immediately know the answer to a complex question.

    • LeonB a year ago

      I’ve seen a pathology where people ask for irrelevant details to stall for time. As in: “hmmm what version is your operating system? And what’s the version of every package/dll on your computer?”

  • kelnos a year ago

    > Let’s just get on with the problem solving instead of playing the meta game.

    I feel like a lot of things in tech have become --- for lack of a better word -- memes, that people trot out to make themselves appear smart. The XY Problem is one of them. Sometimes we have actually thoroughly explored our problem space and know what we need to do, just not how to do it! But someone else seems to think they're going to get Cleverness Points by uselessly derailing the discussion.

    • lelanthran a year ago

      It's one reason why ChatGPT is going to eat stack overflow alive in no time at all.

  • thom a year ago

    Yeah it’s often like speaking to ChatGPT, you have to put in an enormous preamble saying “answer exactly what I’m asking, I promise I’ve thought about it, I know it’s weird”.

  • FeepingCreature a year ago

    Also enraging: finding X answers for your YY problem on Google searches for Y.

  • marajit a year ago

    im often accused of xy problem. Thing is, I want answers to x AND y. So when they've answered y, i ask x, and that makes them mad

Semaphor a year ago

There’s always the running joke about people on SO claiming it’s a XY problem when it’s not. Alas, I encounter so many times when the OP did have an XY problem, the answers then solve the actual problem, but I never had an XY problem, have the problem in the title of the post (which no one solved or cared about), and leave without a solution. I wish moderators would adjust titles on SO questions that get updated to a different question.

And funnily enough, all threads for this submission have the complaint about the reverse XY problem at the top…

  • wodenokoto a year ago

    Yeah, you really need to think two steps ahead and write out specifically "My problem is Y and not X, and the difference is ..."

    I find good success writing in my question "question is similar to <already answered question> except I need this and that, which that solution doesn't provide"

    • Semaphor a year ago

      I meant it the other way. I encounter so many questions on SO, where the problem was X after all. And then X gets solved, everyone is happy. Besides me, who gets it as a search result for problem Y that no one, including the OP, actually was interested in solving.

JdeBP a year ago

Mark-Jason Dominus was the root cause of the "XY" name, inadvertently.

I, Raymond Chen, Charles Cazabon, and Eric S. Raymond didn't use that name at all.

A lot of people foolishly chose to go with "XY", because they thought that what we were saying was silly. I even had bloody foolish people on Stack Exchange complain that I wasn't using the sensible name "XY", when I was one of the people who wrote about this stuff in the first place long before that name appeared. I shouldn't be renaming what was known as the "XY Problem" to silly names, they demanded.

But that was the point that Mark-Jason Dominus and I were making.

Calling it something as mundane as "XY" loses an essential part of the concept, which is that the actual question as posed makes no logical sense and blatantly doesn't fit what the things being asked about do. All of the people complaining that they've posed questions that make logical sense and then been accused of "XY" problems would likely not have been accused of using chocolate covered bananas to integrate European currency systems. It's in part the people who missed our point and pushed to rename to "XY" who have caused all this pain for you who now complain that you're being told that your questions are "XY Problems".

Chocolate covered bananas and European currency systems nicely communicate the fact that it's not just mundane "X" and "Y", but it's two things that prima facie make no logical sense together. I stressed this three times in my FGA. Mark-Jason Dominus used "logically nonsensical" too.

The headlined page here misses this, and waters it down to "seems like a strange problem to want to solve". It's not that the problems are strange and unusual to the answerers. It's that they are nonsense.

I've never used the "XY" name, myself, and I recommend its avoidance.


  • kps a year ago

    You can probably have the name back for that problem.

    The Stack Overflow XY problem and resulting XY problem problem are different:

    1. Someone is assigned to accomplish task Y

    2. … within an established project based on facility X.

    3. There is a sub-task of Y, say Z, for which X is ill-suited.

    4. They come into the group and ask ‘how can I use X to accomplish Z?’

    with responses that amount to ‘get a different job.’

  • Dan42 a year ago

    The "chocolate covered bananas and European currency systems problem" is certainly more accurate, but in terms of naming things, it's automatically disqualified because it's way too long to be usable in any context. So the "XY problem" wins by default. Maybe if you had titled it the "CCB-ECS problem" it would have caught on. Or something less abstract and chocolatey. Naming things sure is hard.

  • pishpash a year ago


    • proto_lambda a year ago

      > Just answer the fricking question or I'll replace you with a bot.

      Please do, it'll save everyone a lot of time and headache, especially if this is representative of your usual mode of communication.

      • pishpash a year ago

        If you can't take the heat get out of the kitchen. Real engineers find solutions to ill-posed problems every day.

    • FeepingCreature a year ago

      > Using chocolate-covered bananas to integrate European currency systems is a metaphorical scenario, so let's explore it creatively.

      > Remember, this creative exercise is not a practical strategy for integrating European currency systems

      Sounds like it XYed you.

      • pishpash a year ago

        It most certainly did not. XY'ing me would be stating that the question is a waste of my and their time and an answer wouldn't help me and then choosing not to answer, as was the suggested approach. It is pompous and shitty behavior so call it what it is.

CipherThrowaway a year ago

IMO the XY problem problem eclipsed the XY problem in significance a while ago. Q&A communities are full of useless XYsplaining that pollutes search results with non-answers.

If you know the answer to someone's question, and you want to be helpful and informative, then simply answer it. Follow your answer with "why do you need this btw? there might be a better approach" when appropriate. This is Example 1 from the OP. It's great!

If you can't answer a question then the most helpful thing to do is usually to stay silent. This is where the XY problem problem strikes: know-it-alls who need to have an answer for every question, who have nothing to say but still need to be heard.

  • MereInterest a year ago

    I think the best way to avoid the XY problem problem is to give two answers. First, stating the short answer to the assumed question, then the long answer to the explicit question.

    So, if somebody asks how they can access private member variables in C++, the first answer would say how to avoid needing to in the first place, and the second answer would say to buckle up because it’s time for the fun world of undefined-but-sometimes-useful behavior.

    • shagie a year ago

      Given time as a limited resource, how much time do you want to spend on the long answer if it isn't going to help the person asking the question (assuming that the person asking the question isn't after an education and is more interested in "just solve my problem")?

      Back when I was answering questions on one of the SE sites my rule of thumb for how much I was going to invest in answering a question was based on how much it appeared that the person invested in research and asking the question.

      If they had only appeared to have spent a few minutes on asking the question and the answer was something that would have taken much longer to properly answer, I'd pass on answering and may only leave a comment asking for more information about the nature of the problem so that another person coming by later to answer it would not need to do as much research into providing an answer themselves.

  • pishpash a year ago

    There was never an XY problem to start with. There is an answer to this question and an answer to that question. Convincing someone to ask a different question is not answering a question, it's mentoring.

pdimitar a year ago

In my life experience, 95% of the troubles with the XY problem stem from the fact that the people are not aware that they have over-fixated on the potential solution Y for the problem X.

They quickly assumed it, solidified it in their heads, and then most of the time spent with them is allocated to making them disentangle Y from X.

Once that happens, the solution has usually presented itself already at this point -- because the disentangling process involved a healthy amount of discussion.

  • eternityforest a year ago

    Sometimes the entanglement happens because Y is the entire elevator pitch for the whole thing.

    Get rid of Y, and you're left with "I used Z as intended and it solved the problem with some minor annoyances" or "Yeah, I just shaved it down a bit to fit and used epoxy, no need to CNC an adapter".

    Especially when X isn't the actual problem. Sometimes the actual problem is "I've become obsessed with stuffing Y into something".

  • makeitdouble a year ago

    Another aspect of this: more often than not Y is a solution that has side benefits that are not explicited in the request.

    The obvious ones are buying a new computer to use a resource intensive software. There might be options to upgrade the existing parts to cleanly meet the requirements, borrow/rent a machine for the length of the project, spin up a machine in a cloud, straight ask someone else with an adequate machine to inherint the task etc.

    Those could all be more optimal solutions, but I'd still totally ask for a new computer instead.

  • kelnos a year ago

    In my case it's very often the opposite: I have already thoroughly examined potential solutions Z, W, V, and Q, and have found them to be unworkable, decided that Y is the path forward, but am not sure how to implement it.

    And then I have to spend two hours explaining X, and then patiently explaining why Z, W, V, and Q don't work before my colleagues finally agree with me that Y is what we need to do. Sure, very very occasionally do they come up with alternative T or perhaps K, that I hadn't considered, but I usually find that Y is still the way to go, or at least workable solution of similar complexity.

    • larschdk a year ago

      This is what working with people is like. You will need to make your case and get buy-in from people if you expect their support. You can't just bluntly expect them to respect your conclusion. If you fixate on your conclusion, you will be unable to explain your reasoning getting there, since it will seem irrelevant to you now that you are sure your conclusion is solid.

      Understanding what doesn't work is also an important part of understanding the problem.

      If One Is Truly to Succeed in Leading a Person to a Specific Place, One Must First and Foremost Take Care to Find Him Where He is and Begin There. -- Kirkegaard

      I am often in a situation where a developer is asking help for Y and I'm wondering why he's doing that instead of Z, W, etc. He might be right in going for Y, but I still need to adopt his reasoning, if I am to defend the solution on a system and organizational levels, for reasons like budget/resource/risk/customer experience/technical debt, and ensure buy-in from other stakeholders (product managers, commercial stakeholders etc).

edude03 a year ago

My biggest frustration when asking for help is somewhat similar problem where others offer solutions that sound simplier but are more complicated in practice for example

Me: I'm having an issue setting up a feature in kubernetes

Foo: use bash instead it's much simpler and you can solve your problem with one setting

Me: ah ok, let me tell my team of 70 devs we're uninstalling kubernetes and writing our own orchestrator in bash because Foo on IRC says it's simpler

  • sowbug a year ago

    Sometimes everyone acknowledges and wishes that solving X were the path forward, but for political, inertial, technical-debt, financial, or stubborn customer-related reasons, we must think only about Y.

    These conversations often end with the responder saying "then you should change teams." Which might be the ultimate XY answer.

  • ridgered4 a year ago

    Frylock: Have you seen my towel?

    Master Shake: Just use a paper towel.

    Frylock: I'm taking a bath.

    Master Shake: They're right in the kitchen, just go get 'em!

  • reportgunner a year ago

    Would you prefer that Foo who (let's assume) doesn't know how to solve this in kubernetes would have stayed quiet?

    • superbatfish a year ago

      Personally, I think I would, at least at first.

      If someone without the necessary expertise chimes in with an unhelpful answer within minutes of a question being asked, then everyone who comes after must check their answer before deciding if the user still needs help.

      But even worse, I think potential responders on StackOverflow may not read the question at all because it will be listed as already having an answer. It won’t be an accepted answer, sure. But it still disincentivizes attention to the question. (I know it certainly disincentivizes me when I go looking for SO questions to answer.)

      If a question has gone unanswered for hours or days, then sure — offer whatever advice you’ve got. But before then, you’re just adding noise, and actually reducing the chances that the OP will get what they were looking for.

billpg a year ago

"Suppose I'm trying to allow multiple threads access to a Dictionary object."

"You should use a ConcurrentDictionary."

"Okay, but I'm actually asking about ways the compiler could help out with code duplication. I'm not actually trying to protect a Dictionary object."

"A ConcurrentDictionary would fix that."

"What I'm looking for is some way the C# compiler could help adding a wrapper to many functions. The Dictionary object was just an example."

"I've read your problem and you should use a ConcurrentDictionary."

(Screams in XY.)

  • dicytea a year ago

    There were 2 suggestions for the asker to use ConcurrentDictionary before the asker clarified, and 1 more afterwards (probably because the answerer didn't read through the whole thread).

    Other than that one response, this looks like a very constructive back-and-forth (which could've been way shorter if the asker presented his case accurately without exaggerating it), so I don't really see what's wrong with it.

omnicognate a year ago

How about the IH problem: mistaking someone who is asking for information for someone who is asking for help?

Or the P problem: being so patronising that, not content with patronising individuals one at a time, you buy a domain so you can patronise the whole world.

zamadatix a year ago

Example 1 is fantastic in that it clearly conveys how to avoid an oft forgotten portion of the XY problem: the XY problem problem. Personally, I think the amount of time spent attempting a literal answer before inquiring along the lines of if it's an XY problem should be proportional to the latency of the communication. Talking through a scenario where it turns out it wasn't an XY problem isn't really much of an inconvenience to do in person. Talking through the same scenario in a forum or email can be grating.

  • teo_zero a year ago

    Could the XY-problem problem be called the (XY)² problem?

xavdid a year ago

We have a phrase to cut through this at work: "WAYRTTD".

Someone will post a question and immediately below it, clarify why they think that'll solve their problem. e.g:

> How do you assert that a jest mock was called?

> WAYRTTD: My test passes, but I'm not sure function X was called and I'm worried it's passing anyway.

Helps keep people on the right tracks more often than not.

  • Nezteb a year ago

    This took me longer than I’d like to admit to decipher: “What Are You Really Trying To Do”

    • kimixa a year ago

      This feels like an acronym that takes longer to mentally decode than just writing the thing out.

      I've never heard of this one (or at least not seen it commonly enough to actually be worth remembering), and at least for me formulating a comment takes much longer than the act of typing it, so I'm not sure what exactly is saved in cases like this.

Semaphor a year ago
Doxin a year ago

To stack overflow people: for the love of god please answer X before launching into your XY diatribe. People are on average not dumb, there's probably restraints preventing a solution to Y being workable.

petabyte0 a year ago

This thing is some sort anti-intellectualism that's rampant in StackOverflow. Along with saying that X is premature optimization or is "Not invented here" etc.

I think a lot of developers get infected by this mentality and stifle their learning by handwaving that it's not important instead of just diving deep and being able to solve any technical problem

cpach a year ago

In my org there are a few persons who really like to link to this site.

It often comes of as condescending. Like, “are you sure you really know what you’re doing?”.

In their case, it’s also a giveaway that they are not good at seeing things from someone else’s perspective. Because if they were, they could approach the question in a much more constructive and graceful manner.

  • pie_flavor a year ago

    Of course you don't really know what you're doing. That's why you asked for help doing it. That's the whole meaning of the question. The error is not in the answerer assuming the asker doesn't know what he's doing, the error is in the asker treating the ability to ask the right question about the problem as a different category of ability than the one required to solve the problem, and so getting offended about the additional implication they don't have that former after admitting they don't have the latter.

nemetroid a year ago

Every time this is posted, several people complain in the comments (with support from other commenters) that they get XY'd even though their question isn't nonsensical and can they just get an answer please. But every time I've seen a complaint supported by an example, it has been a clear XY problem.

_dain_ a year ago

When this gets posted on HN, most of the comments are about how it's more common for answerers to incorrectly suggest that it's an XY problem, when it really isn't.

I think this is because most HN commenters are pretty good at programming already. Chances are, they're asking about more esoteric issues, and have considered the problem in detail before writing the question. So when someone suggests the question is an XY-question, it's probably not.

But the bulk of people asking programming questions are not very skilled. They're newbies. They have weakly developed mental models and taxonomies, they don't have much experience of independent debugging, they don't know how to effectively read documentation, and they haven't developed the meta-cognition needed to recognize that a strategy is probably unsound. And they don't have experience with "technical forum culture" (e.g. give a minimum reproducible example, or even basic things like how to format code properly). Many of them are literally kids or teenagers asking about homework problems, so on top of the lack of programming maturity, there's a lack of everything-maturity.

That big latter group is where most of the XY problems are coming from. I can tell you from answering lots of questions on beginner-friendly forums, 95% of the time someone says "this is an XY problem", they are right.

kazinator a year ago

Oh just shut up about XY and help me with the Lisp compiler I need to debug so that I can keep track of my record collection.

Without people diverting into Y problems, we'd never have any tools.

tpoacher a year ago

The XY Problem is real, but any literal reference to "The XY Problem" in the context of an answer is typically douchebaggery in disguise.

red_trumpet a year ago

Good read. I don't think Example 2 is an instance of XY Problem though, because Obama immediately figured out Angela's problem. Even in the end his first response is still a legitimate way to tackle the problme. It's just too difficult for Angela.

nullc a year ago

As I recall from prior XYP threads on HN, many comments appear to be XYP baddies brosplaning from an apparent position that other people online are tools that should subserviently respond to their requests, rather than human beings who have their own perspectives and motivations for responding that need to be accommodated when you want them to perform free labor.

Indeed, it's always possible that someone with an XYP shaped question really does actually need the literal thing they are asking. But the expertise of the person being asked says that it 99 out of 100 times they heard a question like that, it was someone who had a deeper level confusion and they've already been burned wasting their time solving the wrong issue many times before. If you deny that their expertise has value why are you asking them?

You know what's worse than someone octuple checking that you're solving the right problem?

Not responding to you at all or abandoning the support channel and not helping anyone at all with related issues anymore. --- which is what happens when people finally get burned out from hearing askers say "Just answer the f*king question!".

Sometimes when you seek support you just have to go through the motions even when you think they don't apply. They might not-- but they help the supporting person achieve confidence that they're not wasting your time and their own time (which ought to be a priority to you, since you're imposing on it! not wasting their time is about the only compensation a person is usually providing in an online Q/A venue), and sometimes they really do help. This also applies to level setting questions ("Is there free disk space?" "Is it plugged in?")-- themselves really a simple XYP (e.g. you think the widget doesn't work, but really you ran out of space and didn't complete the install). Even when your issue isn't XYPed taking a step back to review the basics and explain more of it to someone else can be illuminating.

Don't want to waste a "godawful amount of time" fully explaining? Well think about how the answerer feels answering the XY rutted questions over and over and over again. At least when you get through your task you'll have the reward of a solved problem, often the person helping you doesn't have that much of a payoff on the horizon. Empathy is required in both directions, but in general the greater burden should be on the party initiating the request.

(though even where something like paid support might reverse the burden, the supporters expertise is a good reason to give a lot of slack to the way they want to go about solving the problem.)

An approach that can help is to just anticipate the XY answer and (politely!) explain how your problem isn't the one people might assume and why in your initial question. If you don't know the domain well enough to do that convincingly then you likely don't know if you don't actually have the XYP to begin with. Explaining where you are and how you got there and what you think you've already tried is good-support-requesting 101.

But in any case, the harm to going through the motions and making everyone more satisfied is just part of the cost in soliciting support from strangers.

If the cost is too much for you there is always the option of continuing to work on it on your own. Or maybe try AI: (somewhat outdated, as GPT4 is actually better about correctly warning you about XYP, but at least if you abusively tell it to "just answer the f*king question" you're not harming anyone :) and it doesn't have the freedom to start ignoring you )

  • nullc a year ago

    There is another kind of question that sometimes gets an XYP answer even though it wasn't an XYP: Thats where the asker is trying to get help doing something abusive or anti-social.

    "How can I conceal the nuclear waste I put in the trash so the garbage men will take it?"

    "Have you considered using a hazardous waste drop off site instead?"

    It's possible that the asker hasn't considered that their approach is abusive or that they weren't aware of better alternatives... and even if they fully know that they are asking for help in being a jerk it's often preferable to the respondent avoid the confrontation (and escalation) of calling it out. If the asker really is just confused, responding by suggesting solving a different problem is the right answer. If they're really just a jerk no great harm is done to anyone by giving the benefit of doubt.

    In this case if they're not confused about what they're asking they may well be confused about the kinds of activities the supporters are willing to aid and abet.

    I've seen this most often online in people looking for help spamming, password cracking, hacking computers, deploying censorship, and committing financial fraud.

    Maybe the asker is a sociopath or is simply getting paid enough to discount the harm their actions cause others -- but the same won't apply to the people answering their questions.

revskill a year ago

Question: Does X support Y ?

XY Problem: This question doesn't make sense. Blah blah....

Real solution: Yes, No, Not yet,...

taylorius a year ago

From the title, I thought this must be an article about chromosomes, and why men are all terrible. I thought "Et Tu, Hacker News?" :-)

shagie a year ago

The essay "Cracking the Oyster" from Programming Pearls is one of the early recorded instances of the XY problem. The "looking to solve the problem I think I have rather than the one that I actually have" goes back to some of the early days of programming.

( The following portion can be found at and in a less accessible format at )

> Column 1: Cracking the Oyster The programmer’s question was simple: “How do I sort a disk file?” Before I tell you how I made my first mistake, let me give you a chance to do better than I did. What would you have said?

> 1.1 A Friendly Conversation

> My mistake was to answer his question. I gave him a thumbnail sketch of how to implement a Merge Sort on disk. My suggestion that he dig into an algorithms text met with less than enthusiasm — he was more concerned about solving the problem than furthering his education. I then told him about a disk sorting program in a popular programming book. The program consisted of about two hundred lines of code in a dozen functions; I estimated that implementing and testing the code would have taken the programmer at most a week.

> I thought that I had solved his problem, but his hesitation led me back to the right track. The conversation then went something like this, with my questions in italics.

> Why do you want to write your own sort at all? Why not use a sort provided by your system?

> I need the sort in the middle of a large system, and for obscure technical reasons, I can’t use the system file-sorting program.

> What exactly are you sorting? How many records are in the file? What is the format of each record?

> The file contains at most ten million records; each record is a seven-digit integer.

> Wait a minute. If the file is that small, why bother going to disk at all? Why not just sort it in main memory?

> Although the machine has many megabytes of main memory, this function is part of a big system. I expect that I’ll have only about a megabyte free at that point.

> Is there anything else you can tell me about the records?

> Each one is a seven-digit positive integer with no other associated data, and no integer can appear more than once.

> The context makes the problem clearer. In the United States, telephone numbers consist of a three-digit “area code” followed by seven additional digits. Telephone calls to numbers with the “toll-free” area code of 800 (the only such code at the time) were not charged.

> The programmer was building a small corner of a system for processing such a database, and the integers to be sorted were toll-free telephone numbers. The input file was a list of numbers (with all other information removed), and it was an error to include the same number twice. The desired output was a file of the numbers, sorted in increasing numeric order. The context also defines the performance requirements. During a long session with the system, the user requested a sorted file roughly once an hour and could do nothing until the sort was completed. The sort therefore couldn’t take more than a few minutes, while ten seconds was a more desirable run time.

> 1.2 Precise Problem Statement

> To the programmer these requirements added up to, “How do I sort a disk file?” Before we attack the problem, let’s arrange what we know in a less biased and more useful form.

> ...

> 1.5 Principles

> The programmer told me about his problem in a phone call; it took us about fifteen minutes to get to the real problem and find the bitmap solution. It took him a couple of hours to implement the program in a few dozen lines of code, which was far superior to the hundreds of lines of code and the week of programming time that we had feared at the start of the phone call. And the program was lightning fast: while a Merge Sort on disk might have taken many minutes, this program took little more than the time to read the input and to write the output — about ten seconds. Solution 3 contains timing details on several programs for the task.

> Those facts contain the first lesson from this case study: careful analysis of a small problem can sometimes yield tremendous practical benefits. In this case a few minutes of careful study led to an order of magnitude reduction in code length, programmer time and run time. General Chuck Yeager (the first person to fly faster than sound) praised an airplane’s engine system with the words “simple, few parts, easy to maintain, very strong”; this program shares those attributes. The program’s specialized structure, however, would be hard to modify if certain dimensions of the specifications were changed. In addition to the advertising for clever programming, this case illustrates the following general principles.

> The Right Problem. Defining the problem was about ninety percent of this battle — I’m glad that the programmer didn’t settle for the first program I described. Problems 10, 11 and 12 have elegant solutions once you pose the right problem; think hard about them before looking at the hints and solutions.


I highly recommend the book as it makes you think which was especially important in the days of the limited resources of early computing. And while we are spoiled now with powerful processors and plentiful memory we shouldn't let that make us lazy in our designs.

golemotron a year ago

This title and framing is misandrous.

qez2 a year ago


adastra22 a year ago

Very badly named, given that XY also means “male.”

_kst_ a year ago

If there were a contact link on the site, I'd complain about the black on dark gray text for the examples.

amoe_ a year ago

I'm going to echo what everyone else is saying in this thread -- the inverse problem (YX) is by far the bigger issue with tech questions on the internet in general (mainly SO and IRC). It's common enough that it puts me off asking anything that's not entirely trivial. And yes, ChatGPT mitigates this to a large degree.

However there is definitely a place for pointing out XY problems in a work context, especially if you have to directly deal with the resulting code. You need a lot of shared context to have confidence that you've identified an actual XY problem.