4 ms·
Comments are generally superfluous, sometimes incorrect and often used to explain away bad code.
by nahname 13y ago
Comments are generally superfluous, sometimes incorrect and often used to explain away bad code.
- moron4hire 13y agoYes. I consider comments to be part of the code, and thus in need of being maintained as much as the code. The more code you write, the higher probability of defects to be written. As comments have absolutely automated 0 checking applied to them, defects in them are all but ensured.
- collyw 13y agoDepends on the comments. I had to go and fix someone else's scripts, with comments like: #open files and read contents #loop through list No idea what was in the file, or why the contents were being read. What was the purpose of the loop. Commenting on those things would have saved me a lot of time. (It took me a week to fix something that should have taken a day, if it had been coded better in the first place.) (To put it into context, it was a previous workers code which interacted with the database I had written. When I changed some things in my code, her code stopped working. I didn't know how exactly her code worked, or the nature of the files that it was reading from the system, but I did know what working right would be. I am sure this is not an uncommon situation.)