Robert Cummings wrote: > On Fri, 2007-01-12 at 14:40 +0000, Roman Neuhauser wrote: >> I know it sounds crazy, but (most) comments are evil. Comments are are >> excuses for better code, they're often no more than a vague repetition >> of what the code says. If the code doesn't describe what it's doing >> while it's doing it, then the code should be fixed. > > Amen. > > There are not that many cases were comments are actually useful. > Generally when necessary they give a brief summary of what is intended > or they clarify ambiguity or specialized techniques. Well chosen > variable and function names cause the code to practically comment > itself. > > I think the discipline of using longer and more descriptive > variable/function/class names is far more helpful than commenting every > second line of code with the obvious. > >>> 2 // check if th function was passed only a single character >>> 3 if(1==strlen($cd)) { > > Ummm, DUH! :) I guess some of the comments are a little obvious. > Cheers, > Rob. -- Brian P. Giroux Sénécal & Associé.e.s / Associates Recherche et marketing / Research and marketing Tél : (705) 476-9667 Fax : (705) 476-1618 www.senecal.ca -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php