What is the XY problem?
When asking questions, how do I recognize when I'm falling into it? How do I avoid it?
What is it?
That is, you are trying to solve problem
This can lead to frustration by people who are trying to help you solve the problem because by the time you ask about it, the solution that you need help with might not have any obvious connections to the problem that you are trying to solve.
How to Avoid
To avoid falling into this trap, always include information about a broader picture along with any attempted solution. If someone asks for more information, or especially a more specific question, do provide details. If there are other solutions which you believe will be suggested and which you've already ruled out, then don't try to avoid going over them again – instead state why you've ruled them out, as this gives more information about your requirements and helps others provide better answers.
A recent IRC conversation for illustration:
This is easier to do in a fully interactive chat (regardless of what mode), but on a SE site, where you polish a post a bit, post it, and then have 5-30 mins, or longer, before feedback, it really helps to head in the right direction from the start.
|show 1 more comment|
The X-Y Problem, as it is sometimes called, is a mental block which leads to enormous amounts of wasted time and energy, both on the part of people asking for help, and on the part of those providing help. It often goes something like this
The problem occurs when people get their train of thought stuck on one approach and become unable to take a step back. Remaining open to having a new look at the bigger picture, these people might find their way back to X and continue searching for alternative solutions.
This "asking a question at the wrong level for the sought solution" is intrinsic to what problem-solving processes are about. Learning is kind of about not knowing, and then knowing more--fumbling a bit through new methods and finding stuff out. Knowing the solution at the level of the solution does not require asking questions.
It only becomes an issue when someone's lack of a dependent piece of knowledge is pointed out to them, and they don't respond by investigating those concepts but persist with "give me teh codez". So I'll say this X Y "problem" is not a measurable characteristic of the question being asked--it is a problem with the way that feedback is processed when someone is advised on their situation.
Case in point...I found this X Y meta post linked in response to this question from a brand new user:
As of now it has received
The negativity toward this question is totally unwarranted. It doesn't really need to be reopened because I answered it already, but what a rotten way to treat a new user asking a fine question. The floating point keys are monotonically increasing, the values are not--the asker knows what the ordering is. It contains a clear question ending in a question mark:
I'm not a mind reader (or if I am, that is beside the point). But I think the negativity is because this person sought an answer besides
So that's not the X Y problem. Could it become the X Y problem? Sure, if there's a process of resisting good advice. But the X Y problem is not "we know C++ and you aren't worthy yet because you're looking for a way to twist bracket notation to get adjacent map elements".
This response was offered:
So people are to punish: "I have located some information that suggests an answer--but it is not shaped how I expect, or the documentation pages are over my head a bit--is there a more natural way?"
...but only if they were right. Had they been barking up the wrong tree and there was a better answer, it's not penalized--because the wise questioner knew enough to know something was up, and asked before proceeding.
There are some things that are on the unconstructive list...like linking to "let me google that for you" as an answer. Seeing 1-rep users get linked to this, downvoted and closed, is the same thing to me. Constructive feedback is stuff like teaching people how to ask with the short self-contained compilable example. This X Y tautology just looks like fluff promoted by bullies who don't know how to (or care to) teach.