Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening all dbfs in a directory
Message
De
25/10/2013 07:47:40
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/10/2013 04:19:44
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:
01586350
Vues:
53
>Long time ago, I wrote XDIR ( File#25487 ) which is class that scans content of folders and subfolders (or entire drives for that metter) and streams it all to
>appropriate class methods. So any processing of files can be simply placed in subclass method 'WithFile' hiding completely complexity of traversing through folder hierarchy and files. Ever since then I saw numerous posts with code that does the same thing one way or another. It is perhaps BEST COVERED
>programming task of all times. What occurred to me is that people absolutely LOVE writing recursive code on their own because everyone think it is cool ! :))
>(That task in particular is very convenient playground because it is where recursion concept really makes sense due to the nature of it all.)

Well anything with a tree structure is naturally begging for a recursive approach, or else it gets rather complicated really fast, or remains limited to branches having no branches of their own, poor things.

BTW, I so hate it on the VeryDemotivational site when they call each instance of recursion an inception. They didn't understand a thing, not even the basic terminology required to follow the plot.

>So everyone likes having their own funcs & procs that do the same thing. Maybe not the best practice and all that, but I do understand why is happening;
>Whole OOP approach (frameworks especially) directly steps on oldest and biggest pain of all programmers which is well known dificulty to to read,
>understand and apply someone else code. I think 100 out of 100 programmers prefer to write their own (myself first!) versus using ready made stuff.
>Publics no publics, best practice or not, we love to write code because that is who we are! :)

I only strongly disagree about recursion being the most popular genre here. IMO, the most popular genre is date calculation. Just try to ask for code which, for example, lists months which have five fridays in a given year, and start counting the attempts. Somewhere 20 messages down the thread, a "but I can't see how this can be done in one line" should appear.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform