Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

44
  • 297
    IMO XY problems are sometimes useful because the answers could help the questioner understand why their solution wouldn't work, and better understand the original problem in the process. Commented Jul 17, 2012 at 16:26
  • 754
    The easiest way to get to the real problem is usually asking Why five times. Commented Oct 21, 2012 at 17:25
  • 30
    Although, if you start off with Y instead of X, you may have to ask why 10 times (or more, apply the 5 whys to every level?). :-) Commented Nov 30, 2012 at 15:10
  • 132
    Why Y - that's the question to ask Commented Apr 23, 2013 at 14:49
  • 156
    To be fair, many times questioners ask about X, and the response is "that's too much, break it down to a small example" and so the poster isolates their attempted solution Y and everybody loses sight of the original problem. Commented Jun 23, 2013 at 23:48
  • 148
    Sometmes you are stuck with Y. In my first job I had to modify a webshop. The codebase was a rotten mixof html PHP and js. There were 2 ways to fix problems: Redo the whole thing (declined by boss) add more tape. SO did not really help me there. "How to y?" "Why would you do that?" "Because I have to" "What is Y / Do not do this/ why are are you using {antipattern}?" "Because I have to" Commented Jul 9, 2013 at 8:46
  • 125
    @OliverA. Then part of the question becomes an explanation of why you need to do Y. "I need to do Y because legacy/boss/old framework" then the question becomes easier to answer, and more valuable to all. Commented Sep 4, 2013 at 5:59
  • 68
    @LegoStormtroopr Except many people don't understand that. They don't understand that sometimes you don't have the luxury of choosing the right approach and just have to band-aid existing code, and the question is closed as too narrow or something... Commented Sep 4, 2013 at 23:19
  • 50
    I made solid attempts to boil all of my questions down to as much of a "Y" as possible. I have no interest in spelling out the entire scope of my issue (especially when working on closed-source proprietary software at my job), and I feel like (excluding dealing with those who insist on traversing up the chain with "why? why? why?") I can get an answer faster by encapsulating my questions off from all context. Commented Feb 14, 2014 at 17:07
  • 16
    It depends on the asker's overall knowledge of the problem space. I agree with n00n, for those more experienced with the alternatives, they may have already ruled out all the possible X's, and now X is a constant, and they just want to solve for Y. It detracts from the question to have to go over all the possible X's that you've already ruled out, and delve into office politics or existing system architecture. Someone less experienced might benefit from having other's review alternative X's and suggest they reconsider that precondition. Commented Mar 20, 2014 at 13:48
  • 37
    The counter-example: Me: Is there any way to change the current directory in Java? Other: In java you don't need to do that. What do you want to do? Me: (sigh) OK, I have an executable jar for a program that listens to a port and exchanges messages. The jar normally sits in x/bin and the configuration sits in x/conf. So, the program reads its configuration from ../conf. Now I want to run that within a tomcat server by calling the program's main method myself. But I have no control on the server's home directory and "../conf" is not an acceptable place. Commented Oct 27, 2014 at 22:34
  • 36
    (cont) So I wonder if there is any way to change the home directory for one thread. Other: Oh, I see. Well, you can't do that in Java. Me: Why couldn't you tell me that earlier? -- In that case, I asked question X and I was answered question Y (how to use files in Java). Commented Oct 27, 2014 at 22:35
  • 45
    Usually, I do not want people to solve my problem, just answer my question. It can be rather annoying when people try helping with the former rather than the latter. Commented Feb 13, 2015 at 17:31
  • 31
    @NoctisSkytower But most of the time every answer is context-dependent... Q: "How can I do X in C ?" A: "There are 20 different ways, each with its own pitfalls and usecases, you can study them yourself and make all mistakes others have made, or you can tell us what problem you want to solve with this and we can give you the best approach!" Q: "I don't want a lecture just give me any answer, I don't care!" - A: "-.- bye." Commented May 18, 2016 at 8:26
  • 24
    Non-programming SE sites link to this answer to explain the XY Problem concept. A more universal (non-programming) example would be even more helpful. Commented Mar 19, 2017 at 22:37