TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The XY Problem (2014)

120 点作者 nitinreddy88将近 2 年前

27 条评论

relix将近 2 年前
I often encounter the opposite. I would have a complex problem that I can legitimately solve by something reasonably simple yet I don’t posses the expertise on. Asking how to do Y, I need to spend an godawful amount of time wasting to convince people that no, it really is not an XY problem, and could we just focus on the literal problem description, which you could answer in like 3 minutes, instead of you trying to score points by being able to claim it’s an XY problem.<p>This is because I was not up front about all of the context of course, but to fully explain the context and constraints that I’m working in, which I have already synthesised into my original question, would take two days due to complexity of the problem.<p>Let’s just get on with the problem solving instead of playing the meta game.<p>(I understand that knowing more context might be necessary to answer the question. I am referring to situations where that is not the case)
评论 #36080243 未加载
评论 #36080739 未加载
评论 #36080355 未加载
评论 #36080922 未加载
评论 #36084927 未加载
评论 #36080337 未加载
评论 #36080875 未加载
评论 #36080845 未加载
评论 #36082612 未加载
评论 #36086348 未加载
评论 #36082062 未加载
Semaphor将近 2 年前
There’s always the running joke about people on SO claiming it’s a XY problem when it’s not. Alas, I encounter so many times when the OP did have an XY problem, the answers then solve the actual problem, but I never had an XY problem, have the problem in the title of the post (which no one solved or cared about), and leave without a solution. I wish moderators would adjust titles on SO questions that get updated to a different question.<p>And funnily enough, all threads for this submission have the complaint about the reverse XY problem at the top…
评论 #36080246 未加载
JdeBP将近 2 年前
Mark-Jason Dominus was the root cause of the &quot;XY&quot; name, inadvertently.<p>I, Raymond Chen, Charles Cazabon, and Eric S. Raymond didn&#x27;t use that name at all.<p>A lot of people foolishly chose to go with &quot;XY&quot;, because they thought that what we were saying was silly. I even had bloody foolish people on Stack Exchange complain that I wasn&#x27;t using the sensible name &quot;XY&quot;, when I was one of the people who wrote about this stuff in the first place long before that name appeared. I shouldn&#x27;t be renaming what was known as the &quot;XY Problem&quot; to silly names, they demanded.<p><i>But that was the point</i> that Mark-Jason Dominus and I were making.<p>Calling it something as mundane as &quot;XY&quot; loses an essential part of the concept, which is that the actual question as posed makes no logical sense and blatantly doesn&#x27;t fit what the things being asked about do. All of the people complaining that they&#x27;ve posed questions <i>that make logical sense</i> and then been accused of &quot;XY&quot; problems would likely not have been accused of using chocolate covered bananas to integrate European currency systems. It&#x27;s in part the people who missed our point and pushed to rename to &quot;XY&quot; who have caused all this pain for you who now complain that you&#x27;re being told that your questions are &quot;XY Problems&quot;.<p>Chocolate covered bananas and European currency systems nicely communicate the fact that it&#x27;s not just mundane &quot;X&quot; and &quot;Y&quot;, but it&#x27;s two things that prima facie make no logical sense together. I stressed this three times in my FGA. Mark-Jason Dominus used &quot;logically nonsensical&quot; too.<p>The headlined page here misses this, and waters it down to &quot;seems like a strange problem to want to solve&quot;. It&#x27;s not that the problems are strange and unusual to the answerers. It&#x27;s that <i>they are nonsense</i>.<p>I&#x27;ve never used the &quot;XY&quot; name, myself, and I recommend its avoidance.<p>* <a href="https:&#x2F;&#x2F;jdebp.uk&#x2F;FGA&#x2F;put-down-the-chocolate-covered-banana.html" rel="nofollow">https:&#x2F;&#x2F;jdebp.uk&#x2F;FGA&#x2F;put-down-the-chocolate-covered-banana.h...</a>
评论 #36083246 未加载
评论 #36083294 未加载
评论 #36081324 未加载
CipherThrowaway将近 2 年前
IMO the XY problem problem eclipsed the XY problem in significance a while ago. Q&amp;A communities are full of useless XYsplaining that pollutes search results with non-answers.<p>If you know the answer to someone&#x27;s question, and you want to be helpful and informative, then simply answer it. Follow your answer with &quot;why do you need this btw? there might be a better approach&quot; when appropriate. This is Example 1 from the OP. It&#x27;s great!<p>If you can&#x27;t answer a question then the most helpful thing to do is usually to stay silent. This is where the XY problem problem strikes: know-it-alls who need to have an answer for every question, who have nothing to say but still need to be heard.
评论 #36082947 未加载
评论 #36080917 未加载
pdimitar将近 2 年前
In my life experience, 95% of the troubles with the XY problem stem from the fact that the people are not aware that they have over-fixated on the potential solution Y for the problem X.<p>They quickly assumed it, solidified it in their heads, and then most of the time spent with them is allocated to making them disentangle Y from X.<p>Once that happens, the solution has usually presented itself already at this point -- because the disentangling process involved a healthy amount of discussion.
评论 #36080171 未加载
评论 #36080315 未加载
评论 #36080934 未加载
edude03将近 2 年前
My biggest frustration when asking for help is somewhat similar problem where others offer solutions that sound simplier but are more complicated in practice for example<p>Me: I&#x27;m having an issue setting up a feature in kubernetes<p>Foo: use bash instead it&#x27;s much simpler and you can solve your problem with one setting<p>Me: ah ok, let me tell my team of 70 devs we&#x27;re uninstalling kubernetes and writing our own orchestrator in bash because Foo on IRC says it&#x27;s simpler
评论 #36085128 未加载
评论 #36084728 未加载
评论 #36084742 未加载
billpg将近 2 年前
&quot;Suppose I&#x27;m trying to allow multiple threads access to a Dictionary object.&quot;<p>&quot;You should use a ConcurrentDictionary.&quot;<p>&quot;Okay, but I&#x27;m actually asking about ways the compiler could help out with code duplication. I&#x27;m not actually trying to protect a Dictionary object.&quot;<p>&quot;A ConcurrentDictionary would fix that.&quot;<p>&quot;What I&#x27;m looking for is some way the C# compiler could help adding a wrapper to many functions. The Dictionary object was just an example.&quot;<p>&quot;I&#x27;ve read your problem and you should use a ConcurrentDictionary.&quot;<p>(Screams in XY.)<p><a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;q&#x2F;52312822&#x2F;3568" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;q&#x2F;52312822&#x2F;3568</a>
评论 #36084563 未加载
omnicognate将近 2 年前
How about the IH problem: mistaking someone who is asking for information for someone who is asking for help?<p>Or the P problem: being so patronising that, not content with patronising individuals one at a time, you buy a domain so you can patronise the whole world.
zamadatix将近 2 年前
Example 1 is fantastic in that it clearly conveys how to avoid an oft forgotten portion of the XY problem: the XY problem problem. Personally, I think the amount of time spent attempting a literal answer before inquiring along the lines of if it&#x27;s an XY problem should be proportional to the latency of the communication. Talking through a scenario where it turns out it wasn&#x27;t an XY problem isn&#x27;t really much of an inconvenience to do in person. Talking through the same scenario in a forum or email can be grating.
评论 #36080890 未加载
xavdid将近 2 年前
We have a phrase to cut through this at work: &quot;WAYRTTD&quot;.<p>Someone will post a question and immediately below it, clarify why they think that&#x27;ll solve their problem. e.g:<p>&gt; How do you assert that a jest mock was called?<p>&gt; WAYRTTD: My test passes, but I&#x27;m not sure function X was called and I&#x27;m worried it&#x27;s passing anyway.<p>Helps keep people on the right tracks more often than not.
评论 #36080711 未加载
Semaphor将近 2 年前
2015, 70 comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10023882" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10023882</a><p>2019, 158 comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20068686" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=20068686</a><p>2021, 107 comments: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27061704" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27061704</a>
评论 #36081309 未加载
Doxin将近 2 年前
To stack overflow people: <i>for the love of god</i> please answer X before launching into your XY diatribe. People are on average not dumb, there&#x27;s probably restraints preventing a solution to Y being workable.
评论 #36080826 未加载
petabyte0将近 2 年前
This thing is some sort anti-intellectualism that&#x27;s rampant in StackOverflow. Along with saying that X is premature optimization or is &quot;Not invented here&quot; etc.<p>I think a lot of developers get infected by this mentality and stifle their learning by handwaving that it&#x27;s not important instead of just diving deep and being able to solve any technical problem
cpach将近 2 年前
In my org there are a few persons who really like to link to this site.<p>It often comes of as condescending. Like, “are you sure you <i>really</i> know what you’re doing?”.<p>In their case, it’s also a giveaway that they are not good at seeing things from someone else’s perspective. Because if they were, they could approach the question in a much more constructive and graceful manner.
评论 #36083615 未加载
nemetroid将近 2 年前
Every time this is posted, several people complain in the comments (with support from other commenters) that they get XY&#x27;d even though their question isn&#x27;t nonsensical and can they just get an answer please. But every time I&#x27;ve seen a complaint supported by an example, it has been a clear XY problem.
_dain_将近 2 年前
When this gets posted on HN, most of the comments are about how it&#x27;s more common for answerers to incorrectly suggest that it&#x27;s an XY problem, when it really isn&#x27;t.<p>I think this is because most HN commenters are pretty good at programming already. Chances are, they&#x27;re asking about more esoteric issues, and have considered the problem in detail before writing the question. So when someone suggests the question is an XY-question, it&#x27;s probably not.<p>But the bulk of people asking programming questions are not very skilled. They&#x27;re newbies. They have weakly developed mental models and taxonomies, they don&#x27;t have much experience of independent debugging, they don&#x27;t know how to effectively read documentation, and they haven&#x27;t developed the meta-cognition needed to recognize that a strategy is probably unsound. And they don&#x27;t have experience with &quot;technical forum culture&quot; (e.g. give a minimum reproducible example, or even basic things like how to format code properly). Many of them are literally kids or teenagers asking about homework problems, so on top of the lack of programming maturity, there&#x27;s a lack of everything-maturity.<p>That big latter group is where most of the XY problems are coming from. I can tell you from answering lots of questions on beginner-friendly forums, 95% of the time someone says &quot;this is an XY problem&quot;, they are right.
kazinator将近 2 年前
Oh just shut up about XY and help me with the Lisp compiler I need to debug so that I can keep track of my record collection.<p>Without people diverting into Y problems, we&#x27;d never have any tools.
tpoacher将近 2 年前
The XY Problem is real, but any literal reference to &quot;The XY Problem&quot; in the context of an answer is typically douchebaggery in disguise.
red_trumpet将近 2 年前
Good read. I don&#x27;t think Example 2 is an instance of XY Problem though, because Obama immediately figured out Angela&#x27;s problem. Even in the end his first response is still a legitimate way to tackle the problme. It&#x27;s just too difficult for Angela.
nullc将近 2 年前
As I recall from prior XYP threads on HN, many comments appear to be XYP baddies brosplaning from an apparent position that other people online are tools that should subserviently respond to their requests, rather than human beings who have their own perspectives and motivations for responding that need to be accommodated when you want them to perform free labor.<p>Indeed, it&#x27;s always possible that someone with an XYP shaped question really does actually need the literal thing they are asking. But the expertise of the person being asked says that it 99 out of 100 times they heard a question like that, it was someone who had a deeper level confusion and they&#x27;ve already been burned wasting their time solving the wrong issue many times before. If you deny that their expertise has value why are you asking them?<p>You know what&#x27;s worse than someone octuple checking that you&#x27;re solving the right problem?<p>Not responding to you at all or abandoning the support channel and not helping anyone at all with related issues anymore. --- which is what happens when people finally get burned out from hearing askers say &quot;Just answer the f*king question!&quot;.<p>Sometimes when you seek support you just have to go through the motions even when you think they don&#x27;t apply. They might not-- but they help the supporting person achieve confidence that they&#x27;re not wasting your time and their own time (which ought to be a priority to you, since you&#x27;re imposing on it! not wasting their time is about the only compensation a person is usually providing in an online Q&#x2F;A venue), and sometimes they really do help. This also applies to level setting questions (&quot;Is there free disk space?&quot; &quot;Is it plugged in?&quot;)-- themselves really a simple XYP (e.g. you think the widget doesn&#x27;t work, but really you ran out of space and didn&#x27;t complete the install). Even when your issue isn&#x27;t XYPed taking a step back to review the basics and explain more of it to someone else can be illuminating.<p>Don&#x27;t want to waste a &quot;godawful amount of time&quot; fully explaining? Well think about how the answerer feels answering the XY rutted questions over and over and over again. At least when you get through your task you&#x27;ll have the reward of a solved problem, often the person helping you doesn&#x27;t have that much of a payoff on the horizon. Empathy is required in both directions, but in general the greater burden should be on the party initiating the request.<p>(though even where something like paid support might reverse the burden, the supporters expertise is a good reason to give a lot of slack to the way they want to go about solving the problem.)<p>An approach that can help is to just anticipate the XY answer and (politely!) explain how your problem isn&#x27;t the one people might assume and why in your initial question. If you don&#x27;t know the domain well enough to do that convincingly then you likely don&#x27;t know if you don&#x27;t actually have the XYP to begin with. Explaining where you are and how you got there and what you think you&#x27;ve already tried is good-support-requesting 101.<p>But in any case, the harm to going through the motions and making everyone more satisfied is just part of the cost in soliciting support from strangers.<p>If the cost is too much for you there is always the option of continuing to work on it on your own. Or maybe try AI: <a href="https:&#x2F;&#x2F;nt4tn.net&#x2F;articles&#x2F;aixy.html" rel="nofollow">https:&#x2F;&#x2F;nt4tn.net&#x2F;articles&#x2F;aixy.html</a> (somewhat outdated, as GPT4 is actually better about correctly warning you about XYP, but at least if you abusively tell it to &quot;just answer the f*king question&quot; you&#x27;re not harming anyone :) and it doesn&#x27;t have the freedom to start ignoring you )
评论 #36081883 未加载
revskill将近 2 年前
Question: Does X support Y ?<p>XY Problem: This question doesn&#x27;t make sense. Blah blah....<p>Real solution: Yes, No, Not yet,...
taylorius将近 2 年前
From the title, I thought this must be an article about chromosomes, and why men are all terrible. I thought &quot;Et Tu, Hacker News?&quot; :-)
shagie将近 2 年前
The essay &quot;Cracking the Oyster&quot; from Programming Pearls is one of the early recorded instances of the XY problem. The &quot;looking to solve the problem I think I have rather than the one that I actually have&quot; goes back to some of the early days of programming.<p>( The following portion can be found at <a href="https:&#x2F;&#x2F;tfetimes.com&#x2F;wp-content&#x2F;uploads&#x2F;2015&#x2F;04&#x2F;ProgrammingPearls2nd.pdf" rel="nofollow">https:&#x2F;&#x2F;tfetimes.com&#x2F;wp-content&#x2F;uploads&#x2F;2015&#x2F;04&#x2F;ProgrammingP...</a> and in a less accessible format at <a href="https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;ProgrammingPearls2ndEditionJonBentley&#x2F;page&#x2F;n233&#x2F;mode&#x2F;2up" rel="nofollow">https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;ProgrammingPearls2ndEditionJonBe...</a> )<p>&gt; Column 1: Cracking the Oyster The programmer’s question was simple: “How do I sort a disk file?” Before I tell you how I made my first mistake, let me give you a chance to do better than I did. What would you have said?<p>&gt; 1.1 A Friendly Conversation<p>&gt; My mistake was to answer his question. I gave him a thumbnail sketch of how to implement a Merge Sort on disk. My suggestion that he dig into an algorithms text met with less than enthusiasm — he was more concerned about solving the problem than furthering his education. I then told him about a disk sorting program in a popular programming book. The program consisted of about two hundred lines of code in a dozen functions; I estimated that implementing and testing the code would have taken the programmer at most a week.<p>&gt; I thought that I had solved his problem, but his hesitation led me back to the right track. The conversation then went something like this, with my questions in italics.<p>&gt; <i>Why do you want to write your own sort at all? Why not use a sort provided by your system?</i><p>&gt; I need the sort in the middle of a large system, and for obscure technical reasons, I can’t use the system file-sorting program.<p>&gt; <i>What exactly are you sorting? How many records are in the file? What is the format of each record?</i><p>&gt; The file contains at most ten million records; each record is a seven-digit integer.<p>&gt; <i>Wait a minute. If the file is that small, why bother going to disk at all? Why not just sort it in main memory?</i><p>&gt; Although the machine has many megabytes of main memory, this function is part of a big system. I expect that I’ll have only about a megabyte free at that point.<p>&gt; <i>Is there anything else you can tell me about the records?</i><p>&gt; Each one is a seven-digit positive integer with no other associated data, and no integer can appear more than once.<p>&gt; The context makes the problem clearer. In the United States, telephone numbers consist of a three-digit “area code” followed by seven additional digits. Telephone calls to numbers with the “toll-free” area code of 800 (the only such code at the time) were not charged.<p>&gt; The programmer was building a small corner of a system for processing such a database, and the integers to be sorted were toll-free telephone numbers. The input file was a list of numbers (with all other information removed), and it was an error to include the same number twice. The desired output was a file of the numbers, sorted in increasing numeric order. The context also defines the performance requirements. During a long session with the system, the user requested a sorted file roughly once an hour and could do nothing until the sort was completed. The sort therefore couldn’t take more than a few minutes, while ten seconds was a more desirable run time.<p>&gt; 1.2 Precise Problem Statement<p>&gt; To the programmer these requirements added up to, “How do I sort a disk file?” Before we attack the problem, let’s arrange what we know in a less biased and more useful form.<p>&gt; ...<p>&gt; 1.5 Principles<p>&gt; The programmer told me about his problem in a phone call; it took us about fifteen minutes to get to the real problem and find the bitmap solution. It took him a couple of hours to implement the program in a few dozen lines of code, which was far superior to the hundreds of lines of code and the week of programming time that we had feared at the start of the phone call. And the program was lightning fast: while a Merge Sort on disk might have taken many minutes, this program took little more than the time to read the input and to write the output — about ten seconds. Solution 3 contains timing details on several programs for the task.<p>&gt; Those facts contain the first lesson from this case study: careful analysis of a small problem can sometimes yield tremendous practical benefits. In this case a few minutes of careful study led to an order of magnitude reduction in code length, programmer time and run time. General Chuck Yeager (the first person to fly faster than sound) praised an airplane’s engine system with the words “simple, few parts, easy to maintain, very strong”; this program shares those attributes. The program’s specialized structure, however, would be hard to modify if certain dimensions of the specifications were changed. In addition to the advertising for clever programming, this case illustrates the following general principles.<p>&gt; <i>The Right Problem.</i> Defining the problem was about ninety percent of this battle — I’m glad that the programmer didn’t settle for the first program I described. Problems 10, 11 and 12 have elegant solutions once you pose the right problem; think hard about them before looking at the hints and solutions.<p>---<p>I highly recommend the book as it makes you think which was especially important in the days of the limited resources of early computing. And while we are spoiled now with powerful processors and plentiful memory we shouldn&#x27;t let that make us lazy in our designs.
golemotron将近 2 年前
This title and framing is misandrous.
adastra22将近 2 年前
Very badly named, given that XY also means “male.”
_kst_将近 2 年前
If there were a contact link on the site, I&#x27;d complain about the black on dark gray text for the examples.
amoe_将近 2 年前
I&#x27;m going to echo what everyone else is saying in this thread -- the inverse problem (YX) is by far the bigger issue with tech questions on the internet in general (mainly SO and IRC). It&#x27;s common enough that it puts me off asking anything that&#x27;s not entirely trivial. And yes, ChatGPT mitigates this to a large degree.<p>However there is definitely a place for pointing out XY problems in a work context, especially if you have to directly deal with the resulting code. You need a lot of shared context to have confidence that you&#x27;ve identified an actual XY problem.