Happens all the time in Stack Overflow.
Just answer the fucking question, and then give the lecture on why you think it should be done that way, or why it shouldn't be done at all...
Happens all the time in Stack Overflow.
Just answer the fucking question, and then give the lecture on why you think it should be done that way, or why it shouldn't be done at all...
This isn't something you do by discussing how unfair other people are. It's something you do by communicating the constraints you're working inside, your knowledge of more typical solutions, and why they don't work for you.
If you aren't providing that information, you're wasting the time of everyone who is voluntarily helping others. It's not their fault that you're not providing critical information for answering your question effectively.
When you're the special case, you have to communicate that fact. It's just wasting everyone's time when you expect others to know it without communication.
There are two failure modes though:
1) You really want to do Y, not X. You are not asking the question, just searching for the answer, and find that "how do you do Y?" question, and the answer is "do X instead". Because you're a special case, these answers will likely dominate your search results.
2) You decide to ask the question. You make it very clear that you want to do Y, not X. Your question is closed as a duplicate of the one whose answer was "do X".
Typical situation: I get called in as a consultant/freelance/whatever, I inherited X. I can make a small patch if I can do Y. Even when I preface it with "I would normally rewrite X correctly, but that touches on all systems, how can I do Y?" It turns straight into an argument about doing X right.
It's like I'm driving, make a left turn and end up lost. They are telling me to make the right turn at Albuquerque instead of the left.
Other scenario is that I'm trying to glean some insight on the language and I'll reduce a problem to bare basics and ask something like, "what's going on here?" They will answer "don't use that, use X library instead." That wasn't the question, the question was what's going on with the programming language -- why is it acting weird. I know that nobody would write the code that way, I isolated the problem to specifically inspect a single element.
But that's not what the XY problem is about. There is no case where "you should have bought a Toyota" is a valid response to "how do I change the spark plugs on my Lotus?". That's just internet jerks being... Jerks.
People hit that XY button more than needed, and I have seen this even in the earliest days of Linux. I remember, pre-Google, when asking some questions on IRC about recompiling the kernel for my distro, I would get smart-ass responses like "What you should have done is selected this other distro."
It's led to me rarely asking questions if I think the issue could be construed as XY.
I ask a quæstion about a specific, unusual grammatical form in a language I find hard to understand, and I am met with “You should instead phrase it in this more basic way that you already understand.”.
I am obviously not asking how to translate the specific example sentence I conjured up, I am asking about how to use the specific grammatical form I inquired about.
and the question was marked as a duplicate of a "how to do X?" question and closed.
I've also had plenty of good experiences on StackOverflow, so YMMV, but in general I've found other forums better.
Well, that's strange, because what they do is still divining. They try to divine "what you actually wanted", even though you asked another thing.
Even worse, a lot of the time the one doing the asking has explicitly said "I know this is unorthodox" or "just answer how to do Y please, don't give me your 'better' options".
It's especially annoying when what you what to do is hack something (and not do it the official way), bypass some restriction that absolutely prevents X, try an alternative style, push the envelope, or generally think Y is better even though the "conventional" sheep-like answer is "do X".
An example of the latter would be trying to use Java with simple POJOs and lite patterns in ~2005, and everybody suggesting you go through some monstrous J2EE setup with half the GoF book thrown in instead because that's "idiomatic".
Or e.g. trying to ask about trying to use a regex to quickly parse some known-quantity HTML where regex will work just fine (say, extract all href out of all a elements), and everybody insisting they lecture you on proper html parsing instead, not caring about your use case.
Regex doesn’t work fine even on that. You still need to tell apart actual tags from contents of attributes, comments, uninterpreted contents of <script>, and so on. A regex alone doesn’t give you the ability to do that. If you want to parse HTML, you need a parser. Simple as that.
Like, I know "<div.+>.+foo\s+([a-z]+)" will work, because I've crafted it for a specific site whose sources I've seen.
Most of the time it works just fine for my purposes.
And it's not like I don't know alternatives. And I've written a toy compiler in the past (C with classes subset), done heavy XSLT work, know how to write a parser (manually, with flex/yacc, with PEG), have parsed XML with SAX, DOM, XOM, have used xpath expressions, css and jquery selectors, and used libs like BeautifulSoup.
Most of the time a quick regex will do just fine for that purpose.
See, I don't intend to send the href's to the ISS or to some medical equipment that will blow up if, god forbid, I accidentally found an A tag in a comment or inside a script or attribute.
And I'll probably run another regex or simple editor or awk filter to get rid of some false positives and I'll be fine.
>If you want to parse HTML, you need a parser.
That's a tautology, so it's always true.
If on the other hand you just need to extract some information from an HTML file, and you can just open the bloddy file and see its structure and it is perfectly servicable with a regex, you might not need a parser at all. Simple as that.
What possible question could you have for an online forum?
After being burnt by a person who never wanted to do anything in a conventional, well-supported way* and kept making that explicit request, I have given up volunteering my time to appease them.
At work I get paid to say "I know a couple of ways of doing that, but if you could tell me more about your problem and the constraints, I can give a better answer."
*Problem: router and three laptops need to be networked. Conventional solution: ethernet cables or wifi. Requested solution: IP over serial (SLIP or PPP) over USB-serial connectors. Had not purchased USB-serial adapters.
That's fine and completely fair. Just don't provide unasked for answers as an alternative.
Then don't make them devine, outline your X in a short sentence.
Ignore those who still divine.
Listen to those who tell you that Y is really hard, but to solve X, you can try Y' instead.
Nobody is making them devine, they do it themselves and pat themselves on the back for reading that XY problem article and spamming XY "answers" everywhere.
I've never asked a question on Stack Overflow, but many, many times I have entered a question into a search engine, received a Stack Overflow link with my question at the top, and been greeted with several screens full of text none of which is an attempt to answer the question.
In other contexts Stack Overflow's conventions are set up on the understanding that they're trying to produce a curated database of questions with their answers, rather than acting as a technical support forum for individuals. It's a real shame that culture doesn't extend to dealing with this case properly.
(The most common case is where the question is something like "does A provide a function for doing B?" and the correct answer is simply "No".)
I strongly disagree. The base assumption is to take it at face value, and therefore should be to answer it that way. The recommendation that comes after is always the optional part. You're wasting everyone's time if you give the Y only, and optionally the X.
The irony here is that the only divining happening is assuming that I should be doing Y when I specifically asked for a solution to X.
What you're proposing also requires me to divine all the ways that people will say "Don't do X, do Y." and explicitly state how I don't wish to do Y but really just want to accomplish X.
"I'd like to accomplish X. No I can't do Y1 since E1, no I can't do Y2 since E2, ..., Y_N since E_N. Please just stick to X."
It would be better if people just stuck to X in the first place, instead of doing all this divining. It also makes it really frustrating for others who share problem X and search for solutions to problem X, only to get people solving problem Y.
If you do tech support of any kind with random people, it's pretty clear that a majority simply don't know what's available, or why Y may not be a good idea. They need to do a thing, heard that Y can do it, and now they're asking how to use Y - reasonable, but frequently misguided. When Y is dramatically more complex (either harder to set up, or more error-prone to use), recommending X before sinking a ton of effort into explaining Y solves a lot of cases quickly, for both parties.
I just couldn't bring myself to give that jerk credit, so I deleted the question and never logged in again. There are a lot of smart people there, but it's just not worth dealing with them.
Maybe this isn't an XY problem, but I suspect it's just as common (at least on most of the Stack Exchange sites).
[0] Anyone who thinks they know all of C++ doesn't even know what they don't know.
User asks I want to do Y.
The responding party should in my opinion:
- Provide a solution to Y first. This is OP's point.
- Then as a corollary, provide some of their guesswork of what X might be and if it is true, then this is how to solve X without having to do Y.
So, it is still beneficial to n00bs and the uninformed, just puts the direct answer to Y first. That's all OP is asking and I agree with that.
Most of the time, smartass responses go into the guesswork regime by assuming the User wanted to do X. More than often User actually wanted to do Z, it's not always true and it is polluting SO against the spirit of "Direct question ---> Direct answer" because discovery and searching of answers happen through Y, not X. Most people came to SO because of Y, that's how they landed there in the first place.
The bad approach is when the entire thread is full of guesses of what X might be without knowing the full context. Y is nowhere to be found. It breaks the UX of SO.
They could ask their own questions.
I'd rather have a database of specific questions with specific answers than "X-Ys" all over the place.
Again, they should be expected to ask their own questions on the site, so they could get the answers they're looking for. Come on, that's not hard to grasp.
A question like "How to delete a project from Google Cloud Console" [1], should have a clear, definite answer. I wouldn't expect to see something like "this is how you register an account on AWS", just in case "the user is changing providers".
1: https://stackoverflow.com/questions/16621921/how-to-delete-a...
Might also point out that a lot of people finding the question later on Google because they the same question are just trying to do the same assignment, so Stack Overflow is undermining its own stated purpose here.
A. You can't ask "what's the best way to do X" because, for whatever reason, these kind of questions are not aligned with "the site's scope".
but
B. When you ask something specific, you get a lot of "it's better if you do X" answers. I even have had some really nice questions closed because some mods thought I was "asking the wrong thing".
Both behaviors are allowed and encouraged ¯\_(ツ)_/¯.
Don't take the actual problem and pretend it is an easier one you know how to solve just to look smart and/or helpful.
them: how can I do Y?
me: you can do A, but you're probably going to run into B, I'd recommend doing C instead because D
them: ok, well, I'm already too committed to Y, so I'm going w/ A. Thanks!
them, later: hey, I ran into B. Can you help me?
me: ...
At that point, I just accept that sometimes people need to get burned to learn their lesson.
There are also cases where people ask how to do Y, but explain that it's not an XY problem because such and such reasons. These often actually turn into stimulating conversations because now you're in brainstorming territory and it's clear that the conversation is about procuring novel solutions.
IMO both Y should be answered as well as X should be discussed. Why can't an answer have both? The frustrating part is when Y is never to be found on the answer thread.
+ 1 on your username :)
However, at least in the case of stackoverflow, you're getting advice for free, even if it's occasionally unhelpful. You aren't entitled to an answer.
Beep Boop. Insufficient funds. Insert card to continue.
Or perhaps treat other people like humans instead of an answer vending machine?
If you came to learn something you failed if you respond like that to someone trying to help. Hope it was worth it.
I don’t interpret this to mean: I’m entitled to your answer.
That being said, I appreciate answers of the form: “here’s how you do Y. If you really just wanted X, you can do this instead”
for example, a question treating other people like humans: "hi. I need to get the last two letters of a string in Javascript. can anyone help? thanks" is likely to attract a bunch of curious types of 'why do you need to get the last two letters of a string?' type answers, versus posting something deliberately robotic seeming: "javascript: get last 2 letters of string" immediately gets replied with no-nonsense answers from people wanting to drop their knowledge and get stack overflow green checkmark points for being the fastest answerer etc.