Every now and then I hear people say I might have an "XY problem". What is that?
You want to do X, and you think Y is the best way of doing so. Instead of asking about X, you ask about Y.
— from node 87035 by AbigailYou're trying to do X, and you thought of solution Y. So you're asking about solution Y, without even mentioning X. The problem is, there might be a better solution, but we can't know that unless you describe what X is.
— from Re: How do I keep the command line from eating the backslashes? by revdiabloSomeone asks how to do Y when they really want to do X. They ask how to do Y because they believe it is the best way to accomplish X. People trying to help go through many iterations of "try this", followed by "that won't work because of". That is, depending on the circumstances, other solutions may be the way to go.
— from node 327963 by Limbic~RegionTo answer question Y, without understanding larger problem (the context) X, will most likely *not* help them entirely with X.
— fromby merlyn A.k.a. "premature closure": the questioner wanted to solve some not very clearly stated X, they concluded that Y was a component of a solution, and now they're asking how to implement Y.
— fromby Alan J. Flavell The XY problem is when you need to do X, and you think you can use Y to do X, so you ask about how to do Y, when what you really should do is state what your X problem is. There may be a Z solution that is even better than Y, but nobody can suggest it if X is never mentioned.
— fromby Tad McClellan When people come [in here] asking how to do something stupid, I'm never quite sure what to do. I can just answer the question as asked, figuring that it's not my problem to tell people that they're being stupid. . . . But if I do that, people might jump on me for being a smart aleck, which has happened at times. ("Come on, help the poor guy out; if you know what he really need why don't you just give it to him?")
. . .
On the other hand, I could try to answer on a different level, present a better solution, and maybe slap a little education on 'em. That's nice when it works, but if it doesn't it's really sad to see your hard work and good advice ignored. Also, people tend to jump on you for not answering the question. ("Who are you to be telling this guy what he should be doing? Just answer the question.")
. . .
I guess there's room for both kinds of answer. Or maybe there isn't room for either kind.
— from <6lnb70$lct$1@monet.op.net> by MJDToo bad that the more general problem, X, is often considered off topic for this forum. Y has more of a chance to look like a Perl problem.
— fromby bart
See also node 233565, an excellent article by merlyn, where he quotes this message he posted on on the unix-porting mailing list.)
Excellent++! We can now post a reply along the lines of "I think you have an XY Problem. You are asking us how to do Y, but ..."
CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
Some related problems:
YX Problem: You explain that you want to do X and instead of an answer you're asked "Why would you want to do X?"
XZ Problem: You ask how to get X to work and you're told to do Z instead.
XYZABC Problem: You ask how to do X and after suggesting or getting an answer Y, you get four more alternatives for doing the same thing and no way to choose between them.
XYZPDQ Problem: You ask how to do X and after suggesting or getting an answer Y, you get four alternatives that would be more efficient regardless of whether that is important to you or not.
Humor aside, as Not_a_Number said, ++ for giving us an easy way to point someone to their XY Problem.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
XYP Problem:
You posted problem X and inquired about solution Y, but it turns out that you spelled it (P)ERL.
They ask how to do Z, but that's because they think they want to do Y and think that Z will get them there, but really it's because they're a lunkhead, and that's the main (X) problem.Tongue-in-cheek, of course.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
I want to do X and I know you'll all tell me to use Y but I need to use Z. I can't use Y and I'm not going to explain, I have to use Z and I won't explain that either.
update 1: Don't waste your time telling me about Y.
update 2: Look, I have to use Z. Just tell me how to use Z.
update 3: I give up, you're all fools
Hope that helps :-)
wfsp++
Ha! You gave my my first out-loud laugh of the day ... thanks. :) I think I saw an example of an XYZ problem of this nature just the other day, here in PerlMonks. I particularly liked update 3, very clever. Again, thanks.
update 2: Look, I have to use Z. Just tell me how to use Z.
Heh. Smells like poorly-designed homework, from a prof who's more interested in following grocery lists of programming "skills" to teach than in actually teaching the skill of good programming.
Then there is the (thankfully rare) "my problem is X. I've tried Y." then the respondent gives a perfect solution to an entirely different problem.
emc
"Being forced to write comments actually improves code, because it is easier to fix a crock than to explain it. "Completely unrelated to Perl (but still maintaining a modicum of relevance to this thread) is the YYZ Problem: you want to play the drum solo from the Rush song, YYZ, but you aren't (and never will be) Neil Peart. :/
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
"The programmer's question was simple ... my mistake was to answer his question."
perlmonks.org content © perlmonks.org and bassplayer, CountZero, eric256, gam3, jdporter, jeffa, jonadab, merlyn, Not_a_Number, ptum, rhesa, swampyankee, wfsp, xdg, zentara
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03