Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming Conventions
Message
From
10/11/2003 08:14:31
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
05/11/2003 15:20:20
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00846723
Message ID:
00848241
Views:
19
Hi Jim

An intelligent director would delegate this function to a specialist. The director should not be reviewing code in the first place.

Microsoft's lack of use of Hungarian Notation for properties isn't the issue. Much of their example code is handed down from previous versions. System memvars must retain the original format to be compatible with the backward. There isn't any consistency with variable naming because it is simply example code. MS doesn't program in VFP for a living. The real question is do they use Hungarian Notation in the code they write that makes up VFP? They (MS) have provided a Variable Naming convention section in the help that should be enough to convince this director to leave well enough alone.

If I'm not mistaken, I believe you've said that style should not change throughout the codebase. If that's true, new code must keep with the conventions of the old.


>Now that's one intelligent director you have there, Renoir.
>
>Way back when (it as called VFP3) we got an extension on memvar name lengths (and on field names when they are in a dbc). We also got the "LOCAL" declaration. I think both are now 'limited' to 128 characters though the number 44 stick in my mind and may be a limit for memvar names.
>
>Now I know that typing is a drag, but with Intellisense going to be 'fixed' for WITH...ENDWITH and also preserving case as entered the job is alleviated somewhat. So now (with 128 or 44 as the limit) we can properly describe our variables, including PEMs. You'll notice that MS doesn't use Hungarian notation (or any derivative thereof) in the names they have chosen for PEMs, system variables, etc.
>
>So I'd say that you could even do away with the _lc suffix if you adopt something simple like all variables are assumed LOCAL (and actually use the full word as the suffix for any that aren't, like "MyVariablePublic") and adopt a simple policy for oddball collisions like a key being char but having all numbers in it.
>A variable named "EverythingGotWritten" is clearly a logical. A variable named "CustomerFirstName" is clearly a char. A variable named "DateOfBirth" is clearly a date. Similarly a variable named "xx" should clearly be understood to have short-lived any type depending on context.
>
>By the way, I'd say the director is right for new programming but that old programming should continue in its original style, whatever that is.
>
>cheers
>
>
>>Out director has said that we must find another way to name our variables as he finds it difficult to read. Currently we use lcMyVariable to denote a local, character variable. He would like to use MyVariable_lc instead. We were also considering lc_MyVariable and one person thought that MyVariableLC was reasonable. Any thoughts? And if this has been covered already then just point the way please. I still would like to know what others think just about this specific example though. Thanks!
>>
>>Regards, Renoir
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform