Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code Documentation
Message
De
06/12/2003 08:17:16
 
 
À
05/12/2003 10:15:25
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00856259
Message ID:
00856581
Vues:
14
Hi Jay

>We are being required to use this type of function comment header and defect change headers for all methods, function, programs, etc. I really don't have a problem using the change headers, but the function comment header seems incredibly superfluous for predefined methods like the Click event of a checkbox. I could see it being used for user-defined methods, but in the Foxpro predefined ones it just seems to be a waste of time. Maybe it's just the way I see it. Any thoughts on this?

FWIW my view is that the purpose of comments is to explain to other developers who may be looking at the code what is going on and why things have done in a particualr way. I have never seen the value of fancy headers and blocks of code that contain so much information that you can't actually find the code - especially in native methods! Of course, with IntelliSense it is now very easy to construct standard header blocks and insert them with a few keystrokes but my view would still be that if they interefere with the visibility of the code then they are adding little or nothing.

I think it was Drew Speedie who first came up with the idea of adding a "zReadMe" method to all objects where the sort of information that you are showing in the header was encapsulated. The name (zReadMe) ensures it falls to the bottom of the property sheet and doesn't get in the way of the real code. But it does provide a good single place to document the Objectives and Assumptions that the object as a whole relies upon. You can also put the change histroy there so that there is a single place to look for the record of changes instead of trying to hunt through 300 methods every time you want to find a change. Seems like a good compromise to me :)

Just my $0.02
----
Regards
Andy Kramek
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform