Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Naming conventions again........
Message
From
27/08/1999 07:44:13
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
26/08/1999 14:34:33
Walter Meester
HoogkarspelNetherlands
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00258085
Message ID:
00258310
Views:
19
Walter,

I adopted Hungarian about two years ago and all I can say is that it "feels right." This is is probably because I mumble pretty steadily while I code, actually talking out the code as I go. Hungarian allows me to talk just about exactly what I am coding, such as "...local numeric return value will get the maximum of myalias numeric field Sale Amount and local numeric discount."

So, have you heard that argument before? <s>

>Recent discussion about naming conventions made me think again about this subject.
>Being an independent programmer for about 5 years now, I looked back in my code and couldn't figure out why i still should use naming conventions. The following thoughts came in mind:
>
>- Using naming convention (hungerian for example) is (much) less important than giving good names for a variable.
>
>- If a variable is named InvoiceDate it's pretty clear that this is of a Date type, so there won't be any use of a variable called ldInvoicedate. the same applies for lnArticleNo, lcAdress.
>
>- Naming conventions are still usefull in strict typed languages where you have to declare your variables and convert from one to another type when used in functions. But since VFP (and all other Xbase languages for that matter) are not strict typed, it does not seem to make sense anymore.
>
>- Using the 'l' prefix doesn't make much sense to me. In the old day's where JSP (jackson structure programming) was the way to go, and programroutines where very large, it had it's benefit. But when used in routines, methods and event of only a few lines (which is very common in OOP programming) it looks to me that it's more a pain in the *** than it help to clarify the program.
>
>- On the other hand, Using a prefixes for public or private variable could clearify certain code, although i'm convinced that public variables should be used as less as possible because OOP provides much better way's to handle those cases where most public variables where used.
>
>- When I'm using a for next loop I still write 'FOR nT = 1 TO 10'. Why should I use the n while it's pretty clear that it's numeric. I agree if you have a lot of code in your Loops it could be a help, But then again who writes code in the JSP fashion nowerdays (with VFP)?
>
>- I did discover a piece of code where there was a variable called 'nRet', but instead of containing a logical value, it was boolean. Talk about confusion....
>
>- I did read a lot of other people's code, but i never thought "Well these naming conventions help a great deal to read the code" especially when a variable is called somethink like lnInvDte instead of InvoiceDate. (B.T.W. some programmers used to short each word into 3 caracters because of the 10 caracter limit)
>
>- One of the reason why I still use the type prefix is to distinguish variables from field names. but then again, I could use the m. prefix to clarify a memory variable when neccesary.
>
>- Different programmers use different naming conventions. When you read the other ones programs it can be more confusing than it helps.
>
>- If a program was programmed by more than one programmer, It really *can* get a mess.
>
>
>
>Getting more confused by the minute......
>
>
>Walter,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform