-21

tadman's comment on the question if else inside of $_post isset

tadman in php textarea automatic save to sql with jquery/ajax

tadman php,mysql,html,css - Hide specific text when it has a database data

None of these comments have anything to do with the question asked. It is good advice in general, but does not add to the question, or any of the answers, so shouldnt really be part of it.

Personally, it even seems like its a bot, scanning for certain things in a question. If this is the case, would it not be best having this be part of SO its self and showing some sort of flag or warning within the question that the code in the question is unsafe? The comments area seems like the wrong place for this.

7
  • 13
    The comment section is the right place for this. The only way to put it in the question is to edit the question. That would put words in the OP's mouth that they clearly did not speak. Commented Jun 20, 2016 at 19:49
  • 5
    Why would you see the concern raised in his comment as a bad thing?
    – Jonathan
    Commented Jun 20, 2016 at 19:52
  • So what feature you are requesting? Comments you've linked to look very appropriate for questions asked. (The only real alternative I see is downvote as lack of research on good practices and move on without comment - not really sure if it is nicer so). Commented Jun 20, 2016 at 19:54
  • You can flag it as "Not Constructive" if you feel it is not. Commented Jun 20, 2016 at 19:56
  • 11
    @MikeMcCaughan That flag would probably be declined. Warning users of unsafe practices, even if it is off-topic to the question itself, is definitely constructive. Commented Jun 20, 2016 at 19:57
  • 4
    Personally, it even seems like its a bot, scanning for certain things in a question. It's actually not that unusual for folks to come up with their own canned comments for common issues on the site. I spend a lot of time quoting the close reasons to new users who've asked something off topic. It looks like the OPs are finding tadman's comment helpful. If the OP updates their code per their suggestion, you can flag the comment as obsolete but I don't think it's a problem.
    – BSMP
    Commented Jun 20, 2016 at 20:18
  • 2
    I agree. Also, whenever I see someone looking down the barrel of a gun wondering why it didn't go "boom", I leave them be.
    – user1228
    Commented Jun 20, 2016 at 20:32

2 Answers 2

12

I'll be honest - the comment by itself is very chatty, as it doesn't clarify the question and it doesn't ask questions of the OP to clarify the question. By the rule of the book (and only with a very strict reading), it's eligible to be flagged as "too chatty".

However, it is a very good comment to make since there are a lot of PHP questions that make use of deprecated and unsafe MySQL libraries.

In this scenario, it's being used to directly inform the OP that what they're doing is making their code vulnerable to SQL injection, which is entirely preventable.

I personally have no problem with them doing this in the comments. So long as the OP takes note of it and makes adjustments in the future to their future code, then the message has served its purpose.

2

I don't think that constitutes badgering. It is only one comment, and while it may be loud it is intentionally trying to inform the user of actual risk.

Note that in general the OP tends to take the comment as constructive and that in your examples it tends to lead towards dialogue that isn't combative or badgering.

I see this often too in the domain I tend to watch which is c#, specifically in the use of entity framework contexts. So many users do not dispose of their context and it leaks connection threads. I can understand the path that the user you show must have taken to get to having a prewritten comment - after all they are a rather active contributor and must see this type of situation often.

tl;dr; Deal with these comments by ignoring them. They are causing no harm.

You must log in to answer this question.

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