top | item 5789268

(no title)

andrewgross | 12 years ago

Awesome, thanks for the explanation

discuss

order

lotyrin|12 years ago

Thank you for an excellent counterexample for when people claim code comments are useless.

ollysb|12 years ago

You could express the same thing without comments:

    boolean alreadyLogged = !_ok;
    boolean skipLogging = alreadyLogged && (Math.random() > 0.1)
    if( skipLogging ) return res;

dampier|12 years ago

Heh ... agreed. A comment here would definitely not go amiss.