Daily Archives: August 8, 2012

On Programming: Putting your own initials in your code

Are you a programmer. I know I am.

I’m currently working on Macro SPITBOL, a project I last worked on almost thirty years ago.

Today I decided to clean up some initialization code, to make it more compact, so I visited the SPITBOL tokenizer (tokens.spt), a file that I hadn’t looked at recently since it worked.

I noted at the start that it contained the comment:

it is based on earlier translators written by david shields, steve duff and robert goldberg.

I knew I had written some of the code, but wasn’t sure just which parts.

Then, while editing the file, I came across the label DSOUT. When I looked a little more, I found another: DSGEN.

That’s when I knew that I really had written some of this code, for I had intentionally left my fingerprints on it by fitting my initials into some of the names.

I then recalled other times I had made use of my initials when making up the names for some new code.

Making names is the part of the programming task that I bet non-programmers have never heard about.

Folks know that we programmers spend hours and hours in front of a screen typing. Some of them have even seen snippets of TV dramas or movies in which a nerdy-looking person is typing mysterious characters.

They know we are “writing code,” but only we folks who code know that one of the hardest parts of coding is coming up with names.

Each program defines its own universe — a world that you made up — and part of that universe is that everything important must be named: every procedure, every field, every argument, every local variable, every macro, every class, and so on.

A good naming convention is thus quite helpful. Indeed, many is the time that I’ve been stuck putting something new together because I didn’t have a scheme for generating the names, since you want names for related things to have similar forms. It makes the code more readable.

Eventually something comes together, and once you have your naming strategy down pat, the code may — on happy occasion — seem to write itself.

All of this is a roundabout way of wondering if other programmers express their craft by crafting their names into their code, or their employer’s code.

Are you a programmer? Have you done this? If so, please post a comment.

In my current role as a blogger, not a programmer, I assure you that your names will be kept anonymous…

PS: After posting this, I recalled a related incident from the Jikes days. We knew the code was going out in early December, so early in November I suggested to Philippe that we avoid making any major changes, so that we could concentrate on cleaning up the code, especially by making the names more uniform. The code by then was well over two years old, and we had put it together on the fly, as we learned the Java language and how to compile it. Also, we had recently revised much of the compiler to deal with an obscure feature called “inner classes.”

  • Pages

  • August 2012
    M T W T F S S
  • RSS The Wayward Word Press

  • Recent Comments

    daveshields on SPITBOL for OSX is now av…
    Russ Urquhart on SPITBOL for OSX is now av…
    Sahana’s Respo… on A brief history of Sahana by S…
    Sahana’s Respo… on A brief history of Sahana by S…
    James Murray on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated