Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
The Programming Mess
Message
 
 
To
06/05/2013 03:44:42
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01572688
Message ID:
01572758
Views:
90
>>>If you write crap at least comments help.
>>
>>There's a school of thought that says "Comments are lies". When I first heard about it I thought it was total nonsense. Now I think there's a lot of truth to it. If you add comments, you have to maintain them just like you maintain the code itself. Far too often, even with my own code, I've run into cases where the code's been updated but the comments haven't - so the comments are lies, or at least misleading or incomplete.
>>
>>If code is "crap" then the comments are almost always worse.
>
>When checking my code (i.e. between the moment I think I'm nearly done and the first test to run, and then few more times while testing) I also check the comments and remove the obsolete and inapplicable lines. Or sometimes add more lines to explain why they are crap now... mostly when the crap comes from the requirements, or some OS/Fox bug that has to be worked around.
>
>>Every experienced programmer knows that the absolute best code is no code at all. One could similarly argue that the best comments are no comments at all. The holy grail is code written such that its purpose and operation is obvious to anyone with a reasonable grasp of the language used, and with no comments required.
>
>Was it Voltaire with "sorry I didn't have the time to write shorter"?
>
>Sure, minimalism is my goal as well. Short and to the point, no unneeded pieces in it.

Close. It was Pascal.
Previous
Reply
Map
View

Click here to load this message in the networking platform