Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The color of comments in your code window
Message
De
18/08/2009 15:05:37
 
 
À
18/08/2009 12:10:28
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:
01418734
Vues:
98
Text color in the editor is a personal preference, but I appreciate your blogging about things that people may not have thought of.

However, I feel the need to add some things that affect comments

1. There are several lines that look like:
*-- Some text here ------------------------------------------------------
Adding all the dashes doesn't make it more or less of a comment. It just adds addtional characters that distract and add to the comment problem.

2. Lots of code like:
*-- Create some object -------------------------------------------------
IF SomeCondition
    this.GetSomething(someParameter)
ENDIF

*-- Create some other object -------------------------------------------------
IF SomeOtherCondition
    this.GetSomethingElse(someParameter)
ENDIF
It would be self documenting and not need any comments if it read
SomeObject = MethodCreateSomeObject(someParameter)
SomeOtherObject = MethodCreateSomeOtherObject(someParameter)
See the book Clean Code by Robert Martin





>Just blogged about the COLOR of comments in your code window.
>
>http://therealmattslay.blogspot.com/2009/08/color-of-your-comments.html
>
>What color do you use? (assuming you "need" comments in your code, like I do <g>)
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform