Google Groups

Don't use Elbonian notation (was Re: Hungarian notation)

Michael H. Manov May 5, 2001 3:23 PM
Posted in group: comp.lang.c++.moderated
On Wed, 02 May 2001, Ken Hagan wrote: [snip]

>The question is largely irrelevant anyway. Good programmers should be able
>to read all the popular styles for layout and naming, so it doesn't matter
>what style they write in.

Once upon a time, we at Glagolitic Software decided to use
Hungarian notation. Sadly, it got away from us, and
degenerated into what we later called Elbonian Notation.
Here is our story. Don't let this happen to you.

It all started when our chief architect said that we needed
to increase accountability in our code; to do so, each coder
would henceforth prepend his first name to each local
variable. So, we had variables such as yuriColumnIndex and
janaRowCounter. The next step in increased accountability
was to add the names of the coders' team leads. This was
implemented by adding patronymics to the existing coder's
names, leading to juanitaSergeyvichCallbackIterator and
nikitaOreillyBackInserter. So far, the inconvenience was
only modest.

The real turning point came one night when the pizza was
late and Mike (not his real name) got a bit light-headed.
In his delirium, he said "Has anyone ever really implemented
PJ Plauger's idea of writing code that can be read as
literature?". That very night, he revised our coding style
guide, directing that, as you scan the code, the variable
name prefixes should read as literature. As an example, he
showed how an uninitialized pointer should be named (the
Haiku form is optional):
   char* toPointOrNotToPoint_havingAsYetNoValue_iDoNeither;

We tried to follow his direction, but the vision never became
reality. We hired a newbie C++ coder on the strength of his
being a finalist in the Edgar Bulwer-Litton Bad Fiction
contest, but he never wrote anything but Burma Shave jingles;
we had to let him go.

In the end, what was supposed to have been literature became
cubicle chatter and gossip; people talked about what they
always like to talk about. Some used their code to publicize
office misdeeds:
   int joeySwipedMyTwinkiesYesterday_that_FINK = 42;

Others used their code to pursue their own personal agendas:
   int swfSeeksCompanionForLongWalksOnBeach_BmwM3Helpful = 29;

One unanticipated benefit of the latter was a strong increase
in developer participation in code reviews. Ultimately, though,
the social overhead of the policy overwhelmed the software
objectives. An experiment in which we embedded advertising
{int ourEBusinessSolutionKicksBits = 1;} in our source code
product line backfired, reducing sales. As our software
functionality withered, efforts to syndicate the source
code with a local TV soap opera, "As The Mouse Wheel Turns",

Our once-proud business now stands on the brink of failure.
Our new Software Architect is our last hope. She has a degree
in Accounting and Business Software. Her first policy change
takes effect tomorrow: all variable names are now limited to
six characters. Brothers and Sisters, please wish us luck ...


[Dear Moderator: if this is too silly to post, well, that's
 OK. I had fun writing it anyway.]

      [ Send an empty e-mail to for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]