Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
The X-Y Problem (wooledge.org)
46 points by dp-hackernews on Jan 19, 2023 | hide | past | favorite | 55 comments


I suspect this will be a highly divisive comment, but - the `greycat` character in these vignettes exemplifies the "knowledgable asshole" stereotype that does more damage than good.

The division is likely to be as to whether this is a good and justified thing - "if they couldn't hack it, they don't belong here" // "respondents do not owe politeness to dumb questioners" - or not. As with many questions, I suspect the answer is somewhere in the middle (though closer to the "or not", IMO).

And just so this comment isn't entirely meta-commentary and actually delivers some value - a broader guide on "asking technical questions" is here: http://www.catb.org/~esr/faqs/smart-questions.html (FWIW the "How To Answer Questions in a Helpful Way" section supports my suspicion that a gentler approach is more productive)

EDIT: I _maybe_ take back the "does more damage than good" claim from the first paragraph based `thethirdone`'s comment below - greycat-likes are probably still a net-positive. But they _can_ do better, pretty easily, and we should push for such improvement both personally and in communities where we are seen as leaders.


I think I would prefer a greycat to be among the people helping me most of the time. Being correct and helpful even if you are not nice about it is still pretty good.

I think answerers can be correct, helpful and nice, but getting a least two of those is good enough to be worth listening to.


You're absolutely right, I wholeheartedly agree, and in fact I think the "greycat-dyad" is the best of the 2/3 situations:

* Correct and helpful - greycat. Still gets you to a solution _and_ you learn something, at the cost of a bit of bruised feelings.

* Helpful and nice - shows you how to go about answering (or asking!) your question properly, though perhaps not solving your immediate problem. Arguably the second-best of the 2/3 options? I'd rather "learn how to learn" than "get the technically-correct (but not actually correct) answer to my flawed question"

* Correct and nice - probably the least-good of the 2/3 options? The querent continues to labour under the misunderstanding that brought them to their incorrect question, and might waste more time (for themselves or others) down the line. Still - better than any one property alone!

That said, let's make sure not to brush under the carpet that _it is possible to achieve all three_; that it costs much less time and energy to be nice than is usually claimed; and that the benefits (an improved personal reputation, a more-welcoming community in which folks aren't afraid to ask questions), though immediately intangible, are considerable.


In my experience the greycats of the world tend to have pretty high false positive rates.

They'll identify people asking X-Y problems and steer them in the right direction, but they'll also be deliberately unhelpful and snarky to a lot of people asking perfectly reasonably questions.

There's another persona similar to greycat who loves to tell people the answer to their question is in the docs and refuse to help. The answer probably is in the docs, but the docs are 500 pages long and the person asking the question doesn't know the right keyword to search for to find the answer, and the answer in the documentation is probably ambiguous or unclear to a beginner even if they did find it.

There's also the persona that identifies the askers problem, and knows the answer but thinks they can teach the asker a lesson by guiding them towards working out the answer on their own. This can be a great approach, but often the person doing this doesn't realize that there's some crucial piece of information that the asker doesn't have that means it's going to be impossible for them to make the logical leap required to get to the answer on their own. From the askers perspective it feels like they're getting Jedi training from Yoda, except Yoda has had a few too many swamp beers.


> the docs are 500 pages long and the person asking the question doesn't know the right keyword to search for to find the answer

This is an important aspect - what seems obvious and easy-to-solve to an expert can be anything but to a newbie.


From being on both ends of this, just answer the question as asked. It’s especially irritating when people essentially overreach and just decide you’re asking the wrong question. You’re saying “no I’m insisting on being more helpful than you’re asking me to be.” Just answer the damn question and let the person run into the next stumbling block. Why be so upset that the problem you’re now imagining hasn’t yet been solved? Your job is done.

The most I think that’s appropriate to do is to answer the question and THEN ask what they’re trying to do. If they bite, they bite.

Truly where does this end. You could say — they’re asking the wrong question for a reason. Sounds like you’re not thinking about the situation right because you’re not staying sharp. Have you tried doing sudoku puzzles? Maybe your mind is clouded due to anger. How’s your relationship with your parents? Have you checked for a gas leak in the room you’re working in?


You're being silly. Why are "answer the question as stated" or "deconstruct the person's entire life to find their ultimate problem" the only logically consistent possible courses of action?

If someone asks a question that suggests something might have been misunderstood, there's nothing wrong with probing a little to find the reason for the question. Maybe the person really does know something you didn't, but it's much more likely that by asking clarifying questions you'll save theirs and your own time.


I was providing a silly example but there is a continuum as you’ve identified. My point is that it’s not your place to decide how far along this continuum to go. It’s the job of the person asking the question.


I think it is your place, because it's your time being taken by people asking questions. It's an often a thankless job people do because they want to help. If you think you might be doing more harm than good by "just answering the question" you're not helping anymore, which then somewhat defeats the purpose many people are doing it. But really, the simpler reason is that, if your helping out others, your giving them your time, so they should respect it, so answering some questions while getting help is part of that respect.


Giving people something they didn’t ask for is an iffy thing to expect respect for. I like the suggestion higher up - answer the literal and then propose why it might not be what one wants to do. The dynamics of how the conversation is happening change things too. In person it’s easy to have long back and forth with detailed explanations and inquiries without taking up much of either person’s time. Online public responses it can easily waste thousands of people’s time if you insist on giving only a partial answer and that’s not really all that benevolent. Between the two (or in between) you get different answers to when an answer type works efficiently.


The person asking the question is frequently not the person with the knowledge to determine this.

The X-Y response shows up frequently on support forums where people are asking questions that show they haven't yet grasped the system they are working on.


X-Y "answerers" also show up on simple, straightforward questions there are no reasons to demand a backstory for.

X-Y answers also clog up Google search results when sometimes my problem literally actually is X and not Y.


A big reason is that you work at the same company working to the same goals. Your "job" is probably more than just answering contextless questions.

A questioner asking "how do I get all of the emails from the production database?" certainly does warrant some additional probing and "what's a regex for valid emails?" might need a "don't do that, we need the validity of emails to be consistent across services even at the expense of correctness so..."


Admittedly when I was writing this I was thinking about the rather narrow case of answering questions on IRC or forums or what have you. Volunteer stuff. It does get substantially more complicated when your job depends on them getting to the answer.


The most important lesson here, is that when you realize that the person is asking for X when they wanted Y, make sure to somehow say something critical, sarcastic, or dismissive. That way along with a bit of knowledge that helps them for a moment, you are also delivering a blow to their self-confidence, that will be a detriment for the rest of the day (or, if they were already lacking in confidence, perhaps many days). This may not work on veteran co-workers, but it will work especially well with anyone lacking experience or suffering from Imposter Syndrome.


Though this is a common issue, it is certainly bothersome when someone _wrongly_ assumes you are experiencing the XY problem and demands a lot of unnecessary information before helping you with something.


Why not respond with both X and Y? e.g. for the last 3 character thing, here would be an appropriate response:

To get the last 3 characters, do `echo ${foo: -3}`. Are you trying to get the file extension though? What if the extension is not 3 characters e.g. `foo.jpeg`? You then want to do `${foo##*.}`


Some more probing might still be needed for the second solution, how a .tar.gz gets handled might depend on the programmer intent, could be different from a .gz hypothetically.


Yeah this is definitely the best response. Unfortunately most people (especially on Stackoverflow) are not as wise as you and will just downvote your question and say "you shouldn't do that".


Because not every answer is as quick and straightforward as your example.


Definitely frustrating for everyone following as well, since answering the question assuming it's an XY problem is only useful to subsequent readers who are trying to solve the same problem and doing it wrong in the same way.

It is not helpful to people who are trying to solve a different problem correctly, who would like an answer to the exact question that the original poster asked, nor is it useful to people who are trying to solve the same problem but in a different, also wrong way - as they will likely never see the post.


In general people don't want to hear that they have a problem from anyone but themselves. I've had so many I Told You So moments with certain individuals that at some point you just assume everything they ask for has been rendered incomprehensible in a game of Telephone, either with other people or with themselves. In public policy they call it, "Something must be done, this is 'something', so we must do it."

Neal Gaiman did a compendium of Norse Mythology, and in it he claims that Thor says, "When something weird happens I always assume Loki is involved. It saves time." That's the line that stuck with me the most out of that entire book.

The people who fall into this category will tune you out while you say over and over "this is going to hurt us next year" and come in with a Pikachu face a year from now when they find out that it's been a year and the chickens have come home to roost.

People, as it turns out, are much more accepting of a team delivering consistently 10% slower than expected versus a team that delivers to expectations one year and suddenly drops by 50% a year later. They can't understand that. They can't predict it. It just looks to them like you've stopped doing what you are paid to do, rather than the truth which is you stopped doing what you were paid to do 2 years ago and you didn't jump ship before the consequences showed up.


How else can I delay needing to actually think through your question??


It's less wasteful of collective time and effort to determine up front that the situation is NOT an X-Y problem than to traipse down the primrose path presuming it isn't only to subsequently learn that it is.

Those who are experienced enough to understand the X-Y problem will recognise and acknowledge this. Those who aren't will often find reason to take offense.

<shrug>


It's also really annoying when people cannot recognize that they have asked an X-Y question :)


Right, it's fine to say that 90% of the time you shouldn't do X, but it's important to understand why you're saying that, and why sometimes you really do need to do X.


Indeed. I think it even deserves a name. The "XYX problem"?


When I was the most active on Stack Overflow, the recommended link for a description of the XY problem was [1]. This was (is?) commonly used in a comment to tell a poster that their question seems dubious, and might not get high-quality answers.

Now I see that it seems to be a more or less exact copy of the OP, which is kind of confusing. Does anyone know the background/ownership?

[1]: https://xyproblem.info/



Your URL (which I've also seen and referenced a lot) sources the OP link at the bottom as "Source 2", so it at least seems the OP link predates this one.


this link is from a (at least in the past) very active person on various IRC Linux and programming help channels who wrote the wiki article at least fifteen years ago.

make that sixteen years ago: http://mywiki.wooledge.org/XyProblem?action=info


Here is the big stumbling block with this, right at this step: "Others try to help user with Y, but are confused because Y seems like a strange problem to want to solve."

Of course it is strange. If it were common, I would have, in my due diligence, already found it. I realize the Internet is filled with idiots who cannot or will not use Google, but it sure makes everything else fairly hard.

Worst is having to specify, in the question itself, "This is not an XY problem," only for someone to try to find some way to make it an XY problem (you almost always can, if you try hard enough, and not just the degenerate case of "You wouldn't have this if you just stopped caring about X.") and then, once you have sufficiently proven yourself, those folks are nowhere to be found.


Reminiscent of, though not exactly analogous to, the apocryphal Henry Ford quote:

"If I had asked people what they wanted, they would have said faster horses."


Something that I think is pretty important to keep in mind is that when handling a possible XY problem, the key is communication. It is good to ask clarifying questions and questions about context when answering a question. It is good to provide context and be open to the possibility that your question is misguided when asking. Insisting that there isn't or isn't and XY problem and being condescending or combative is bad when asking/answering. I suspect part of the reason this link is so controversial is because the "hero" of the stories screws this up horribly.


It's only possible to guess beforehand what you want by wasting considerable time. Look at modern society and how much time they spend pursuing happiness, yet still, nobody knows what they want.

There's a well-known quote from a singer in Argentina that claims, "No se lo que quiero pero lo quiero ya." (translated into I don't know what I want, but I want it now)


This reminds me of the gauss Weinberg scenario where the salesman wanted to buy a another fax machine cuz they burnt out the previous one.

Or, in other words, we don't have any XY problems, what we have are people not properly educated. This is a long-standing problem and we do not have to make up a newfangled name for it


Exactly, the XY problem happens because of ignorance. You can't ask X if you don't know X exists.


That's not what the XY problem is. The XY problem is asking for Y because you think it's the only way to solve your actual problem X. It's more of a lack of perspective than a lack of education. You tunnel-vision on what you think the solution will be, and when you go looking for help you you ask only about Y, instead of providing the larger context of X.

You can't have an XY problem unless you're trying to solve problem X. It's not a lack of education, it's a lack of perspective on what your real goal is.


If you don't know you're trying to solve for X you will get the XY problem though - that's ignorance or lack of education.

The last 3 letters is a perfect example. If you've only been exposed to 3 letter extensions and think that extension == 3 letters because you've never seen anything else it might not occur to you to ask how to get a file's extension.

If you don't know the thing after the . is called an extension and you're looking at an ls of a directory where every file has 3 character extensions it won't occur to you to ask how to get the extension of a file.

Yelling at a person who doesn't ask how to solve X when they don't even know that they should have asked X isn't helpful to anyone.


Whether you know it's called an extension or not, you know it's the part of the filename after the dot. That knowledge isn't missing. The perspective to understand it's what you should be asking for is.


The thing that always annoyed me with the last 3 characters question is that it assumes everyone knows everything. Relevant XKCD: https://xkcd.com/1053/

The noob clearly thought extensions are always 3 characters because that's the only thing they've been exposed to. They didn't know "how do I get the last 3 characters in a filename?" and "how do I get a file extension?" are different questions. It may not have occurred to them to ask how to get the extension, and to take it further, maybe they don't know everything after the . is called an extension.


A decreasing percentage if otherwise IT-literate people know about the 8.3 limit introduced by DOS that is slowly fading into history.


Maybe more familiar as the response: "What are you really trying to do?"

Which is a little related to: https://en.wikipedia.org/wiki/Five_whys


Followed immediately by "You don't want to do that. I, some internet guy, know what you really want to do even though I have no understanding of the constraints you are working under or what you're ultimately trying to accomplish!".


It used to have better connotations (such as when coming a good sysadmin), than it got from the same phrase being used on, say, StackOverflow.


As the saying goes, half of problem solving is about asking the right questions


From the title, I thought it might be just another rant about people with certain chromosomes (also called males).


I don't think we need to evangelize what smug gatekeepers already far over-apply across many domains


I can see why the author would want to write about the X-Y problem, but what we really need is a way for those trying to answer to quickly discern if an X-Y problem actually exists. When it doesn't, the querent finds themselves at an unending cycle of attempting the clarify and justify in an insatiable appetite to convince them they are solving the wrong problem. The author really should be writing about that.


Why do you think people have trouble identifying X-Y problems? ;)


Parent is saying that the author has an X-Y problem.


Parent has suckered you into an X-Y problem conversation.


I suppose I might have disproved my own disbelief that this is a problem.


That's the Y-X problem...


This resonates so much. Literally the biggest lesson in my IT career was to always ask "what problem you are trying to solve" to every question.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: