54 ms·
YX Problem
- renewiltord 3y agoAll of this isn't a problem any more. Claude/ChatGPT is far more helpful than any human. Except, for some reason, in matters of kernel code where there is no substitute for some god-damned message list somewhere in nowhere.
- dmkolobov 3y agoThis article definitely brings to mind hobbyist embedded programming forums, Arduino, Raspberry Pi, etc.
- theamk 3y agoI think those are usually an opposite example? There are a lot of unusual solutions in those areas that people ended up doing for absolutely no reason, simply because they didn't know better.
- lupire 3y ago"YX Problem" aka "geeksplaining" originated right here on HN 9 years ago. https://news.ycombinator.com/item?id=10023951 https://news.ycombinator.com/item?id=10023951 Also a few other takes based on that comment. https://csf.github.io/blog/2018/05/01/the-yx-problem/ https://csf.github.io/blog/2018/05/01/the-yx-problem/ https://yxproblem.wordpress.com/ https://yxproblem.wordpress.com/ (SEO ad farming page?)
- plagiarist 3y agoMy favorite is the version where X=!Y, as can often be seen on Stack Overflow when people specify a constraint that some answers just ignore.
- scj 3y ago"I'm working with a second-party pre-compiled library and don't have a lot of wiggle room. After careful consideration (of both the library and my other job prospects), I want to do $DUMB_THING. Yes, I know it's dumb, but trust me, $SMART_THING is not an option. Unfortunately, $DUMB_THING is not well documented, because it's legitimately a bad idea, so I was hoping someone could fill in some gaps." If you ever help someone in that situation, know that you are a hero among programmers.
- ChrisMarshallNY 3y agoSounds like a classic Beans and Noses thing: https://archive.uie.com/brainsparks/2011/07/08/beans-and-noses/ https://archive.uie.com/brainsparks/2011/07/08/beans-and-nos...
- theamk 3y agoThat's great if you can afford to do this. If someone asks, "I've downloaded SUPER SQL EXPLORER PRO how do I connect to prod database so I can add a few columns", then you don't sit back and wait, you take actions fast, including contacting manager and revoking access if needed. In a less extreme situations, you might have a shared task with quick deadline, and someone else went off to the woods instead of making a working design, increasing load on their teammates.
- scj 3y agoI'd say it's more akin to being dealt a bad hand and trying to work through a strategy to play it well. Sure, you'd like to have been dealt a better hand. But you haven't, and dwelling on that won't help anyone. The problem with this metaphor is that it's easy to describe the contents of a hand. But computer programs are a lot more complex than that, and sometimes it's non-trivial (and possibly NDA violating) to describe why the recommended solution isn't feasible.
- AnthonyMouse 3y ago> sometimes it's non-trivial (and possibly NDA violating) to describe why the recommended solution isn't feasible. It's not just NDAs. A lot of times people are constrained in what they can do for a reason they're not inclined to admit. This is extremely common with office politics or any kind of corruption. The boss demands X because Y would mean not getting kickbacks from a particular vendor, but she can't tell you this so she has to make up some hogwash. Now you have to go ask someone how to do X, and you know the boss's justification is ridiculous but you also know that you can't list "because the boss has issued a rattlebrained mandate" as the reason in a written communication with your name attached to it, so you have to submit the hogwash as the reason or make up your own. Then the person answering the question points out that the proffered reason for doing it is absurd, which everybody already knows, but nobody can admit it. In large organizations this kind of thing happens so often that people become conditioned to not even question it and just follow orders, and then it happens even when there isn't a hidden underlying reason, because there is now a culture of not questioning stupid decisions.
- deleted 3y ago[deleted]
- inopinatus 3y agoWhen all you have is a hammer, everything looks like a thumb.
- brudgers 3y agoI think it predates HN. This is “What is the XY problem” on Meta-StackExchange from 2010: https://meta.stackexchange.com/questions/66377/what-is-the-xy-problem 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 https://mywiki.wooledge.org/XyProblem First revision here: https://mywiki.wooledge.org/XyProblem?action=diff&rev1=1&rev2=2 https://mywiki.wooledge.org/XyProblem?action=diff&rev1=1&rev...
- rezonant 3y agoIt might predate HN but you are looking at the XY problem, not the YX problem. In this case, they are not commutative.
- dotancohen 3y agoIt seems that the YX problem is a derivative of the XY problem. In both cases we solve for X.
- Dylan16807 3y ago> seems If you're actually unsure, then be sure. It's a derivative.
- dotancohen 3y agoIt's a play on words.
- Dylan16807 3y agoCan you explain it? I don't get it. I mean, I see how "derivative" could be wordplay, but I don't see how "seems" is wordplay.
- brudgers 3y agoYes the YX problem has a YX problem.
- joshu 3y agoit didn’t originate here. i remember it being used on IRC #perl and years before this. here is an example from 23 years ago: https://groups.google.com/g/comp.lang.perl.misc/c/rCCGCpipjH0/m/TBQOCAT9154J https://groups.google.com/g/comp.lang.perl.misc/c/rCCGCpipjH...
- rezonant 3y agoThat's the XY problem. This is about the YX problem.
- ShamelessC 3y agoWhy did you think that was the first usage? The conversation linked even implies they’re referring to a previously known concept - no one said “I call this the “YX problem”. Merely reiterated a common cultural touchstone.
- Dylan16807 3y ago> no one said “I call this the “YX problem” 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.
- deleted 3y ago[deleted]
- civilized 3y agoBoth problems come from hiding assumptions in an attempt to focus on a conclusion, which is presumed to be the only relevant information. That's not a bad thing to do in general -- we always have to be selective what we communicate. It's only bad if your hidden assumptions are wrong.
- cjbgkagh 3y agoI wouldn’t say bad as I would maybe say sub-optimal but unavoidable - assumptions have to be made. I’m assuming the ‘bad’ comes from the cumulative ‘microagressions’ to which I would prefer people just toughened-up a whole lot. 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.
- falserum 3y agoI bet that problem was not the answer but how you did it.
- cjbgkagh 3y agoWell the end the result is now I don't answer questions, except occasionally on HN. The end result of all this mansplaining / geeksplaining is nosplaing. I just hope we can make AIs advanced enough to take over before the wheels fall off. She went on to accuse a bunch of other people of some other nonsense so it was really a matter of time rather than the manner in which I answered questions.
- 3y ago
- bena 3y agoPeople who descend into this are kind of missing the point of the XY problem in the first place. 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 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.
- re 3y agoThe amount of information needed before answering a question can and should vary depending on the question itself, depending on the context. There is zero harm in giving an answer about how to draw a square with HTML Canvas, even if the asker actually has a different problem they're trying to solve—they'll probably figure that out pretty quickly. On the other hand, if the question is "How can I encrypt and decrypt credit card numbers for storage in my database", or "What ratio of bleach to ammonia is best for cleaning mold", some inquiry about the broader problem is warranted.
- blt 3y agoYour response seems to assume that "XY-probing" responses are equally good as straightforward responses, but they aren't. If your question is solid, it's really annoying when others try to XY-probe it instead of answering it. 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".
- legends2k 3y agoGraphics programmer here. Many times drawing a square isn't a great option in games; particularly when there are many. The usual approach is blitting them squares from raster/image data which is a mere copy of texture data into frame buffer. If you're experimenting with Bresenham's line drawing or writing a game is the right probing question here.
- camel-cdr 3y agoI think a good answer to a question that you think is an XY problem, should answer both X and Y. 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?
- kevincox 3y agoThe problem is more often that I can answer X, but it is very long, convoluted and odd. Because the question is based on bad premises. If you ask Y it saves us both a lot of time because I can give you a good answer without going down path X in the first place.
- koala_man 3y agoMy favorite example that I see pretty often is "In posix grep, what's a regex that matches lines that don't contain the word `test`?" 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`
- falserum 3y ago> The X answer is a lecture on language theory including the construction and inversion of finite state automata. To be helpful and educational, one must describe/illustrate the failure mode of X. For example just demonstrate how unwieldy pure regex is for more constrained question like “regex to check if there is no ‘ab’ within 3 char string”. “a[^ab].|.a[^b]|[^a][^a].”. (Solution complexity grows with length of the string within which we are searching)
- a1369209993 3y ago> (Solution complexity grows with length of the string within which we are searching) No it doesn't. It's something like '([^a]|a[^b]|a$)*'. In general it scales like '([^a]|a([^b]|$)|ab([^c]|$)|abc([^d]|$)|...)*' (ie, quadratically with the length of the needle, if I haven't overlooked a optimization), but the complement of a regular language is regular, and fixed strings are always regular, so it's always a pure regular expression (including being independent of haystack length).
- ronnier 3y agoAlso see https://xyproblem.info/ https://xyproblem.info/
- TillE 3y agoI've had this issue a lot, usually secondhand (search for a solution to X, find a bunch of forum posts that scold about X being bad and wrong even though it is absolutely the correct approach in my scenario). 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.
- lolinder 3y agoIt might be reasonable to assume of the original asker, but it's unfair to the dozens of people who follow in their footsteps and find their question years later. 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.
- falserum 3y ago> but it's unfair to the dozens of people who follow in their footsteps and find their question years later. Exactly. In similar fashion: duplicate questions are alternative ways how people can find the question. (I.e. Useful for later searchers)
- MisterSandman 3y agoI can see you’re getting downvoted but I 100% agree. StackExchange is so, so bad at this - they will close a question because there’s like a 75% overlap with a different question.
- sodapopcan 3y agoI kind of just YX'd myself in a way. I read all the comments without reading the article first. My brain autocorrected "YX" to "XY" and I kept thinking, "What the heck are all these people on about?? They seem to talking about Y when they mean X(Y)..."
- dsp_person 3y agoI run into "XY Problem" the most when I'm googling X, usually the argument is in the arch linux forum or maybe reddit. It can be infuriating when yes I actually literally have my reasons for doing X, and seeing them dismissed. And then it's extra funny when someone does present the solution (Yes, thank you person!) and then the next response from an admin is something like "Learn not to necrobump. Thread locked". Uhg. Honestly, anytime I see the word necrobump, the info that was shared actually helped me out a lot. Such a dumb rule. I don't care about getting email notifications from 5 year old threads. A better solution for the hard-line no necrobumpers should be a auto-unsubscribe after N days feature. Or since they are such expert authorities I'm sure they could rig up a script or email filter to moderate their own feeds.
- dpkirchner 3y ago> And then it's extra funny when someone does present the solution (Yes, thank you person!) and then the next response from an admin is something like "Learn not to necrobump. Thread locked". Uhg. See also: stalebot, scourge of GitHub.
- creatonez 3y agoI'd say this is firmly a less useful formulation than XY. With wise troubleshooting practices and a good back and forth between the learner and the instructor, most of the time when the instructor is worried about a possible XY, they end up being correct in their intuition.
- retrocryptid 3y ago"if all you have is a nail, anything can be a hammer."
- legends2k 3y agoThe author laments about the relationship being asymmetric when they think it is symmetric. The fact that someone is teaching someone makes this asymmetric, no? Mentor-Mentee relationship is asymmetric. Giver-receiver relationships are asymmetric. Nothing wrong about that as long as both respect each other.
- re 3y agoAlso asymmetric about the relationship is that the asker usually gets something more measurably valuable out of the exchange (getting unblocked on a problem, often one that they're working on for money) whereas the answerer is frequently doing it only out of a sense of altruism, for the satisfaction of helping others, or for their own entertainment.
- account42 3y ago> Frequently the situation is more symmetric 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.
- jannyfer 3y agoOmg. I think this concept kind of explains a phenomenon I’ve noticed on Hacker News. An article gets posted about X. But the top comment is about Y. People pile on to the easy topic of Y.
- vendiddy 3y agoDoes anyone have a concrete example of this to help me understand this better? I found the article a hard to understand because it was abstract with X and Y. Would be nice to see an example with X/Y filled in!
- elevatedastalt 3y agoLet's say you are using an electric space heater to heat up your room and have some questions about the best place to keep it in your room. 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.
- barryrandall 3y agoI see filtering out low-quality answers as the cost of asking for free advice on the internet. As long as the responses aren't abusive or malicious, they represent someone giving their time and effort away for free in an attempt to help a stranger.