Walter Meester
HoogkarspelPays-Bas
Information générale
Catégorie:
Codage, syntaxe et commandes
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement