News for hackers. Stuff that matters.
Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by shawnz on Thursday July 29, 2021 @08:26AM (#27995614)
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.

Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by cperciva on Thursday July 29, 2021 @10:38AM (#27997075)
You seem to be under the impression that people answering questions on SO are subject matter experts.
Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by robinson7d on Thursday July 29, 2021 @11:09AM (#27997441)
You’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.

Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by shawnz on Thursday July 29, 2021 @11:34AM (#27997760)
Remember 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.

Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by fegu on Thursday July 29, 2021 @12:22PM (#27998228)
I always read their domain name as expert sex change.
Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by CoolGuySteve on Thursday July 29, 2021 @08:31AM (#27995656)
But the new question almost always gets closed as a dupe in spite of clarification.
Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by shawnz on Thursday July 29, 2021 @08:35AM (#27995695)
Yes, 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).
Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by ballenf on Thursday July 29, 2021 @12:34PM (#27998347)
There 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?".

Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by shawnz on Thursday July 29, 2021 @02:00PM (#27999436)
Imagine 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?

Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by ballenf on Monday August 02, 2021 @09:59AM (#28036603)
Absolutely, 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.

Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by unionpivo on Friday July 30, 2021 @03:55AM (#28005569)
Except 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)

Re:Why does man print “gimme gimme gimme” at 00:30? (2017) by shawnz on Friday July 30, 2021 @09:49AM (#28007921)
In 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