<?xml version="1.0" encoding="windows-1252"?>
<node id="542341" title="XY Problem" created="2006-04-10 14:11:27" updated="2008-04-23 15:01:04">
<type id="120">
perlmeditation</type>
<author id="170442">
jdporter</author>
<data>
<keywords>
<keyword rating="">
X-Y</keyword>
<keyword rating="">
Problem</keyword>
</keywords>
<field name="doctext">
&lt;p&gt;
&lt;i&gt;Every now and then I hear people say I might have an "XY problem". What is that?&lt;/i&gt;
&lt;/p&gt;

&lt;h3&gt;"XY Problem" explanations by various people:&lt;/h3&gt;

&lt;blockquote&gt;

&lt;hr/&gt;
&lt;p&gt;
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.
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [id://87035] by [id://19977|Abigail]&lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;
You'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.
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [id://430320] by [id://163683]&lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;
Someone 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.
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [id://327963] by [id://180961]&lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;
To answer question Y, without understanding larger problem (the context) X,
will most likely *not* help them entirely with X.
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [http://groups.google.com/groups?hl=en&amp;selm=m18zt5muq9.fsf_-_@halfdome.holdit.com|&lt;m18zt5muq9.fsf_-_@halfdome.holdit.com&gt;] by [merlyn] &lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;
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. 
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [http://groups.google.com/groups?hl=en&amp;selm=Pine.GHP.4.21.0009061210570.8800-100000@hpplus03.cern.ch|&lt;Pine.GHP.4.21.0009061210570.8800-100000@hpplus03.cern.ch&gt;] by Alan J. Flavell &lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;
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.
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [http://groups.google.com/groups?hl=en&amp;selm=slrn89um8j.5g9.tadmc@magna.metronet.com|&lt;slrn89um8j.5g9.tadmc@magna.metronet.com&gt;] by Tad McClellan &lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;
&lt;a name="mjd"&gt;&lt;/a&gt;
&lt;p&gt;
When people come &amp;#91;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?")
&lt;br/&gt;. . .&lt;br/&gt;
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.")
&lt;br/&gt;. . .&lt;br/&gt;
I guess there's room for both kinds of answer.  Or maybe there isn't
room for either kind.  
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [http://groups.google.com/group/comp.programming/msg/b5111adb8b442fdd|&lt;6lnb70$lct$1@monet.op.net&gt;] by MJD&lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;p&gt;&lt;small&gt;
[Dominus|MJD] also posted an earlier diatribe on the subject, which has become a [wp://Usenet|USENET] classic:
[http://groups.google.com/group/comp.lang.perl/msg/95cdc486540f0edd|Re: I never get answers to questions in newsgroups].&lt;br&gt;
It has been updated several times over the years; 
[http://groups.google.com/group/comp.lang.perl.misc/msg/05d4a39b18d040ad|one version]
appears to have been the origin of the famous "Retardo!" quote.&lt;br&gt;
His latest version is on his website: 
[http://perl.plover.com/Questions3.html|TIP: How to post good questions].
&lt;/small&gt;&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;
Too 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.
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;from [http://groups.google.com/groups?hl=en&amp;selm=bkocrs0rtjcuh95l96pdbatffbpu1plk4h@4ax.com|&lt;bkocrs0rtjcuh95l96pdbatffbpu1plk4h@4ax.com&gt;] by [bart] &lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;

&lt;p&gt;
[wp://XY sex-determination system|Men].
&lt;blockquote&gt;&amp;mdash; &lt;i&gt;by [jdporter|me], just now.&lt;/i&gt;&lt;/blockquote&gt;
&lt;/p&gt;
&lt;hr/&gt;

&lt;/blockquote&gt;

&lt;h3&gt;See Also&lt;/h3&gt;

&lt;p&gt;
&lt;!-- caution: these ID number apparently change each time he releases a new version of the document! --&gt;
ESR's &lt;i&gt;[id://519271]&lt;/i&gt; includes a [http://www.catb.org/~esr/faqs/smart-questions.html#id307783|Q: How can I use X to do Y?]
&lt;/p&gt;

&lt;p&gt;
[id://6672] suggests that people try to answer both the X and the Y.
&lt;/p&gt;
&lt;p&gt;
[id://233565] is an excellent article by [merlyn], where he quotes [http://lists.apple.com/archives/Unix-porting/2003/Feb/msg00057.html|this message he posted] on the &lt;tt&gt;unix-porting&lt;/tt&gt; mailing list.
&lt;/p&gt;

&lt;hr/&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-170442"&gt;
We're building the house of the future together.
&lt;/div&gt;&lt;/div&gt;
</field>
</data>
</node>
