Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The Programming Mess
Message
De
06/05/2013 03:44:42
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
05/05/2013 15:29:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01572688
Message ID:
01572750
Vues:
92
>>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform