Possible Duplicate:
Is “Don’t do it” a valid answer?

You come across this all the time.

OP: How do I do x

Answer: You shouldn't be doing x

Managing Foreign Keys

This example is expressed very politely, but often you see half a dozen replies saying frantically, "You should NEVER be doing that." [citation needed]

Should we not give questioners the benefit of the doubt, that they really have a legitamite need to solve the problem as they expressed it?


Should we not give questioners the benefit of the doubt

NO! At least, not always. Personally, my most common experience with this is dynamic sql vs query parameters. If you see someone using dynamic sql in their question, it's definitely appropriate to assume they don't have a good reason until they tell you. You may have a different experience, but I at least am not going to let an obvious security issue go unchallenged.

Now, I recognize that not all instances of this issue rise to the level of security problems. For less severe problems it might be better to just let it slide. But even here, I feel that even if the OP knows what they're doing, someone else who reads the question later might not, and it's important to have a well-voted post with the question mentioning that something may not be appropriate most of the time.


I think it is appropriate to tell the questioner that his way may not be the optimal one - for as long as you actually answer something to the question itself. In this case consider telling him how exactly to proceed.

If it's only criticism without answering the actual question or giving an alternative, then this is quite unwelcome.

I think it is somewhat special to programmers' behavior to always attempt to teach the others what to do and what not to do. Whether it is good or bad, is not an easy question to answer.

What I also know is that many people (including me) would welcome any comments on their questions and answers which would unveil their mistaking and provide more insight into the manner. After all, we visit this place also to learn, even if the process is sometimes painful.


I answer the question as asked, then follow up with "but what you really should be doing is"....

Best of both worlds.

Eg: Draw Custom View on specific position of screen - Android

I remember a few years ago I was looking at methods of compressing web pages with Javascript, for a variety of reasons I was interested in the technology. Attempting to discuss it online was frustrating, because even if I started my post with "I am aware for general use this may be a bad idea because of x, y and z", I'd still get four stern lectures for every useful reply.

  • HOWEVER, to follow up my own post, I have been guilty of this talking to people who are trying to build whole websites in Flash but having terrible trouble with deep bookmarking, back button behaviour, search engine visibility, etc. To which despite knowing my way around Flash the only reply I really want to give is 'for god's sake do it in the appropriate technology'. – user145862 Apr 5 '10 at 16:14

Not the answer you're looking for? Browse other questions tagged .