January 4, 2020 at 12:00 am
Comments posted to this topic are about the item The Art of Commenting
January 4, 2020 at 2:52 pm
One of the greatest values of commenting is to answer the proverbial 'What was I thinking ?' question.
Rick
Disaster Recovery = Backup ( Backup ( Your Backup ) )
January 5, 2020 at 5:46 pm
One of the greatest values of commenting is to answer the proverbial 'What was I thinking ?' question.
Heh... spot on. I use comments for the following...
That latter method help us reach a very near "zero defect" rate and dropped the time it took for sometimes simple modifications (and, certainly for major ones) from a typical day or two to just an hour or two and still delivered at a very near "zero defect" rate.
On the flip side of the coin, comments such as "Update the Customer table" are near totally useless. My rule of thumb is that if you were to remove all of the code, the comments that remain could be used to draw a functional flowchart along with a bit of "Alice's Restaurant" comments that explain difficult to understand pieces of code.
The cool part about comments is that they automatically travel with the code. You don't necessarily have to go looking for requirements documents, flow charts, etc, etc, when you're trying to figure out what the hell the code is supposed to be doing.
I even use comments (especially flower box comments) in BCP format files. Anything below the number of rows assigned in the second line of the format file is ignored by SQL Server. And, yeah... you can put some pretty weird stuff into a format file that others might not understand like why the first column has been assigned a width of one and will only ever contain a single double-quote of why I'll typically assign a column width of 500 even though I know that the column should never have a width greater than 4 characters (for example).
--Jeff Moden
Change is inevitable... Change for the better is not.
April 30, 2021 at 6:02 am
This was removed by the editor as SPAM
July 29, 2022 at 9:30 am
This was removed by the editor as SPAM
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply