Skip to content

software monocytes…

A white blood cell which can ingest dead or damaged cells (through phagocytosis) and provide immunological defences against many infectious organisms.

There seems to be a crying need in many software organizations to have a (at least) few designated people whose job includes being software monocytes. That is to say they go around looking for code that is no longer being used or has been rendered obsolete by the passage of time.


  1. Dead Code
    For example, ‘obviously’ dead code like this should be cleaned up by the ‘monocyte’.

    if ( retrieveValue() == null ) {
         int x = 1;

    and reduced to


    But can the retrieveValue() call itself be eliminated?
    It might not be worth it to a regular developer to trace back down through all the method calls to see all of the original code is truly dead, but someone should. Expensive calls to the database could end up being eliminated.

  2. Obsolete Code
    In Java 1.4, Boolean Boolean.valueOf(boolean b) was introduced. That means all home-grown utility methods that did the same thing should be eliminated. (Of course with Java 5’s autoboxing any explicit method call is unnecessary)
  3. Commented out code
    How many times have you seen code that has been preserved for posterity

    // This code commented out because of a bug
    // with exporting as soon as this is fixed put this back.
    // t.exportData(true);
    // t = null;

    How long has this been preserved? Many times it turns out that it has been there for years… waiting for that developer to come back and uncomment it. In the mean time, successive developers have faithfully preserved this code, not quite certain of who put the comment in but unwilling to ignore the large “Do not erase”. Time for the monocyte to come through and erase it!

    (Side rant: that mystery developer should have attached the date and their initials to the ‘comment-out’ comment.)

To those who say everyone should be ‘monocytes’ and it shouldn’t be anything special: I would agree that that is ideal. However in larger code bases with lots of legacy code that may not be practical.

Posted in technical.

black box voting in Venezuela

I find this story a little fun. You would think they would trust computers more. Why wouldn’t they trust Diebold voting machines?

Considering how much Chavez has been ranting about the US’s policies and how the government is trying to overthrow him you would think that he should be the one complaining. After all how hard would it be for the CIA to rig the machines so that Chavez was voted out of office? Seems awfully similar to this little CIA operation

Posted in political, privacy.

is this the best cookbook ever?

A friend of mine, formerly (maybe) of the SupperClub told me that Larousse Gastronomique is the best cookbook ever. Considering just how many cookbooks there are that seems a bit of a stretch.

So I brought it for my sister, the serious amateur chef. She gave it high marks for being not so much an straight out cookbook but rather a encyclopedia of cooking knowledge. Spice utilization and what “confit” means (meat cooked in its own fat) are among its entries.

Definately a book that the serious chef must have!

Posted in entertainment.