12 ms·
The XY Problem (2014)
- dsr_ 7y agoIf a programmer whom I know and respect in general asks me how she can do X, I tend to start with an answer about X. When a name I've never seen before on a -users mailing list asks me how to do X -- and X is bizarre -- I assume we have the XY problem. We have the XY problem because the Internet is full of newbies at any given point, and we've wasted enough attention-span having sixteen-part conversations about how to extract the IP address from ifconfig output* that we'd really like to know if we can skip all that and answer with "Use a dynamic DNS client, don't write your own." *Don't. Use ip a ... Use awk. ... There are an infinite number of guides to awk, but mostly you need to know how it splits strings into fields and prints the ones you specify. How are you planning on handling machines with multiple IPs, by the way? ... Stop right there. Get a dynamic DNS client.
- vinceguidry 7y agoThe question, "what are you trying to do?" is super useful to remember to ask. I work at a company that's trying to modernize and move to devops for dev environments. Because the infrastructure is not nailed down, this means that every single team needs to have at least one person who understands the devops. The process of learning k8s and grokking the security concerns in the course of a few sprints is not pleasant. This "XY Problem" crops up all the time, but the devops team is absolutely slammed all the time so many times basic queries go unanswered. Everybody has to help everybody else. I don't think anyone wants to go back to the days of rigid development infrastructure so we're kind of stuck with devops until the ecosystem can mature. My great hope is for serverless to take off and so programmers can further specialize. I'm getting tired of learning new languages and stacks every few months or years. Just hand me a biz requirement and let me implement it any way I like.
- jacknews 7y agoOTOH I find it quite annoying, when asking about Y, to be bombarded with questions like 'why would you even do that' etc. Eg, Me: "What's the best trackball in 2019?" Crowd: "Do you have RSI? You probably need a vertical mouse." etc
- zamadatix 7y ago"The XY problem problem" has probably caused me more wasted time on internet searches than dealing with "The XY problem" in real life.
- pezo1919 7y agoYes same here. I easily get annoyed because it really is a rabbit hole. Why do I want anything? Because I want to be happy and successful, lol. Is it broad enough now?
- tobyhinloopen 7y agoWhy do you want to be happy and successful? Maybe you just want some dopamine injections instead
- pezo1919 7y agoYeah. But dopamine injections seem quite random. Maybe I just want to roll a dice.
- jjoonathan 7y agoThat feeling when you spend hours reducing a problem to its simplest form and then the experts pile in to your IRC / mailing list / ticket system / stack overflow post to explain that you must be suffering from the XY problem because your ultimate goal couldn't possibly be to do what the minimized program does. Naturally, they didn't read the part at the top where you explain your ultimate goal. Two days later you make a new post favoring contextual detail over brevity and the same experts pile in to complain that you didn't minimize your example.
- Doubl 7y agoWhy are you using vb6?
- agumonkey 7y agoI just had to left a job after 2 weeks, because as someone new to the clan, everything I said was noise to them. I guess there's a time-to-respect period to go through.
- MrStonedOne 7y agoOTOH, wanting to do y for other reasons, finding an xy SO post on Google, and not being able to get the answer because it went off topic about rather or not y is the solution to X is frustrating. Bonus points, ask y again because the other question answered z only and get it closed as a dupe of the other question.
- enriquto 7y agoI have exactly the opposite problem. I ask, very honestly, for X, and then people incorrectly assume that what I really want is Y. Just give me X or shut up!
- panpanna 7y agoSeconded. The problem is the guy who neither understands X or Y but just has to answer your question. No mister, I don't care about Z. And I don't have the time to explain the problem in simple words to you. Either give me answer on X or stay out of this thread.
- xtiansimon 7y agoOn SO I have to resist the urge to comment on those types of answers. A good wrong-answer makes the original-post & correct-answer couple better. Interestingly, that’s not the case with single-threaded forum ‘discussions’, where the y-answer discussion torches your post. The Q&A-type really shines in this respect, vs the discussion-forum. Just have to say, XY happens on Arch Linux forum a lot. High level of knowledge of many users, versus lots of peeps interested to try Arch who know enough to install and generally maintain a Linux system.
- owenversteeg 7y agoYeah, I would expect the XY problem to be more common with Arch more than anything else. You can go from trying to make sound work to scratching your head at GCC errors very fast in Arch world.
- maxxxxx 7y agoYeah. I hate situations where you have thought about something more than anybody else but you still have smartasses start questioning you after being exposed to the problem for a few seconds. I am fine with people asking questions but they first should have built up some credibility.
- nullc 7y ago> Just give me X or shut up! If that's your attitude, why don't you expect others to think "Just find your own darn answers or shut up!"? :)
- Can_Not 7y agoReal conversation I've had: "Does Django's query builder use prepared statements by default?" "What are you really trying to do?" "I'm trying to find out if Django's query builder uses prepared statements by default..." Not everything is an XY problem. If somebody found that question on SO via Google, they would be pretty annoyed to see it XY'd instead of answered.
- oconnor663 7y agoYeah as a courtesy, if X is easy to answer, it's better to answer it and then ask about Y.
- agumonkey 7y agoThat's probably a highly efficient way to get booted of most IRC channels.
- deleted 7y ago[deleted]
- raverbashing 7y agoWhat happens sometimes is that X is supposed to be simple but it doesn't work or it doesn't work for that specific case, so you're trying to work around it by doing Y (or Z, etc.)
- emilfihlman 7y agoYou are in the small, small, minority. It's extremely bad to not take the XY-problem seriously because you think it doesn't apply to you.
- davidivadavid 7y agoThat's definitely a case where asking that question wasn't warranted. You asked a question about a factual thing. It's essentially a yes/no answer, not a "how to" answer, which are way more prone to the XY problem.
- an_d_rew 7y agoI often have the problem that I want exactly X and thousands of Internet know-it-alls tell me that I want Y. Sometimes they are right. Often they are wrong. Stop making assumptions, people!
- mannykannot 7y agoThese are mirror-image manifestations of the same underlying problem. In the example given in the article, the person asking mistakenly thinks X and Y are effectively equivalent. In your case, the person replying makes the mistake. XY problems are just the tip of the iceberg; many problems are the result of mistaken assumptions of equivalence, and they often go unstated.
- derefr 7y agoThe most amusing variant of the XY problem is when you want a seemingly ridiculous Y, and then, when people inevitably ask why, you tell them about your entirely-novel X, which they still don’t understand the use for, so you have to explain the entirely-novel W that motivates X, and so on... and by the time you’re done, you’ve explained your whole business model, written a ten-page journal paper, and completely killed the conversation—because they don’t feel they have the prerequisite knowledge to talk about A-through-X, so you just get a “good luck with that, buddy.” Even though Y was a concrete problem that they do have domain experience in solving! I call this “going up the rabbit hole.” —— Example (deliberately shortened from its real depth): • I’m trying to invent a novel algorithm for inter-procedural data-flow analysis, because none of the existing ones work for me. • Why? Because I’m trying to reverse a stack machine bytecode with only indirect jumps and no reified CALL/RET opcodes, into a structured inter-procedural control-flow-graph. • Why? Because I want to do program-slicing to recover HLL representations of key-value-store writes that the program does. • Why? Because I want to use them as hints for my runtime execution tracer for said bytecode, so it can emit better traces. • Why? Because I want to put those traces into an OLAP database and I want the data in the DB to be typed. • Why? Because these traces are the only canonical representation of the state of the system, and our business model is allowing auditors to figure out what’s going on with the system.
- 0xffff2 7y agoThis is why on the rare occasion that I find myself answering questions on IRC or Stack Overflow I always start with at least a simple answer to the question asked. Only once I've taken a stab at answering the question do I consider moving on to "but, what are you really doing..." Another related type of question is a question born out of curiosity rather than need. Sometimes you want to do things just for fun to see how they work, but you get shut down every time you ask a question because "you should never do that in production".
- winstonewert 7y agohmm... so I do this in the opposite order... I start with, "hey, you probably shouldn't do this, but assuming for the moment that you really want to for some strange reason..."
- Rerarom 7y agoI agree with the rest of the commenters here that the XY problem problem is a way bigger one. Example: "How do you implement a new system call in the Linux kernel?" "Ah, well, a system call is overkill and leads to compatibility issues, you should try to see whether you cannot solve your problem some other way..." "My problem is I want to understand how system calls are implemented thus I want to go through all the steps of making a new one so that I don't miss something" Or, a more recent one from Reddit: "When will we have desktop computers capable of replicating the feat of Google with AlphaGo?" "Ah, well, we already have distributed computing trained NNs, also there is some research that it may not require such power..." "I'm not interested in Go, I'm interested in the power of future computers!" Seriously, people second-guessing you are annoying.
- leetcrew 7y agotry asking "how can I automate ssh authentication by password?" sometime. I've still never found an answer other than "never do that, here's how to use ssh-agent."
- detaro 7y agoThere's actually a pretty good Stackoverflow answer to this one: https://stackoverflow.com/a/43526842 https://stackoverflow.com/a/43526842 (Which I think is a good pattern: sure, mention the "you probably should consider Y", but show the alternatives as well)
- marcosdumay 7y agoAnd the person's comment after the answer gives him 7 different options (6 since the very start) is "no, I can't use option #1". That's unsettling.
- detaro 7y agoI read the response as "I can't use any of these" - which again leads us to them not asking the "right" question.
- gitgud 7y agoThis presumes that the asker is intentionally concealing information. I think it's better to assume that they just don't know that some details of their problem might be extremely relevant...
- bobthechef 7y agoDepends. This is a matter of prudential judgement. The proper attitude is contextually determined and the linked page lists some qualifications, though still takes too much of a narrow, absolutist attitude. For example, if someone random poses a problem on IRC, the solution to the "real" problem to be solved is NOT the concern or responsibility of the people in the channel. Unless there's a reason to ask for more context, just answer the damn question. Blindly asking the user what they're REALLY trying to solve is taking an intrusive and patronizing attitude. However, if asking will provide helpful context, then that's a valid reason to ask. If the problem as posed seems onerous or contrived, you COULD courteously ask the other person what they're ultimately trying to solve in the spirit of offering to be helpful if the other person so desires, but no one is hiring you do solve the "real" problem for them, so mind your own business. If a coworker approaches you with a question, similar principles apply, but if you're working on the same project and in the same context, it may be natural to ask about what the larger problem is in a spirit of collaboration, esp. when the questions posed by your coworker smell funny. After all, you both share concerns about a project, though again, this does not give you license to automatically wrest the problem from your co-worker. His ticket, his problem. Your role is advisory. So, common sense. Don't be one of those doltish know-it-all jerks who like to run the show. Mind the proper boundaries of concern.
- jypepin 7y agoMost comments here are about how annoying people asking about X are. We get it, sometimes you are asking about X simply because you need to know about X and you know what you are doing. But often, especially when dealing with more junior engineers, I've found this simple to keep in mind and helpful. It's also a good proof of experience to know when to ask about X and try to make sure you understand the context of the question before answering it.
- kwoff 7y agoIt can be telling how people react to being asked about X. I tend to ignore conversations if someone gets annoyed about getting asked what they're really trying to do. Though you do have to consider whether they just don't understand enough about what they want to do, to know what question to ask. A special case of Y questions are the overly abstract or general ones. "How do I [solve this kind of problem]?" It's understandable that people try to build up a repertoire of problem solving techniques, but this can be very annoying if the specific X question is simple to answer, whereas the general question is difficult. Sorry to say, but I tend to also ignore questions (I'm thinking of chat rooms) that seem overly general any more, unless I'm in a mentoring mood.
- will4274 7y agoAgreed. And sometimes X is not permitted or unlikely to be permitted. In my day job, I work at BigCorp and I get questions like "how do I Y without Z?" Often, the answer is "you shouldn't Y without Z. In order to have a consistent UX, all BigCorp applications have a policy that Y is done by Z... What is your X?" And then we can talk about if X really is exceptional. There is a world of difference between a forum like stack overflow where individuals have diverse needs and a forum inside a perscriptive company where uniformity is an engineering or usability booster.
- trevyn 7y ago“I want to make more money.” Yes, but what do you really want?
- almostarockstar 7y agoHappiness, satisfaction, contentment, comfort, security...the list goes on.
- rntksi 7y agoThe problem most often is asking X because I want exactly X, but people assume I want Y!
- nphase 7y agoConversely, there is the XY fallacy: when one [frequently condescendingly] assumes they know better than the person asking, errantly classifies it as an XY problem, and fails to answer the original question.
- waynecochran 7y agoYes. Sometimes X is a hairy problem and perhaps well beyond the scope of what anyone cares about, and Y is a well thought out distillation of a sub-problem. One of the problems I have with stackoverflow is crafting a question so that only those who have the potential to answer the question will answer it. Unfortunately there are always the folks who want to be first to answer the question and don't understand the fullness of the question and proceed to give a quick, poorly thought out solution. This then keeps others from chiming in. For example, in one question I was asking about JS array performance and was using bubble sort as just a way to exercise arrays. Immediately I get folks mocking me for using bubble sort -- they completely missed the point of the question. https://stackoverflow.com/questions/26199420/any-way-to-improve-javascript-array-performance https://stackoverflow.com/questions/26199420/any-way-to-impr... OTOH, there are folks who give brilliant answers. https://stackoverflow.com/questions/36183602/why-is-nodes-object-createfoo-much-slower-than-new-foo https://stackoverflow.com/questions/36183602/why-is-nodes-ob...
- pyb 7y agoIt's commonly because they don't know the answer, but still feel the need to answer something...
- nullc 7y agoFallacy Fallacy. False positives on xyproblem appear to be much more rare and much less harmful than true positives. At the end of the day a good question provides both context and an indication of things that the asker has tried/learned so far. The person being asked is a person, not an answerbot.
- almostarockstar 7y agoIt's quite funny, the number of replies in this thread saying: "No, I really do need Y because I'm special!" Just remember where you are. The XY problem is a far larger problem in a far larger population than HN.
- zamadatix 7y agoI think the article focuses on the real disconnect in it's explanation of the problem. The disconnect being that the step "Others try to help user with Y, but are confused because Y seems like a strange problem to want to solve." is just one extreme in the scenario with the other being "Others ask what it is you're trying to solve instead of talking about the question". For most questions of the nature each extreme is normally a horrible way to approach it. Something like "You can do it via <method> but there might be a cleaner way to do things depending on what you are trying to accomplish in the end" such as the examples in the page goes miles ahead in being helpful and reduces the overall amount of back-and-forth. This doesn't get a fancy label to reference and articles written about it though as that's just known as a "conversation".
- winstonewert 7y agoHere's the thing, if you ask an unusual question, one of two scenarios is often playing out: In case 1, you are a beginner. You have an XY question. But you've never heard of an XY question. You also probably couldn't identify your question as an XY question if you had heard of it. Trying to educate people about XY problem is pointless, because beginners don't see it or understand it or have the ability to apply it. In case 2, you are advanced enough to avoid asking XY questions. You are instead stuck on some esoteric question which you can't resolve by exhausting all your skills. So you post a question on the internet. But you are only asking a question because it is a really hard question. Chances are that most other people cannot answer the question either. So, the only responses you get are people suggesting that you have an XY problem.
- nullc 7y ago> Trying to educate people about XY problem is pointless, I haven't found that to be the case. Neophytes are perfectly capable of asking questions with a reasonable amount of context: they just need to be taught to do so even when it seems unnecessary to them. Polite explanation to this end works. > to avoid asking XY questions. You are instead stuck on some esoteric question which you can't resolve by exhausting all your skills. So you post a question on the internet. But you are only asking a question because it is a really hard question. When you describe the context and the things you've tried so far you will signal to people that you're operating at a level beyond their ability to help. Asking a high quality question is a universally good move for both newbies and experts alike. It takes more effort, but when you are asking strangers who owe you nothing to put in effort on your behalf it can be a demonstration of good faith to put in obvious effort on your part.
- DanielBMarkham 7y agoThere's a money side to this that's also important. Had a friend call me a few months back with a technical problem. "How do I fix Y on my server?" Now I knew that server wasn't bringing in a lot of money, and the Y he wanted to fix could be accomplished the same way with say, 100 bucks of purchasing something else. But I figured it was better if he figured this out himself. So I asked him what X he was using it for. That was it. We never got past that, mainly because he was dead-set on spending a week or two of effort and tens of thousands of dollars on something that was (pretty much) trivial. So after circling the barn a few times on the phones, I gave up. Told him that yes, based on what he was saying he had a fix for Y that was fine. It was just going to take a long time and cost a lot of money. "But there has to be a quicker, cheaper way!" Argghhhh. Yes, there is. But if you can't figure out that you're solving the business problem first, the technical problem second? There might not be one. Technology exists for a reason, and technical problems exist because business needs are not being met. Fix the business problem. It'll drive the tech decisions. It was quite a frustrating call. For both of us. The X of the XY problem might be critical. Or not. People who ask dumb questions get dumb answers.
- fwip 7y agoMaybe just be nice to your friends.
- DanielBMarkham 7y agoI was. We were nice to each other. He's a dear friend. I don't think either one of us were being unkind to the other. I stayed on the call as long as I could. I wanted to help him out. He was just trying to scope down the conversation at the wrong time. I understand his motivations and reasons, but it was premature. I worked with a really smart leader of a large agency many years ago. Not only a nice guy, he was also brilliant and on top of everything. I could see several projects he had were going off-the-rails. Why?. Because he kept asking technical questions and getting technical answers. The questions were fine but context-free. The answers were good but context-free. There was no X. He kept asking Y questions and getting really smart, detailed answers. It was a terrible mess. If you have no context for a technical answer, the only thing an answer is going to do is confuse you. It's like the old joke about the guys getting lost in a hot air balloon. As they passed over a building, they saw some people on the ground. "Where are we?" "In a hot air balloon!" Now that's a joke, but it hides a truth: without context and a shared language you can get answers all day long to questions and not be any better off at the end than when you started. Probably worse off.
- mycall 7y agoI know solution to hiding OS from nmap. Use exotic OS, like ReactOS, XTS-400, Genode, etc.
- lxe 7y agoUnfortunately, the assumption that "someone who's asking for help with something doesn't really know what they want or need " breeds horrible culture. This is evident by the examples in the article and the ones in the cited sources. If someone is asking for help, don't try to shame them into explaining what "they really want". What they want is help with a morsel of a problem they ask, nothing more. If it's not the right path to a solution, they will decide, not you.
- jayd16 7y ago>shame them into explaining what "they really want". You're already starting from a toxic situation where asking for help is somehow bad. Besides, you have the same "I know better" attitude in this case, just on the opposite side. It might get on some nerves to start having to answer "why do you want to do that?" when you're in a siloed culture but eventually people adapt and it just leads to more thought out plans. Asking why just adds more context and it doesn't need to turn into a second guess of the solution. Its better to breed a culture where asking for context is considered a good thing with no emotional baggage tied to it.
- chrisg3 7y agoExactly. And this isn't helped by the fact that reading internet text generally leads to misinterpretations of the authors intent. Note, from the article in the second example: > "Then ASK FOR WHAT YOU WANT!" Likely, the person who wrote that text was not angry, nor frustrated when writing that, but it very much seems that way to a reader.
- cheerlessbog 7y agoWhat else is intended by the capitalization? To me it means shouting and I don't do that unless I'm mad.
- scbrg 7y agoMany people just use it for emphasis.
- 7y ago
- parentheses 7y agoThe conflict between describing X vs Y is also about a few things: - the size of signal: asking a pointed (Y) question saves typing/reading/etc. in some situations - saving the person time and showing that you came to them after some thought (rather than with the original problem) Asking Y can quickly become about X even if you begin by asking Y. e.g. Y: where do I find the foo.bar config value X: I need to implement feature to _k_
- drngdds 7y agoIs it just me or is the XY Problem really poorly named? It's unlikely that anyone could hear "XY Problem" for the first time and have any idea what it means.
- arithma 7y agoMaybe calling it "ButWhy?Problem" would help
- 333c 7y agoWhat about the "Oz problem," as a reference to the man behind the curtain in the Wizard of Oz?
- appleflaxen 7y agoI completely agree. Maybe the "presumed solution problem".
- deleted 7y ago[deleted]
- anoncake 7y ago> n00b doesn't actually want the last 3 chracters in a filename, he wants the file extensions, so why ask for the last 3 characters? n00b doesn't actually want the file extensions either, he wants to <insert purpose of the program he's working>. n00b doesn't actually want <insert purpose of the program he's working> either, he wants not to get fired from his job. n00b doesn't actually want not to get fired from his job either, he wants to acquire money. n00b doesn't actually want not to acquire money either, he wants to avoid starvation. Looks like the answer to "How can I echo the last three characters in a filename?" starts with "Buy some seeds".
- iovrthoughtthis 7y agoGive people context and explain your end goals.
- micimize 7y agoWhile it's an important phenomenon to be aware of, its name fails to carry any semantic meaning. Should be named something like "falsely known solution" or "context stripping" or something
- drngdds 7y agoI'd just call it "asking the wrong question."
- jacinabox 7y agoIt makes me think that whole software projects (and popular ones at that) have fallen prey to the XY problem. For instance, are containers really necessary, or are they shoring up a lack of robust dependency management allowing different software programs to use different versions of the same application simultaneously.
- davidivadavid 7y agoYes, the most common type of XY problems I see is people trying to solve made up problems. It happens to everyone. Lately I was browsing the Google X website [1]. Here's the kind of stuff you find there: WE CREATE RADICAL NEW TECHNOLOGIES TO SOLVE SOME OF THE WORLD’S HARDEST PROBLEMS (Why would you solve the hardest problems as opposed to the most valuable ones? Oh well, let's keep going) How can balloons deliver the Internet to rural and unconnected places? (I don't know, but are we sure using balloons is really the most sensible solution to that problem?) How can kites be used to generate electricity in unexpected places? (I don't know why we'd want to bring electricity in "unexpected places" as opposed to places where it's required, or why kites would be the best solution for that either) Etc. It's very easy to create very hard problems if you impose unnecessary constraints. [1] https://x.company/ https://x.company/
- burlesona 7y agoI just want to point out that the example is really poor behavior on the part of the teacher: Shouting in all-caps to ASK FOR WHAT YOU REALLY WANT is more likely to result in the newbie not asking at all next time. If this is your work environment you need to make it okay to ask questions, and to dialogue about a problem without shaming the learner. (Really that should be civil behavior in any environment.)
- fishtoaster 7y agoOne thing I hate is when the XY problem gets encoded into a knowledge base: 1. It's common for people trying to do Y to ask about X, which is a bad way to accomplish Y. 2. I'm trying to accomplish Z, for which X is a perfectly good option. 3. Every answer on stack overflow for "How to X" is people assuming the XY problem and answering "here's how you do Y instead".
- londons_explore 7y agoCan someone explain the rationale of setting up a domain for just one blog post? As well as seeming like quite a lot of effort, the fact domains expire means that content probably won't past 2 years unless you fancy keeping paying for the handful of visitors it'll get.
- koala_man 7y agoMy rationale for doing this with linuxatemyram.com was so that people would be able to offer this FAQ to someone on IRC or irl without having to Google up that one blog post they once read on that topic. It also helped focus the message by removing all the notion that this is one of many articles on a general tech blog.
- kentonv 7y agoIt's pretty lame that the examples on the page show the answerer not just answering but also talking down to the questioner. XY is a problem that happens a lot, but disparaging people who are trying to learn is not the right response. Here's how that conversation should have gone: --- Q: How can I echo the last three characters in a filename? A: If they're in a variable: echo ${foo: -3} A: However, if what you really want is to get the file extension, it's probably better to handle extensions of any length. Try this instead: ${foo##*.} A: That expression says to find the longest prefix of `foo` that matches the given glob pattern, and remove it. Q: Oh wow! That is actually what I wanted, but it hadn't occurred to me that such powerful pattern-matching would be built into the shell. I already had a solution involving piping through sed, but it was pretty slow and ugly. I noticed that all the files I'm operating on have three-letter extensions and I figured there'd be an easier way to take a slice of a string, since that's a common thing to have built-in. But your answer is the best of both worlds. TIL! --- There's really no need to admonish the questioner for starting with the wrong question. That won't help. It will only make them afraid to ask questions at all.
- sgillen 7y agoI think it is worth telling (politely) the questioner that they really should start by telling people what they really want to do, in order to get better feedback in the future.
- kentonv 7y agoI think the most polite way to tell them is not to tell them what to do, but rather ask: "Could you give us more background on what you're trying to do? It might turn out we know of an alternative solution that avoids this specific problem." This doesn't suggest that the questioner did something wrong, but still helps them learn to provide background details when asking questions.
- Cloudnoob 7y agoBut people don't learn or change behavior if they don't understand the issue. In this case, providing polite and constructive feedback would help them ask better questions going forward.
- koala_man 7y agoI'm one of the people who tend to ask why. Sorry to everyone on this thread who are frustrated by it. From my point of view, I'm really not trying to undermine what you're doing, it's a genuine attempt at getting you the best solution. Here are some examples: >How do I use apt on Fedora? >How do I unroll this bash loop? >How do I multiply this number by 1024 with sed? I could have a lot of fun answering each question exactly as stated and if you say "I know it's the wrong tool for the job but I'm doing it for fun" that's exactly what I'll do. However, it turned out that: >They just wanted to install stuff thinking apt was universal. The better solution was using yum >Their loop was slow and they had read that unrolling was an optimization. The better solution was reducing the number of subshells spawned >They just wanted a result, not to implement an integer multiplication state machine in sed. The better solution was using perl/awk I know some people are jerks about it, and that sometimes you want answers to weird questions. When people do appear to be going down the wrong path though, it would be a disservice to help them do that without letting them know that there's probably a better way. Sorry for any false positives.
- dmd 7y agoI made this slide about XY at a previous job: https://i.imgur.com/hH97U9b.png https://i.imgur.com/hH97U9b.png
- ibudiallo 7y agoI remember in the early days of phone apps, you'd find thousands of different apps that try to solve a trivial problem. It inspired me to make this video: The alarm clock problem https://youtu.be/ebQAM5ADfYQ https://youtu.be/ebQAM5ADfYQ
- dang 7y agoThread from 2015: https://news.ycombinator.com/item?id=10023882 https://news.ycombinator.com/item?id=10023882
- amelius 7y agoThe inverse also happens: You: I want to find a solution to X. Response: you probably don't want to solve X, but rather W. Here's a solution for W, ... You: sigh
- chucksmash 7y agoThis gets reposted now, a day (ish) after I saw someone comment "is this an instance of the XY problem?" I suspect that people are mining data from ("paying attention to") certain posted keywords and then re-posting. How might I disprove the null hypothesis that people are just repackaging highly voted comments? How might I convince myself that I am wrong or right? Please show your work or cite sources.
- hitekker 7y agoLazy social-signaling drives the over-application of the "XY Problem". In a private medium, Questioner and Answerer can delve into the wider context and arrive at a well-informed solution. In public however, any line-of-inquiry is corrupted by its presentation. In the specific context of public Q&A, this means that the motivation of the average answerer is often just to _present_ themselves as knowledgeable without actually being helpful. In most difficult questions I've seen posted on SO, most answerers have neither an understanding of the context nor the basis with which to compose the "right" answer. Compounding this ignorance is that the Answerer fears losing face and also that he or she is not not personally or deeply invested in the question itself. Thus, a clueless Answerer who accidentally or foolishly interjects in the thread, will eventually default to a simple strategy: negotiating the question. Less "digging" and more "dumbing", the question is simplified or distorted beyond its original intent so the Answerer can "answer" or rather discount it. They thereby "resolve" their stake in the question posed: giving them (or at least not hurting) the esteem they crave in the larger group. At the very least, they'll have said something and appeared, in their minds, to be just as smart or smarter than the questioner. StackOverflow's basic design weights against this kind of child's play, since only the Questioner can award the Answerer the checkmark. But I think the more popular Questions still suffer from the transients desperately seeking their ego-fix.
- l0b0 7y agoBasically lifted straight from https://mywiki.wooledge.org/XyProblem https://mywiki.wooledge.org/XyProblem. GreyCat's wiki is the best Bash resource in existence, but the first example is pretty typical for the IRC channel. There's really no reason to berate people. For example, lots of people have never or very rarely been exposed to anything other than three letter extensions (including most DOS/Windows users), and it's entirely possible that they were trying to do something which only involved three letter extensions. Not every script needs to be a completely generic solution.
- rstuart4133 7y agoThe problem comes in many guises. A similar problem arises when someone says "Y" doesn't work. After going on a long trek you find out "Y" is just fine - they had some other problem "X", had done some diagnosis and decided it was caused by "Y" being broken. After many years of being dragged down this rabbit hole my first question is now "what makes you think Y isn't working". If the answer is "because X is doing ...", you've just dogged another hours wasted time in another rabbit hole.
- aib 7y agoI often encounter this problem in the form of newbies asking how to dynamically create variables inside a loop: "foo1 on the first iteration, foo2 on the second, etc." As much as I am a fun of weird little endeavors like programmatically modifying the local scope, my answer is usually along the lines of "...arrays."