Hacker News new | ask | show | jobs
by Patient0 4939 days ago
In my first job out from school I worked with a bunch of ex COBOL programmers who were re-writing the system in this new-fangled language called "C".

One convention was that all "procedures" should be prefixed with a name indicating where they were in the call graph of the program.

So the main method was always:

    int main()
    {
       a_initialize();
       b_process();
       c_shutdown();
    }
The first function called by a_initialize had to be called "aa_", then "ab_" and so on:

    void a_initialize()
    {
        aa_connect_database();
        ab_read_accounts();
        ac_read_ledger();
        ...
    }

and so on.

Of course, sometimes you had to write a function that had to be called from more than one place (strange I know!!)

For this, the naming convention "pzzDDDD" was used where D was a digit from 0-9. "p" for procedure and "zz" because these functions didn't belong to any one place in the hierarchy.

We had a print out of the "pzz"s because just the number was hard to remember. But I can still remember a few of them:

* pzz0030 was for looking up account information from the database (but also for maintaining this information).

* pzz0031 for contracts

* pzz0241 I think was for looking up fees and commissions.

Most of the "functions" had lots of parameters so that they could do different things (modify, update, delete accounts etc.). This soon became unwieldy so eventually you had:

* pzz0241_a_setupcharges()

* pzz0241_c_cleanup()

or something. I forget the details for this last bit.

This was in 1997.

Neat huh? ;-)