The trouble is, if you’re going to reply that way, you should strive to first answer the question, as asked. If the answer is bad practice, of course, you should mention that.
That’s the respectful way to handle a misguided question, in my opinion. Give the reader both solutions, explain why the alternate is better, and leave it to the reader how to proceed from there.
I've been doing this stuff a long time, there's usually a reason why I'm doing it the way I'm doing it. I understand you don't like it, think it shouldn't be done that way, and so forth.
But I promise you, I've already considered the alternatives. And if you mention an alternative I haven't considered, I'll consider it then.
But please, for the love of god, just answer the effing question and stop assuming you know the nuances of my problem better than I do.
People who've been doing it long enough probably also have the experience to know how to ask a good question that explains the why of the unusual request.
"I unfortunately stuck on an low-power embedded device that for some weird reason only supports MD5" is going to be treated differently on SO than "I'm new to PHP and I'm using MD5 for to encrypt passwords but I can't reverse the encryption to read the password!"
just answer the damned question, and if you have concerns, ask. I'm more than happy to explain it, I just don't want to have an hours long discussion when I asked a fairly specific question.
Lest we forget, stack exchange is already rising from the ashes of the 'Experts Exchange' if anyone remembers that --
It's also part of asking a good question. I don't understand the uproar especially on a Q&A site.
It leads to a page with a clear question at the top and a great deal of text below which is not an answer to that question.
...and is often a way to shift the conversation to an argument about why the asker is doing it that way instead of giving them the information they actually asked for. I don't have time to argue about the sequence of events and layers of requirements that led to me asking the question, it doesn't matter if this "isn't the right way" to do it, it's the way I need to do it.