4 ms·
That may be true but it often ruins StackOverflow as a repository of answers. There’s nothing worse than actually needing to do X only to find a StackOverflow
by CoolGuySteve 5y ago
That may be true but it often ruins StackOverflow as a repository of answers. There’s nothing worse than actually needing to do X only to find a StackOverflow page where 10 different answers give 10 different Ys.
Or when X needs to be done but instead all the comments hector the question with useless criticism.
- shawnz 5y agoIf a subject matter expert thinks that people asking for X are falling victim to the XY problem, then I want to hear about it before I go down the mistaken road of implementing X. If there truly is a circumstance which makes X the right solution, then that might warrant a new question being posted with the additional context to make that so. But I suspect it's much more often the case that the asker is simply being stubborn and doesn't want to change their plans.
- CoolGuySteve 5y agoBut the new question almost always gets closed as a dupe in spite of clarification.
- shawnz 5y agoYes, I could agree with you there. I'm not going to defend the stickler moderators on there (just look how they shut down the interesting comments on the top answer).
- cperciva 5y agoYou seem to be under the impression that people answering questions on SO are subject matter experts.
- robinson7d 5y agoYou’re correct that they often aren’t, but all the same I find it amusing to read this comment attached to a StackOverflow link where the exact person who suggested “gimme gimme gimme” and the implementer both answered. Obviously not the ones making the “why are you $X” comments in this case though.
- shawnz 5y agoRemember the name of the site that SO replaced, "Experts Exchange". Obviously it's possible for non-experts to post authoritative-sounding answers on questions that they don't really understand, but I think that is a different category of problem from the "XY-problem" style answers.
- fegu 5y agoI always read their domain name as expert sex change.
- ballenf 5y agoThere are places to ask the question "I think I need X. Is there a better solution?" But the answer to the question "How to do X?" really shouldn't include more than a passing reference to "Here's how to do Y." If X is impossible, then that is of course the answer. And as others have indicated, the most frustrating scenario that happens over and over is that once the "How to do X" question is asked, you can never get an answer to that question if the original poster relents and agrees that what they really need is an answer to "how to do Y?".
- shawnz 5y agoImagine the question is something like "How do I concatenate these strings into an SQL query?" Would you be willing to be responsible for the fallout of answering that question any other way besides "use parameterized queries instead"? Do you really think that should only be mentioned as a passing reference?
- unionpivo 5y agoExcept that you sometimes have to anyway (not for parameters, but to have dynamic conditions, filters etc.) And since every question about such things get auto corrected to use parameters (which doesn't help, since it's something else entirely), You have millions of buggy self glued sql queries allover code bases. (but hey most of them are using parameters, so yay - progress)
- shawnz 5y agoIn those cases the best solution would be to use a query builder library like JOOQ, I still wouldn't be willing to recommend someone in that position builds the query by concatenating strings together
- ballenf 5y agoAbsolutely, yes. Someone has to write the parameterization libraries. That is, whatever abstraction layer you want to employ, in the end SQL queries are strings. And the passing reference to the potential misuse here can be a big bold statement at the top of your answer.
- yura 5y agoYou say it ruins it, but my in my opinion, that's exactly what makes SO valuable. Often, it's not just the asker of the question that's trying to solve X but asks how to solve Y. So when you search on how to solve Y, you might also find out a better way to solve X that doesn't involve solving Y. And if you are really trying to solve Y, it's not hard to specify that in your question (I know I can solve X without solving Y, but I don't want to solve X, I want is to solve Y in this case). I wouldn't say "there's nothing worse" than that; it's a minor inconvenience.
- craftinator 5y agoWhy don't they just filter out the useless Y's, but keep the good ones?
- SamBam 5y agoI agree. If I'm sure my problem is not an XY problem, but I think it may well not look like that because it's such a weird situation, I will add all the context that explains how I got there. Then either: I do know what I'm doing, and my explanation satisfies people, and they try to work on Y, or: it turns out I was indeed wrong, and I should have solved X some other way. Either way it's a win for me (if anyone bothers to answer the question). But it can be hard for either new people, or people who don't know the domain well enough to even know that it could be an XY problem.
- oefrha 5y agoYeah, unfortunately, these days SO is relatively good for shallow questions but mostly terrible for niche questions when you're already at an advanced level on the topic. Often enough you get several inquiries about your use case from people at or maybe even below your level who can't really answer the niche question, you waste time explaining irrelevant details and fending off skepticism, and end up leaving without an answer.
- abathur 5y agoI still occasionally post these _when they aren't urgent_ because there's an off chance someone will know, and a greater chance some future traveller will find it by search and turn up with a good thought or answer. But yes, it can be a lonely game :)
- matsemann 5y agoIt's also encouraged to answer your own questions. So if you struggle with something, and find a solution, you can post the Q and answer at the same time even. To make it easier for others in the future.