Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The color of comments in your code window
Message
De
19/08/2009 16:27:55
 
 
À
19/08/2009 16:25:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01418690
Message ID:
01419086
Vues:
60
We put a similar entry at the top of the prg or in the top of the form init (VFP only) similar to:

* Date programmer Modification
* Date programmer Modification

etc...


>I've used a different way of commenting out code in the past. First, I use a header (a .ReadMe method in a form/class)
>
>
* /01  Date  WhoMadeMod
>*    a. Description of mod
>*    b. Description of mod
>* /02  Date  WhoMadeMod
>
>Then to comment out a line in the code:
>
*/01-a
>
>It provided a trail back to not only what was commented, but why. Then when doing maintenance on a file, I would prune out anything older than a year.
>
>Now with good source control and compare programs, I don't do this. Once I have new code in place and working, I delete the old code.
>
>Robert Martin also talks about commenting out lines in Clean Code.
>
>
>
>
>>In VFP, I do exactly what Craig doesn't like but only in general sections, not for each code block:
>>
>>
>>*--TCHolzer 08/19/2009 BEGIN Issue # 12345 Fix this or that 
>>*!* original code commented out
>>new code here
>>...
>>*--TCHolzer 08/19/2009 END Issue # 12345 Fix this or that 
>>
>>or general:
>>
>>*--Explain what the purpose of this section is
>>
>>etc...
>>
>>
>>however, it is more functional, not specific to what each code block does, because that should be evident to a programmer who knows VFP
>>
>>in dotnet, we use xml comments for functional sections as well so the developer who comes along later understands the 'purpose' of the code. We don't add specific comments for every single thing because any developer who understands that language should get that immediately.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform