Walter Meester
HoogkarspelPays-Bas
Mike Yearwood
Toronto, Ontario, Canada
Versions des environnements
Network:
Windows 2008 Server
>>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've come to realize the real problem is that there is a huge spectrum of skill levels. Some people have never seen a system which behaved strangely due to abuse of public variables. Others have never tried to debug an intermittent problem appear because a piece of code somewhere rarely is called with a table that happens to conflict with a memory variable in that code. Some do not even seem to understand the idea of modularization of the code (that I cannot accept). The worst employers fancy themselves programmers.
There is a huge difference between proper use and absuse of public variables. I'd say that in an ideal world you'd have only variables for public objects (such as applic). However there might be circumstances where a public variable is usefull. Remember that VFP itself has a whole slew of them (the variables that begin with an underscore).
Further I do not see the big difference between private declared variabled at start.prg vs a public variable in start.prg.
>It is not logical to use democracy for what is best practice. That will mean the majority - certainly in the 80% of the bell curve - will dictate best practice. As far as I can tell - they would all use public vars, leave properties and methods public, barely use classes, barely modularize code, and not use recursion at all.
Best practise over time is dictated by experts and available public or commercial sources (such as frameworks). It might not be your piece of cake, nor mine, but certainly is accepted by a large portion of the development community.
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