Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Agile series' in UT Mag - wrong on refactoring!
Message
De
13/07/2005 02:48:34
Walter Meester
HoogkarspelPays-Bas
 
 
À
12/07/2005 22:54:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01032029
Message ID:
01032074
Vues:
15
Hi Jim,

Well I think there are good and bad sides to refactoring.

Of course you're absolutely right that you should not rewrite every method function you come to see where the 'polution' or inflexibility is minor or even moderate (in complex cases).

There are factors involved like:

- Readability
- Flexibility
- Complexity
- Frequency of use
- Defense against unrecoverable error messages

However, If I get the slightest hint that rewriting the function will be better in the long run (see arguments above) I'll not hesitate to rewrite it. Essentially this is the only way you're able to write a decent framework for your application.

The dangerous thing of course, and you're absolutely right in that, is that in the revision you might not oversee all possible states in which the method or function is used and indeed writing a function that not always the same output as the original.

OTOH, if the above happens, it shows that the function was poorly written as the code should outline all possible states.

But in the end we are all humans and make mistakes. I really depends on the programmer and their skills. Unfortunately often these design paterns and methodologies assume you're are well educated , all knowing, brilliant programmer with an IQ well over 140, who never make mistakes. In the real world thing might be way different. Sometimes it is better to hold on to "If it ain't broke, don't fix it..."

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

Click here to load this message in the networking platform