3 ms·
If 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
by shawnz 5y ago
If 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.