RE: To case or not to Case

Subject: RE: To case or not to Case
From: Chuck Martin <CMartin -at- SERENA -dot- com>
To: TECHWR-L <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Tue, 20 Jun 2000 10:36:06 -0700

-----Original Message-----
> From: Carnall, Jane [mailto:Jane -dot- Carnall -at- compaq -dot- com]
> Sent: Tuesday, June 20, 2000 3:27 AM
> Subject: To case or not to Case
>
> While proofreading code, I came across a command written two
> ways in two
> bits of code only a paragraph apart:
>
> <disarmname> <fullghostname>
>
> <disarmname> <FullGhostName> / <ArmedGhostName>
>
> I queried this, and was told:
>
> They are not case sensitive, but the form fullghostname is preferable.

The command names may not be case sensitive (not unusual in most programming
languages), but all lower case for command names is not the standard among
programming circles. In fact, the convention is to initial cap each word in
the command name, which improves readability and maintenance. The same is
typically true for function names, object names, and so on.

However, when naming classes of objects, the convention is to lowercase the
first latter, which is usually an abbreviation for that type of object, and
then initial cap the rest of the words in the name, like this:

dlgFileOpen

>
> My instinct always tends towards making things consistent. In
> this case,
> however, I wondered if it was worthwhile leaving the commands
> inconsistent
> and pointing out that they are case insensitive. OTOH, if the
> programmer
> (rather inconsistently) prefers <fullghostname>...

Just because this particular programmer *prefers* that style does not mean
that it will be looked upon with great regard by your audience. If your
audience is other programmers, they will think that the programmer is being
sloppy, lazy, or both, with all lower case names.

>
> I know the programmer: he's likely not noticed that he had
> inconsistencies
> right next to each other if they made no difference to his code.
>

--
"I don't entirely understand it but it is true: Highly skilled carpenters
don't get insulted when told they are not architects, but highly skilled
programmers do get insulted when they are told they are not UI designers."
- anonymous programmer quoted in "GUI Bloopers"
by Jeff Johnson

Chuck Martin, Sr. Technical Writer
cmartin -at- serena -dot- com


***********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact
the sender by reply e-mail and destroy all copies of the original
message.
***********************************************************************




Previous by Author: RE: Trip Reports re: presentations
Next by Author: RE: Writing test
Previous by Thread: Re: To case or not to Case
Next by Thread: Re: To case or not to Case


What this post helpful? Share it with friends and colleagues:


Sponsored Ads