Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this a best practice?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00925541
Message ID:
00925761
Vues:
15
You took the words right out of my mouth.

>
>Let's first define exactly what a "Best Practice" is. IMO, a "Best Practice" is one that somehow enhances the readability or maintainability of the program or, hopefully, both.
>
>Several questions arise here. The major one from my POV is, "What about the path set in the configuration file?" In the above case, what you're doing is either completely changing it or it isn't being set. Does this enhance the program? IMO, it doesn't.
>
>Another thing is that you're cluttering the main program with this code. Why not create an "Environment" object that handles something like this?
>
>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.
>
>The question for you is, "Does this meet the above criteria?"
>
>Regards,
Work as if you don't need money
Love as if you've never been hurt before
Live as if this is your last day to live
Dance as if no one's watching
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform