-15

I flagged this comment as Not Constructive because it was clearly a joke. The flag was declined. Why?

This was the question:

Pick a random number but not the number 3

What would you add to make it so it still picks a random number but not the number 3?

- (IBAction)Button3
{
    int randomviews = rand() % 6;
    Label1.text = [NSString stringWithFormat:@"%i", randomviews];
}

The comment was:

What would I add: rand() % 6 + 10

9
  • What makes you think that it is a joke? Read the suggestion again. See the magic number 10 again and then at the remainder operator -- it might ring some bells.
    – 0xdeadbeef
    Aug 19, 2014 at 19:22
  • Some comments might appear to be not constructive. Doesn't imply that you'd go on a flagging spree.
    – 0xdeadbeef
    Aug 19, 2014 at 19:25
  • @0xdeadbeef I don't notice anything...
    – NobodyNada
    Aug 19, 2014 at 19:25
  • @0xdeadbeef Because of operator precedence this just changes it to rand() % 16, which is not what the OP wanted. It will still pick 3.
    – NobodyNada
    Aug 19, 2014 at 19:27
  • You could suggest using a pair of parenthesis?
    – 0xdeadbeef
    Aug 19, 2014 at 19:33
  • @0xdeadbeef: 99 mod 16 is 3 (if using parens). Technically it's still constructive though. User is being glib. Aug 19, 2014 at 19:33
  • @NobodyNada that's true, but that would make it inaccurate, which is not a reason a moderator would remove a flagged comment. Aug 19, 2014 at 20:20
  • 6
    You honestly flagged for this? Honestly?
    – user1228
    Aug 19, 2014 at 20:56
  • @DavidRobinson: Gone now. Aug 19, 2014 at 21:32

1 Answer 1

11

The comment was not a joke. If anything, it was a wake-up call to the author of the question to be much more specific with questions.

The answer in the comments is completely correct (although it might need more parentheses depending on the coding language) and would work, but it may not be the best solution. Therefore, it is completely constructive since it both answers the question and provides reason for the author to ask better questions.

You must log in to answer this question.

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