Thursday, January 19, 2006

Create Syllable Dictonary

We should structure our projects with
a file named Abbrev.c. This is simple a single comment that contains the
syllable dictionary. This ensures that future maintenance programmers both
understand and can use the naming structure. For example:

Abbrev Meaning
------ -----------------------------
-- A --
Accl Acceleration, signed (ref: Dcel)
Acq Acquiring (ref: L.O.W)
Act Actual
Ad A/D (ref: Alog)
Adc Analog / Digital Converter
Addr Address
Adj Adjust
Ai Analog Input(s)
Aio Analog I/O
Alog Analog
Amp Amps (ref: volt)
Ana Analog (ref: Aio, Dig)
Ang Angle
Ao Analog Output(s)
Arg Argument(s)
Auto Automatic (ref: Manual)
Aux Auxillary mast, Auxillary pump (ref: Mast)
Avg Average (ref Typ)

-- B --
Bad Bad (ref: Ok)
Batt Battery (ref: Bsoc, Pwr)
Beg Begin (ref: End, Head, Start)
Bld Build
Bot Bottom (ref: Top)
Bsoc Battery State Of Charge
Buf Buffer (ref: Tbl)
But Button (ref: Sw)


Note the references on some items above, to point to related or
opposites. I have found that it is well worth spending several hours
crafting a good dictionary that supports the application domain of the
embedded system being produced.

Another convention that we have is that acronyms become camel-cased
syllables. Only the first letter is capitalized. Eg, PWM is used as
PwmOld. Among other things, this capitalization helps delineate the
syllables. Again, it is only an English convention that we write
abbreviations in all caps.

No comments: