3 ms·
Worse is //Insert new customer into database _db.Insert(oldCustomer); As a reaction to this, I used to work somewhere that had a zero-comment policy.
by pjc50 6y ago
Worse is
//Insert new customer into database
_db.Insert(oldCustomer);
As a reaction to this, I used to work somewhere that had a zero-comment policy. If you wanted to describe something you had to do it in the function and variable names. Overreaction in the other direction.
- gregfjohnson 6y agoAbsolutely agree. I had a similar experience. 30-character camel case names are no substitute for a well-written comment. What I've found works well is to view a comment as the topic sentence of a paragraph. For each section of code that can be reasoned about as a unit, set it off with white space above and below as paragraphs are set off in text, and give it a topic sentence explaining the intention. If there are difficult, delicate, or subtle aspects of the code, be kind to your reader and explain them.