Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening all dbfs in a directory
Message
 
À
22/10/2013 10:15:42
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01585571
Message ID:
01586191
Vues:
58
>>>We're finally getting somewhere! You did not use any PUBLIC variables.
>>
>>And the cycle resets...
>>
>>Do you guys remember "Lost"? Remember there was this sequence of numbers that needed to be punched before some counter elapsed? Discussions about PUBLIC variables seem to also have some frequency, I wonder what would happen if one day we forget to start the thread to discuss about them? Maybe that will signal the end of FoxPro, or the world!
>
>The point is to teach best practices.

Well, I think you know that I not only agree with you about the use of public variables, I think you also know I go one or two steps further: no PRIVATE variables and no PUBLIC properties either, any changes in the state of an object should be accomplished by sending a message to it, never by assigning a value to a property (which should be protected anyways, or even hidden).

Anyways, and to the risk of being called unprofessional by Al, I would say that, to my taste (which is, like any other's imperfect), you were not following best practices either in that small piece of code, as it was a function (or method) that was performing two distinctive tasks; so maybe a better solution would have been to separate the searching of the files (which can then be used for other purposes) with the actual testing of the files (and this should be done in two methods, one that checks an individual table and then one that checks a collection of tables, the output of the method that finds the files in the first place)
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform