The X-Y Problem
mywiki.wooledge.org
mywiki.wooledge.org
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 answerers can be correct, helpful and nice, but getting a least two of those is good enough to be worth listening to.
* 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.
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.
This is an important aspect - what seems obvious and easy-to-solve to an expert can be anything but to a newbie.
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?
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.
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 answers also clog up Google search results when sometimes my problem literally actually is X and not Y.
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..."
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##*.}`
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.
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.
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>
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?
https://mywiki.wooledge.org/XyProblem?action=info
https://mywiki.wooledge.org/XyProblem?action=recall&rev=1
https://web.archive.org/web/20230000000000*/https://xyproble...
https://web.archive.org/web/20140908180346/https://xyproblem...
Definitely seems to be wooledge when you follow the linked sources as well.
make that sixteen years ago: http://mywiki.wooledge.org/XyProblem?action=info
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.
"If I had asked people what they wanted, they would have said faster horses."
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)
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
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.
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.
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.
Which is a little related to: https://en.wikipedia.org/wiki/Five_whys