On 1-May-07, at 10:46 AM, Charles Yeomans wrote: > I agree that having to expend time to figure out what each line of > code does is a waste. My approach, however, is to write code whose > intent is clear. Adding comment that explains what the code does is, > in my opinion, unnecessary duplication. Such comments require one to > keep comments and code in sync. I suppose this means that I'm one of > those people that does not comment code.
Often I start by writing comments that outline the intent of my code. Regardless of the details of how I implement the specifics, the comments remain valid unless the intent changes. At that point I'd update the comment to note the new intention. But, having done a lot of maintenance work for the first 6 years of my programming life, the code IS the design and comments can often be misleading as can poorly named routines and variables. Never rely on comments as a definitive statement about anything to do with code. _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
