If that was the case then I have you beat by a few years.
bah yer both wrong anyway
They demand that âAâ standard be utilized, but donât specify which one. Because I come from Visual Basic from so many years ago, I will likely pick one of those because I still code in that manner and wouldnât have to change much. it took me a little research to find one that âmatchesâ what I already do, but I found one at http://www.pbdr.com/vbstd/VB%20Coding%20Standards(1).htm thatâs pretty close.
This is my first Department of Defense project. I donât know if anybody else has every gone through this, but holy crap!
No wonder they pay $500 for a roll of toilet paper. It has to conform to the Specifications of the Toilet Paper Advisory Committee, meet NSA standards on Toilet Paper Security, follow the OSHA guidelines on the Safe Implementation of Toilet Paper, and be certified by the National Toilet Paper Aerodynamics Board in order to be used. By the time you do all of that, you have to charge $500 a roll to still make ten cents!
Theres some interesting stuff in here. I have to say, I always prefix with 2 or 3 characters; when you have a large number of items in the navigator it helps a lot.
lbl - Label
lbx - Listbox
tf - Textfield
ta - Textarea
bb - Bevelbutton
cb - Checkbox
gb - Groupbox
tp - Tabpanel
iw - Imagewell
etc, etc.
I take it one step further too. If I have multiple textfields in say 2 groupboxes named âFooâ and âBarâ, they then become tfFooFieldname and tfBarFieldname. That way everything stays neatly organised within their own little sub groups.
It might be viewed as a bit OCD by some, but it works very well for me.
After reading all entries, it happens that I use prefix and suffixÂ
Prefis are used for stuff that ends in the Navigation pane (Windows, Modules, Controls, etc.)
Suffix are used to flag the variables (Properties) types: FI, Bool, Idx (for loop), etc.
Labels / TextArea / TextFields / PushButtons, etc.: I use uppercase prefix to say what Control it is, followed bu underscore(s) as separator for meaningfull names as someone stated above.
As an example, if I have a text editor and place some buttons, their name will have PB as prefix followed by Style (for example and ends with Bold, Italic, etc.
PB_Style_Standard, PB_Style_Bold, PB_Style_Italic, etc.
Easy to do with Copy / Paste, then easy to understand days-month-years after ;-
And after all, we use GroupBox for our interface ? So I use prefix to Âgroup controls.
Of course, this is theory sometimes I do mistakes too !
I use a prefix, but with less granularity and only on controls to group them by function in the IDE. I avoid using implementation details in variable and control names. What happens when you change some minor detail such as integer to double, or textfield to popupmenu? Names should be descriptive but concise. I use camel case because the IDE will autocomplete and auto correct the case, but Iâm not slavish about it and often just type the whole variable in lower case.
Prefixes? Suffixes? I use both, but in a consistent manner.
Objects and properties are prefixed in a manner very similar to what Thomas listed. Local variables are suffixed. That way when I come back to debug the function a month later I can immediately tell the scope of strTotal vs TotalStr.