I notice a lot of answers that are somewhat tangential to the question in hand, especially when the answer goes against best practice.
For example, if somebody asks "Why can't I do something in my table-based layout?", you can answer the 'actual' question (e.g. "You would need to set
cellpadding="0"") or solve the user's 'real' problem ("Table-based layouts are inflexible, use CSS instead").
The only times I don't follow that advice are with lax security (because end-users could suffer) or when I suspect somebody is doing something evil ("How would go about laying an invisible link over this?" type requests).
So two questions:
- What's the best way of answering such a question? I try to provide the actual answer first, and then caveat it with the best practice method. In addition, I try to question why the user is following the bad practice to begin with.
- How should SO be dealing with users who only answer what they perceive to be the user's real problem? To me, it gives a bad experience on SO. Often a user may be aware of best-practice, but is being forced to do something stupid by a pointy-haired boss. Is it valid to flag a user for that, just downvote, respond or ignore?