Dirty Source Code

Why, oh why do classes, which have the purpose to remove something from documents, always have to be named “XYZStripper”? As a programmer faithful to the (often unwritten) coding conventions, I have to name instances of such classes of course - “stripper“. Unfortunately the names of those stripping methods do not quite match the juicyness of the class name. I would like to code things like stripper.renderNaked() or stripper.undoClips().

And with a swing of her hips
She started to strip
To tremendous applause
She took of her drawers

And with a lick of her lips
She undid all her clips
And threw it all in the air
And everybody stared

Chris de Burgh: Patricia the Stripper

One Response to “Dirty Source Code”

  1. chrisahn
    November 13th, 2008 | 2:35 pm

    Michael Kay, the author of Saxon, said something similar:

    Years ago, I took some childish pleasure in naming the class that does whitespace-stripping in Saxon “Stripper.java”.

    Guess what? The second-most popular entry point to the Saxonica web site from Google is …/javadoc/net/sf/saxon/event/stripper.html

    http://saxonica.blogharbor.com/blog/_archives/2006/10/6/2391810.html

    :-)

Leave a reply

Warning: comments containing links will be eaten by our spam protection.