10 ms·
The XY Problem (2014)
- pdimitar 3y agoIn 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 3y agoSometimes 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 3y agoAnother 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 3y agoIn 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 3y agoThis 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).
- zamadatix 3y agoExample 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 3y agoCould the XY-problem problem be called the (XY)² problem?
- xavdid 3y agoWe 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 3y agoThis took me longer than I’d like to admit to decipher: “What Are You Really Trying To Do”
- kimixa 3y agoThis 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 3y agoThere’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 3y agoYeah, 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 3y agoI 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.
- Semaphor 3y ago2015, 70 comments: https://news.ycombinator.com/item?id=10023882 https://news.ycombinator.com/item?id=10023882 2019, 158 comments: https://news.ycombinator.com/item?id=20068686 https://news.ycombinator.com/item?id=20068686 2021, 107 comments: https://news.ycombinator.com/item?id=27061704 https://news.ycombinator.com/item?id=27061704
- dang 3y agoThanks! Macroexpanded: The X-Y Problem - https://news.ycombinator.com/item?id=34444353 https://news.ycombinator.com/item?id=34444353 - Jan 2023 (55 comments) The XY Problem (2014) - https://news.ycombinator.com/item?id=27061704 https://news.ycombinator.com/item?id=27061704 - May 2021 (107 comments) The XY Problem (2014) - https://news.ycombinator.com/item?id=20068686 https://news.ycombinator.com/item?id=20068686 - June 2019 (158 comments) Ask HN: What's your favorite technical formulation (i.e., the XY problem)? - https://news.ycombinator.com/item?id=17344147 https://news.ycombinator.com/item?id=17344147 - June 2018 (1 comment) The XY problem - https://news.ycombinator.com/item?id=13578522 https://news.ycombinator.com/item?id=13578522 - Feb 2017 (1 comment) The XY Problem - https://news.ycombinator.com/item?id=10023882 https://news.ycombinator.com/item?id=10023882 - Aug 2015 (70 comments) The X-Y Problem - https://news.ycombinator.com/item?id=52486 https://news.ycombinator.com/item?id=52486 - Sept 2007 (1 comment)
- relix 3y agoI 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 3y agoI 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?
- pishpash 3y agoYou're saying the problem isn't what the XY problem is, but that it isn't called Z. So an XYZ problem. /s
- JdeBP 3y agoI 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. * https://jdebp.uk/FGA/put-down-the-chocolate-covered-banana.html https://jdebp.uk/FGA/put-down-the-chocolate-covered-banana.h...
- deleted 3y ago[deleted]
- omnicognate 3y agoHow 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.
- _kst_ 3y agoIf there were a contact link on the site, I'd complain about the black on dark gray text for the examples.
- adastra22 3y agoVery badly named, given that XY also means “male.”
- JdeBP 3y agoMark-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. * https://jdebp.uk/FGA/put-down-the-chocolate-covered-banana.html https://jdebp.uk/FGA/put-down-the-chocolate-covered-banana.h...
- pishpash 3y ago[flagged]
- proto_lambda 3y 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.
- kazinator 3y agoOh 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.
- Doxin 3y agoTo 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.
- deleted 3y ago[deleted]
- revskill 3y agoQuestion: Does X support Y ? XY Problem: This question doesn't make sense. Blah blah.... Real solution: Yes, No, Not yet,...
- CipherThrowaway 3y agoIMO 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.
- pishpash 3y agoThere 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.
- MereInterest 3y agoI 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 3y agoGiven 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.
- petabyte0 3y agoThis 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 3y agoIn 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 3y agoOf 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.
- nullc 3y agoAs 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: https://nt4tn.net/articles/aixy.html https://nt4tn.net/articles/aixy.html (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 )
- billpg 3y 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.) https://stackoverflow.com/q/52312822/3568 https://stackoverflow.com/q/52312822/3568
- dicytea 3y agoThere 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.
- amoe_ 3y agoI'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.
- _dain_ 3y agoWhen 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.
- red_trumpet 3y agoGood 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.
- sdfghswe 3y ago[flagged]
- edude03 3y agoMy 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
- ridgered4 3y agoFrylock: 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 3y agoWould you prefer that Foo who (let's assume) doesn't know how to solve this in kubernetes would have stayed quiet?
- superbatfish 3y agoPersonally, 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.
- sowbug 3y agoSometimes 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.
- taylorius 3y agoFrom the title, I thought this must be an article about chromosomes, and why men are all terrible. I thought "Et Tu, Hacker News?" :-)
- tpoacher 3y agoThe XY Problem is real, but any literal reference to "The XY Problem" in the context of an answer is typically douchebaggery in disguise.
- nemetroid 3y agoEvery 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.
- golemotron 3y agoThis title and framing is misandrous.
- shagie 3y agoThe 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 https://tfetimes.com/wp-content/uploads/2015/04/ProgrammingPearls2nd.pdf https://tfetimes.com/wp-content/uploads/2015/04/ProgrammingP... and in a less accessible format at https://archive.org/details/ProgrammingPearls2ndEditionJonBentley/page/n233/mode/2up https://archive.org/details/ProgrammingPearls2ndEditionJonBe... ) > 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.
- qez2 3y ago[dead]