1

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.

13
  • 7
    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
  • 2
    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
  • 1
    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. Jul 31 '13 at 10:08
  • 2
  • 1
    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. 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 ;-) 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?" 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". 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. 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? Jul 31 '13 at 10:28
  • 1
    @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. Jul 31 '13 at 10:32
2

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.

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