Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Hey George
I'd like to add a criteria. Accessibility. Can you tell me what classlib or procedure library I used to store a particular component (procedure/function/class/method)? If you have to go digging to find something, it isn't very reusable or maintainable is it?
>>Or does it NOT make a difference?
>>
>>At the top of my Main.PRG, before READ EVENT, I issue this code:
>>ucRootDirectory=SYS(5)+SYS(2003)
>>ucPath=["]+ucRootDirectory+["]
>>SET PATH TO (ucPath)
>
>>My understanding is that a program like FileMon, would present a less clutered assessment of my VFP Install runtime.
>
>Terry,
>
>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,
Précédent
Suivant
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