Re: To Hungarian or not to Hungarian



"Peter Morris" <support@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:4729f8f4@xxxxxxxxxxxxxxxxxxxxxxxxx
I name things like this

FirstNameEdit: TEdit;
FirstNameLabel: TLabel;

Hi Pete,

I do much the same, making the root of the name fit the problem domain, and
following it with something that connects it to the visual component it is
associated with. For variables that are not directly connected to visual
components, it's problem domain plus a suffix (where appropriate for helping
to discern its purpose), and then only where it helps me remember what I'm
looking at. Some examples:

Airspeed_r - a record
Airspeed_a - an array of records
Airspeed_p - a pointer to the array

That's usually all of the type-related suffixes I use. Then there are a
relatively few that keep me straight on the function of a variable, for
example, Airspeed_n would refer to the number (count) of airspeeds in the
array, that sort of thing.

Otherwise, I pretty much stick to CamelCaps, with names describing the
problem domain purpose of the variable.

Cheers,
Van Swofford
Tybee Jet Corp.


.



Relevant Pages

  • Re: Performance improvement possible?
    ... processing the array was inefficient so I got rid of the array ... file.puts *stats file.fsync end ... storing output form the main simulation program when it was all in C/C++ ... it feels more natural to the problem domain. ...
    (comp.lang.ruby)
  • Re: Simulate Thread.Join
    ... Can I add to the array while it's being waited on? ... My problem domain ... involves walking directories on a remote system and I don't know how many ...
    (microsoft.public.dotnet.framework)