Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a best practice?
Message
De
19/07/2004 02:27:53
Walter Meester
HoogkarspelPays-Bas
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00925541
Message ID:
00925663
Vues:
15
Hi George,

>One of the biggest misconceptions, IMO, about programming is the, "Well, it's only a couple of lines of code". It doesn't matter how many lines it is. I've written stuff that was two lines long in their own method. What matters is that the code is re-usable, functionaly cohesive and easily maintable.

One of the biggest misconceptions, IMO, is that reusability, functional cohesion are regarded as primary goals. I´d rather see them as tools for RAD, creating bugless code and easy maintenance, IOW developing (and maintaining) solid code in the shortes possible time.

Now I´m not going to disagree that re-usability and cohesion is to be ignored, but the emphasis should be on the point on easy of developping and maintenance. There certainly are examples to find where applying reusability just for the sake of reusability could get you in real trouble.

As for terry´s example I really don´t mind this in the main program. Calling a method or function has its disadvantages also. Someone examining the code has to dig all called procedures and methods to find out what it does exactly, often making it harder to understand what is going on. Sure in a perfect world the function names should be self describing and do just only what the name implies, but in reality we know this is often not the case.

Walter,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform