Also a few other takes based on that comment.
https://csf.github.io/blog/2018/05/01/the-yx-problem/
https://yxproblem.wordpress.com/ (SEO ad farming page?)
If you ever help someone in that situation, know that you are a hero among programmers.
the commenter was (unfortunately, inevitably) shat on by a large number of people but it saved me from giving up on tech to live in a cave the rest of my days.
all I could really do was comment with my thanks but that still felt wholly inadequate.
Right, they said "What would you call [it], the YX Problem?"
Is there a meaningful difference as far as coining a term?
The idea of "what if this phenomenon happens in reverse" existed, but adding a name isn't nothing.
This is “What is the XY problem” on Meta-StackExchange from 2010:
https://meta.stackexchange.com/questions/66377/what-is-the-x...
The top answer links to this wiki page that goes back to 2006:
https://mywiki.wooledge.org/XyProblem
First revision here:
https://mywiki.wooledge.org/XyProblem?action=diff&rev1=1&rev...
But realistically, any kind of programming Q&A forum is absolutely flooded with beginners and dolts and literal children, so if you've somehow decided to be a power user that answers a million questions, it's probably reasonable to assume that they really want Y.
I've lost track of the number of times that I need to X (even though I know Y is an option that is probably better in most circumstances) and had to dig through dozens of "do Y instead" answers before finally finding something helpful. More often than not the original asker actually accepts Y as the answer and thanks the responder, but now the search space for X is polluted with yet another non-answer.
I agree with another commenter downthread—the best response when you think you're looking at an XY problem is to answer both X and Y. That way you can be sure that the naive asker is set on the right path (if they are in fact naive), but you're still logging the answer to X so that searches for it don't become useless.
Exactly.
In similar fashion: duplicate questions are alternative ways how people can find the question. (I.e. Useful for later searchers)
When there is an XY problem, Y might be the better option, but most of the time understanding the solution for X is still very interesting.
Also, if somebody can answer Y, but not X, are they really qualified enough to answer the question?
The X answer is a lecture on language theory including the construction and inversion of finite state automata. Absolutely interesting, but a long and dense chapter in a CS textbook with no practical applications.
The Y answer is `grep -v test`
...and here-in lies the problem. It's the hubris that "I am right" that leads people to answer Y instead of X.
Y and X are maybe related, but ultimately, X is empirically what was asked. It's your take that Y is the solution that the asker wants instead of X.
Maybe you are right, sometimes.
It's very unlikely you are always right.
Therefore, it's likely, that sometimes when you do this, you're actually not helping; the answer is X, and your comments about Y are both wrong and unhelpful.
Come on, are you never wrong? We're all wrong sometimes.
At the very least, you can often start answering X (a long partial answer) along with 'and this is why Y is maybe a better solution...'
I suggest that the 'race to be the first answer and get karma for it' is the motivator that drives people to do this on some platforms, rather than any actual desire to help / any actual competence in the question domain / actually knowing what they're talking about in many cases; a partial answer to X is never that time consuming.
...it's just more time consuming than not answering it at all.
> Also, if somebody can answer Y, but not X, are they really qualified enough to answer the question?
Maybe. It could be that there just isn't an answer to X. Or the answer is "you can't", so the author tries to give an answer that is more helpful, in case the asker actually wants Y (it would probably be good to explicitly explain that though). Or maybe there are multiple ways of interpreting X, and the answer interpreted it a different way than you expected.
Quite often the person asking questions is a newcomer and is on the path to making the same newbie mistakes we all made when we started. Knowing what question to ask is half the battle.
I got pulled into HR by a young intern for not answering her stated question and instead suggested she was taking the wrong approach and offered an alternative approach. It was clear to all involved that my assumption was indeed correct but she still took it as a condescending slight. It seemed like to me she was looking for reasons to take offense.
I stopped helping her or other interns after that, let the young’uns figure it out for themselves. I figured my time would be better spent shielding myself from the consequences of the coming competency crisis.
1. The person you tried to help could have taken your suggestions in the spirit intended, rather than leaning on a threatening or insulting interpretation of them.
2. You could structure your response in a way that would make your good intentions clear and make the other person more open to the information and less likely to feel threatened or slighted.
It could even be that, from some reasonable perspective, the other person is 100% to blame for the negative outcome, and still, at the same time, you have the ability to avoid such things in the future by adjusting your approach. It's like defensive driving: I'd rather not have accidents at all, and if it's possible to avoid them, I adjust my driving style accordingly. Regardless of how poorly others drive and how much to blame they'd be for accidents I prevented by being defensive.
That way, we can hopefully get the enjoyment of helping others, and the gratitude of those who are more inclined to be grateful, without the trouble of unintentionally angering those whose response is more... complex.
See also: stalebot, scourge of GitHub.
An article gets posted about X. But the top comment is about Y. People pile on to the easy topic of Y.
Not at all. Usually the person asking has some need and the person answering does not. Seems a bit entitled to complain that the person answering provided the anser they though would best help you instead of the answer you wanted.
Would be nice to see an example with X/Y filled in!
You go to an HVAC forum and post the question. Instead of answering the question (or saying that it doesn't matter where you place it), people instead start lecturing you about how electric heating is very inefficient, and you should instead use a Heat Pump, then give you lots of details about heat pumps which are completely irrelevant to your specific issue.
The XY problem is to get all parties involved in thinking about the actual goal and how to achieve that goal. By presuming you know what the Y is already, you're kinda falling to the XY problem yourself.
Very rarely do we need to, for example, draw a square for the sake of drawing a square, there's usually a larger problem we're trying to solve.
Using this: https://news.ycombinator.com/item?id=10024188 as the example.
None of those responses is actually relevant to solving the XY problem (if it exists). The user wants to draw a square with HTML Canvas. Before suggesting any course of action, we need to know why he wants to do that.
I think this frequently comes up in the form Well actually the idiomatic way to do this is not X but X'; but X really was needed by OP due to some unstated constraint. (Because why would you state it, especially if you're unaware that you're doing it a remarkably unidiomatic way. You're just asking how to do what you're doing.)
Therefore, before giving an XY-probe response to a question, one should think about the probability that the question hides an XY problem.
If the question is about drawing a square, there's no good reason to assume it's an XY problem. Better to just answer the question.
If the question is about something strange that should never come up in typical applications, maybe you can start XY-probing towards the "real question".
For almost all real world questions a more neutral mix of "Well, you could try ${x} by doing ${xthings} but it might also make sense to do ${y} or other things depending on the ultimate goal" actually gets better results faster than a pure XY or YX approach.
I'm trying to draw a square because I need to draw a button. I'm trying to draw a button because I need the user to be able to click it. I'm trying to make something the user can click so they can use this feature. I'm trying to make this feature so the user can do ... I'm trying to enable the user to do ... so my product can be successful. I'm trying to make the product successful so my company can survive. I'm trying to help my company survive so I can keep getting paid. I'm trying to get paid so I can feed my family. ... It goes on.
The XY problem, at least as I usually see it phrased, implies that there's exactly one problem up the stack that the asker should have asked about. There's not. It's impossible to know how much context would be useful and it depends on how much help the asker wants. Sometimes, I just want to draw a square and don't want help redesigning the feature. Maybe sometimes I _could_ use that kind of feedback. I think what's important is to meet people at the level they've asked the question, and _maybe_ suggest that it might be the wrong level. But so often respondents just obnoxiously insist on redesigning the feature when I just need to draw a square.