Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This question already has an answer here:

What should be the appropriate reaction when someone ask for help, but the question shows major flaws in the code or design? I have the feeling that just "answering" is like helping them to go further in the wrong direction.

Here is a concrete example: why this SELECT * FROM database wont work?

The OP asked about a "SELECT that don't work". The approved answer solved the issue. But, as someone noticed in a comment the code has severe security implications. And there is several like that every days.

In order to provide an helpful, clearly identifiable, and appropriate/polite comment, is there a "repository" of standard comments for these cases? If not, we should think of it.

share|improve this question

marked as duplicate by Tobias Kienzler, Aaron Bertrand, Cody Gray, Martijn Pieters, yhw42 Jul 31 '13 at 12:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

How many thousands of canned comments should we have? How should we organize them? Or perhaps, when we see an issue we write a custom comment that is directed at the specific issue, post and user? – Oded Jul 31 '13 at 10:05
Add an answer stating "I could give you an answer, but it seems your actually shooting yourself in the foot. Here's why... insert constructive advice ". Wouldn't that work? – Bart Jul 31 '13 at 10:07
You are asking two things here. The first one is easy. "Don't do this" or "Don't do it" are enough. The second, about the repository of standard comments, well... should be a different question. I don't think we need that, though. I actually like posting my own "Don't do it" comments. – Daniel Daranas Jul 31 '13 at 10:08
I think sometimes it is necessary for users to shoot themselves in the foot ... You always only learn from your own mistakes. And who are we that we think we know it all? I have seen plenty of posts where the OP said explicitely "I know this SQL statement is insecure, but I don't want to discuss that here" and there was a pile of comments with arrogant remarks about exactly the subject he did not want to discuss. There are scenarios where security is not of prime concern, especially when it comes to understanding and learning some new principles in a sandpit configuration. – cars10 Jul 31 '13 at 10:14
@cars10 - It certainly teaches one about gun safety – Oded Jul 31 '13 at 10:17
@Oded If it is a water pistol I don't see any danger ;-) – cars10 Jul 31 '13 at 10:21
@AsheeshR, thanks for editing the title. The original one sounded like "Should I just tell the user to shoot himself?" – Old Checkmark Jul 31 '13 at 10:21
OK, the "standard repository"-thing is a bad idea. And about posting an useful custom comment, I would agree. But, most of the comments are 90% identical. And as of answering "Don't do it". I done that once. And removed the answer, since it was down-voted for being "not the OP question". – Sylvain Leroux Jul 31 '13 at 10:24
@SylvainLeroux I quite agree with that. You should definitely write a comment with "don't do it" but the actual posts should be used to answer the OP's question, however stupid they may seem (at first). And - if you are really so concerned about the security of his approach: point him in the right direction in an actual post. – cars10 Jul 31 '13 at 10:26
Maybe that turns out to be feature request finally? One way for a member to "scrapbook" commonly used comments? – Sylvain Leroux Jul 31 '13 at 10:28
@OldCheckmark I was in a rather serious mood when I saw the title and my first reaction was that the guy is asking on the wrong site :D – AsheeshR Jul 31 '13 at 10:29
@AsheeshR Very sorry about that. I forgot the "in the foot" at the end of the original title. Anyway thank you for editing the title. – Sylvain Leroux Jul 31 '13 at 10:32

What should be the appropriate reaction when someone ask for help, but the question shows major flaws in the code or design?

Giving a detailed answer is the best thing to do.

This would include explaining the flaws, why the direction taken is wrong (or can lead to problems down the road) and providing one or more alternatives, explaining why it (or they) are better than the premise of the question.

For bonus points, after giving all of the above, provide an answer as the OP requested, perhaps re-iterating why it isn't a good idea. After all, sometimes people don't have a choice about code/design decisions and simply need a resolution there and then, with all the underlying issues.

share|improve this answer

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