coding style - What's the least useful comment you've ever seen? -


we know commenting our code important part of coding style making our code understandable next person comes along, or ourselves in 6 months or so.

however, comment doesn't cut mustard. i'm not talking obvious jokes or vented frustraton, i'm talking comments appear making attempt @ explanation, poorly might not there. comments too short, too cryptic, or just plain wrong.

as cautonary tale, share you've seen that bad, , if it's not obvious, show code referring , point out what's wrong it? should have gone in there instead?

see also:

just typical comp sci 101 type comments:

$i = 0; //set 0  $i++; //use sneaky trick add 1 i!  if ($i==$j) { // made sure use == rather = here avoid bug 

that sort of thing.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -