RE: (syntax) variable naming conventions
Also you might want to take a quick look at http://msdn.microsoft.com/library/backgrnd/html/msdn_20naming.htm "The Leszynski/Reddick Guidelines for Microsoft Access" which is based on Hungarian notation. Pretty clunky if you ask me though. I mean, you can tell a table name refers to a table without needing to put "tbl" in front. Nick ** Information in this email is confidential and may be privileged. It is intended for the addressee only. If you have received it in error, please notify the sender immediately and delete it from your system. You should not otherwise copy it, retransmit it or use or disclose its contents to anyone. Thank you for your co-operation. ** -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
(syntax) variable naming conventions
I've started to use some variable prefixes in some of my code and was wondering what others were using. I'd like to see a few examples before I post an article on it. My usage at the moment is limited to complex data types: aArray sStructure qQuery oObject I'm sure a case can be made for something like xWDDX, bBoolean, iInteger, nNumber, dDate, tTextString, lList but I'd rather not go that far yet. Who's using something like this? Is it helping you in any way? Is it hindering you in any way? -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: (syntax) variable naming conventions
Yep yep :))) Yeah.. I kinda like hungarian notation for some things ive always used strWhatever for strings. like if im setting up a string for an image name or something strImgSrc for example.. hleps pick out what it should be its even more useful since CF is typeless and you can do almost anything you want to any variable it really helps Check out some VBScript I kind of like the naming conventions for their Basic Data types I would say use a three or three or four letter prefix tho as just one letter would kind of obscure it and with three letters it helps you have more choices. If you have not taken a look at hungarian notation its a standard MS invented that hordes of C++ people use myself included.. you could take a look at that maybe to model your style off some prexisting stuff :) thats my two cents.. ;) Jeremy Allen [EMAIL PROTECTED] [Insert cool title here] -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] Sent: Friday, August 04, 2000 12:47 PM To: [EMAIL PROTECTED] Subject: (syntax) variable naming conventions I've started to use some variable prefixes in some of my code and was wondering what others were using. I'd like to see a few examples before I post an article on it. My usage at the moment is limited to complex data types: aArray sStructure qQuery oObject I'm sure a case can be made for something like xWDDX, bBoolean, iInteger, nNumber, dDate, tTextString, lList but I'd rather not go that far yet. Who's using something like this? Is it helping you in any way? Is it hindering you in any way? -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
RE: (syntax) variable naming conventions
I suppose I could have gave a link for hungarian notation ehh? http://msdn.microsoft.com/library/techart/hunganotat.htm A warning its a pretyt in depth article and hungarian notation was designed for C/C++ but the concepts apply and the principles are generic enough to where they really would help out with CF practices.. really great stuff the guy who came up with this was smart :) I suppose we need ColdFusiionian Notation maybe you can start a nice white paper create your own notation for CF .. well call it Dinowitzian G Seriosuly I imagine that paper is a great starting place to get some more ideas goin Jeremy -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] Sent: Friday, August 04, 2000 12:47 PM To: [EMAIL PROTECTED] Subject: (syntax) variable naming conventions I've started to use some variable prefixes in some of my code and was wondering what others were using. I'd like to see a few examples before I post an article on it. My usage at the moment is limited to complex data types: aArray sStructure qQuery oObject I'm sure a case can be made for something like xWDDX, bBoolean, iInteger, nNumber, dDate, tTextString, lList but I'd rather not go that far yet. Who's using something like this? Is it helping you in any way? Is it hindering you in any way? -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: (syntax) variable naming conventions
I use prefixes on lots of things My query names all begin with qry. Arrays begin with arr. Form fields begin with the type they are. 'txt' for text, 'rad' for radio, 'btn' for button, 'htxt' for hidden text, etc. The only things I don't prefex are Session and Application variables because it's rather obvious what those are. This might be just an old habbit from my VB days, and it might be a bit excessive sometimes, but this really helps me see what I'm trying to do, at a glance. Also having a small set of repetative prefixes allows me to quickly scan my code for them to find my variables, instead of trying to look for each individual variable name. It's just easier for me in the long run. Todd Ashworth - Original Message - From: "Michael Dinowitz" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 04, 2000 12:46 PM Subject: (syntax) variable naming conventions | I've started to use some variable prefixes in some of my code and was | wondering what others were using. I'd like to see a few examples before I | post an article on it. My usage at the moment is limited to complex data | types: | aArray | sStructure | qQuery | oObject | I'm sure a case can be made for something like xWDDX, bBoolean, iInteger, | nNumber, dDate, tTextString, lList but I'd rather not go that far yet. | Who's using something like this? Is it helping you in any way? Is it | hindering you in any way? -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: (syntax) variable naming conventions
Not a bad habit to get into. Spectra uses extensive variable prefixing. Their list is: st = structure a = array q = query w = wddx wst = wddx of a structure (etc.) Sharon At 12:46 PM 8/4/2000 -0400, Michael Dinowitz wrote: I've started to use some variable prefixes in some of my code and was wondering what others were using. I'd like to see a few examples before I post an article on it. My usage at the moment is limited to complex data types: aArray sStructure qQuery oObject I'm sure a case can be made for something like xWDDX, bBoolean, iInteger, nNumber, dDate, tTextString, lList but I'd rather not go that far yet. Who's using something like this? Is it helping you in any way? Is it hindering you in any way? --- --- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body. -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: (syntax) variable naming conventions
From: "Michael Dinowitz" [EMAIL PROTECTED] I've started to use some variable prefixes in some of my code and was wondering what others were using. I'd like to see a few examples before I post an article on it. My usage at the moment is limited to complex data types: aArray sStructure qQuery oObject I'm sure a case can be made for something like xWDDX, bBoolean, iInteger, nNumber, dDate, tTextString, lList but I'd rather not go that far yet. Who's using something like this? Is it helping you in any way? Is it hindering you in any way? After too many years of obfuscating my own code with prefix oriented var naming schemes I've devolved to using two basic rules. 1. Context relative functional naming of variables - code should show meaning, not force a reference to a secondary decoding table. I.E. pingHost_NAME, pingHost_IP, pingHost_lastRTT, etc. 2. Suffixing when 1. produces ambiguity or there is no easy context relative naming possible. I.E.,getHostsDATA_array, employeeData_STRUCTURE, doIncludeDateParser_boolean etc. There isn't any penalty for using long var names. If visibility of logic and job steps is of a higher priority than simplifying code writing, then using explicit names is (IMO) better. Prefixing has always seemed to be a feature of top down imposed shop rules for controlling idiosyncratic programmer-babarbrians. "Extreme programming" seems to be the latest incarnation of this kind of style. Besides - something from COBOL should be still useful. :) Of course, if we were still restrained by hardware issues (ram/storage) and if assembler and microcode were still the only way to code, then hyperabbreviated names would be highly prized - i.e., as much like APL coding as possible. :) ObOldFartStory: Once there was a colleague of Pottowatami extraction who used a naming scheme that always seemed to include referents like DO scalpem-whiteman WHILE counting-coup Pan -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
Re: (syntax) variable naming conventions
There isn't any penalty for using long var names. If visibility of logic and job steps is of a higher priority than simplifying code writing, then using explicit names is (IMO) better. Prefixing has always seemed to be a feature of top down imposed shop rules for controlling idiosyncratic programmer-babarbrians. "Extreme programming" seems to be the latest incarnation of this kind of style. Yea, Verily! Besides - something from COBOL should be still useful. :) "Is that CoBOL 68 Extended or Nevada CoBOL?", Asks Grace Hopper. Of course, if we were still restrained by hardware issues (ram/storage) and if assembler and microcode were still the only way to code, then hyperabbreviated names would be highly prized - i.e., as much like APL coding as possible. :) I can write that program in two lines! Iversen is raveling in his grave! I couldn't resist apologize to the list. Dick -- Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ To Unsubscribe visit http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.