• Michael Snyder (unregistered)

    That reminds me of a story of a lone comment in a section of thousands of lines of undocumented code within the OS360 project.  It appears in a section where the machine is going down due to a power failure and the kernel crashes before it can cleanly shut terminate the running processes.

    "The angels were confused when god died"

  • Dazed (unregistered) in reply to Michael Snyder
    Anonymous:
    That reminds me of a story of a lone comment in a section of thousands of lines of undocumented code within the OS360 project.  It appears in a section where the machine is going down due to a power failure and the kernel crashes before it can cleanly shut terminate the running processes.

    "The angels were confused when god died"

    Can't quite match that, but a colleague told me he once inherited a module consisting of many hundreds of lines of assembly language. The sole comment, on a line somewhere about the last page of the print-out, was:

    "Note: this is NOT a mistake"

  • Yello (unregistered) in reply to Dazed

    Was the bug not caused by the template that was being parsed ?
    Why blame Xalan ?

    Thats like saying 12/0 causes  an error  in Java......so it must be a crappy  language.....

  • the first one is free! (unregistered) in reply to Yello
    Anonymous:
    Was the bug not caused by the template that was being parsed ?
    Why blame Xalan ?

    Thats like saying 12/0 causes  an error  in Java......so it must be a crappy  language.....


    Not, Its not a bug. The problem is to do "literature programming" one step beyond, and start writting meaningless variables, metods and clasess with obscure external references.  Not only external references (to comic, books and films) are not usefull, but can be confusing:

    jWonderwomen := jHulk - kBatman;

    The root of problem can be people somewhat bored, creative people that use his creativity powers for evil, not for good.

    Imagine a backup strategy that use animal farm characters:

    pig.tar.gz
    buill.tar.gz
    penguin.tar.gz
    chicken.tar.gz 

    This name  DFGDFGDFG.tag.gz  its better than OHMYGOODPONIEES.tar.gz because the first is a nonsense, but the latest is a nonsense and create extra confusion and is distracting.

    --Tei

    postdata:
    Ok, theres a nice fun factor on these names. The problem is... If shit hit the fan, having funny names around is yet another extra problem.



  • (cs) in reply to Nonny moose

    Nonny moose:
    oh and you haven't seen the spec

    <JABBERWOCKY>
       <TWASBRILLIG>
          I'm quite sure the spec would be a long passage quoted from Kafka...
       >/TWASBRILLIG>
    </JABBERWOCKY>

  • tomandlu (unregistered)

    Hmm - IMHO naming a class in such a way that any google is going to return endless refs. to an irrelevant book is VERY irritating.... (that said, the second result I got for GregorSamsa is relevant, but nevertheless other, useful, results are embedded in endless literary links).

  • (cs) in reply to carfield
    carfield:
    I will really interested to know how the user of xalan library will reproduct the problem?

    Can anyone show me the code that will trigger the problem?



    It was something like:
    <font face="Courier New"><xsl:template name="star">
      <xsl:param name="stars"/>
      <xsl:if test="$stars>0">
        <!-- Some html to display a star image here -->   
        <xsl:call-template name="star">
          <xsl:with-param name="stars" select="$stars <font color="#ff0000">+</font> 1"/>
        </xsl:call-template>
      </xsl:if>
    </xsl:template>
    <font face="Times New Roman">
    The quite trivial error is highlighted in red.
    </font></font>

  • (cs) in reply to tomandlu

    tomandlu:
    Hmm - IMHO naming a class in such a way that any google is going to return endless refs. to an irrelevant book is VERY irritating.... (that said, the second result I got for GregorSamsa is relevant, but nevertheless other, useful, results are embedded in endless literary links).

    Speaking of Google, I found this at Google Groups (it was in someone's signature):

    <FONT style="BACKGROUND-COLOR: #ffff66"><FONT style="BACKGROUND-COLOR: #ffff00">Gregor</FONT> </FONT><FONT style="BACKGROUND-COLOR: #7fffd4">Samsa</FONT> awoke one morning to find himself
    transformed into an enormous software defect.

  • (cs) in reply to Yello
    Anonymous:
    Was the bug not caused by the template that was being parsed ?
    Why blame Xalan ?


    Because
    1. It failed to catch the faulty template and provide a meaningful error message
    2. The "cute" class name robbed the stack trace of any helpfulness it might otherwise have had.
  • Yello (unregistered) in reply to brazzy

    Point taken

  • (cs) in reply to triso

    Translets are XSL sheets that are transformed into compiled Java classes. This speeds up by 10-20% or so, because there is no need to re-parse the xsl sheet or use standard Java parsing and comparison to generate the output.

  • Stan (unregistered) in reply to unedjamacated

    Now this is a useful comment, from my PowerBuilder days ...

    // Luke, I am your father
    child.setParent( this );


  • JS (unregistered)

    Man, nerds can be so effing annoying, can't they?

  • packrat (unregistered) in reply to Stan

    Anonymous:
    Now this is a useful comment, from my PowerBuilder days ...

    // Luke, I am your father
    child.setParent( this );


     

    A friend of mine wrote a class with these 2 methods.

    void setParent( SomeObjectId id);

    SomeObjectId whoseyourdaddy():

  • boulax (unregistered) in reply to Dazed

    Who cares for "customers" at Apache anyway ?

  • Joakim (unregistered) in reply to Anonymous Coward

    GregorSamsa comment is part of the following class.
    http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java

    The origin of this comment is Morten Schmidt ([email protected])

    Original Comment added on Oct 31, 2001 (revision 335742) by morten.
    Original Variable value "GregorSamsa" added July 17, 2001 (revision 335204) by morten.

    captcha: photogenic


  • Eric (unregistered) in reply to Stan
    Anonymous:
    Now this is a useful comment, from my PowerBuilder days ...
    // Luke, I am your father
    child.setParent( this );


    A guy at work used to do this:

    char *willy = (char *)malloc(100);
    // ...
    free(willy);

    captcha: photogenic
  • Anita Tinkle (unregistered) in reply to Eric

    I once ran into a singleton class from hell (God Object) that carried over 35 thousand lines of code.

    I renamed the classname JohnHolmesClass then subclassed a new entity with the original name (so as not to break any code).

    It reminded me of a local pizza shop that had a "John Holmes Pizza" (a 15" pan pizza).

    good times.

  • Anita Tinkle (unregistered) in reply to Stan
    Anonymous:
    Now this is a useful comment, from my PowerBuilder days ...

    // Luke, I am your father
    child.setParent( this );




    Awesome one.  I've done that before.  Still cracks me up (did it all the time in Borland Delphi)
  • my name is missing (unregistered) in reply to Anita Tinkle

    Who is Gregor Samsa? The Brillant Paula's brother...

  • (cs) in reply to Stan

    Anonymous:
    Now this is a useful comment, from my PowerBuilder days ...

    // Luke, I am your father
    child.setParent( this );


    It's !true

  • joe (unregistered)

    Save the cute comments for the bathroom wall...

  • Caliban Darklock (unregistered) in reply to SolidSilver
    SolidSilver:
    ParkinT:

    Forty Two

    (or six times nine)


    "Nobody writes jokes in base 13." - DNA

    It's actually base D, and intended to D-base you.

    Now, who knows the NEXT stock phrase in this perennial hacker conversation?

     

  • Worf (unregistered)

    I won't defend the name, but the practice can be considered quite valuable.

    It works in the case where things go so badly that somehow you manage to do something bad (like instantiate the default class, overwrite some critical memory area, etc). If you called it "DefaultFoo", then it's likely someone using the system may call their Foo module "DefaultFoo". But calling it something almost no one would choose would show up in the error logs very easily.

    I'm sure when debugging and getting crashes, you often populate the memory you're using with 0xDEADBEEF or something other than 0x0 or 0xFFFFFFFF (or similar). The latter two you'd expect in normal execution, but if you start seeing register dumps with 0xDEADBEEF or variables containing it, you know something went wrong, and badly.

    Nonsensical values and names are a way of finding and catching bugs. DefaultFoo might be a good name to choose for a class, but if all of a sudden you see GregorSamsa instead in your error logs, well, something went wrong!

    In the early days, Apple had a lot of reports inside their memory manager code from developers. It turned out that the developers themselves were passing in bad values or corrupting the stack, and when they called an API function with the bad data, they had exceptions. The exception handler, tracing back through the system trace, when it couldn't find an exact symbol, found the symbol that was lower in memory, and displayed it as symbol+offset. The memory manager function had such a symbol but the offset was wildly incorrect, that function was just the symbol that was the last before the abort. So in the next MacOS revision, they stuck a symbol at the end of the memory manager that was, to the effect, YourProgramIsBuggy. (I forget the actual function name and other details, but Apple has a nice article on it!).

  • Mac Sandridge (unregistered) in reply to Dazed
    Anonymous:
    People who dream up these sorts of names should be dragged in from their day off and made to debug an application with similarly obscure names under the eyes of an agitated client. Repeat until lesson learned.


    Thankfully, it wasn't my job, but I knew a SAS programmer who was of German birth.  This isn't the odd part, she and I worked for a Florida based hospital and the first time she was away and someone else had to read her code, the managers got a serious shock!

    She coded the variables in GERMAN!  So, no reading the meaning from the name!

    Good luck!
    Mac
  • Sweets (unregistered)

    Quick, What movie:

    "Ready Kafka"



    give up.




    Spaceballs.

  • Ryan (unregistered) in reply to Caliban Darklock


    It's actually base D, and intended to D-base you.

    Now, who knows the NEXT stock phrase in this perennial hacker conversation?

     



    Sigh. Base is not something you should really be joking about.
  • (cs)

    Kafka might be the first author to write primarily about WTFs - we owe him a debt of gratitude. In the Penal Colony always seems real familiar to me - I think I was on that project.

  • Anony (unregistered)

    The real WTF is that he had to Google Gregor Samsa in the first place.

    Get some culture, people!!! Read every once in a while!

  • the first one is free! (unregistered) in reply to joe
    Anonymous:
    Save the cute comments for the bathroom wall...


    WOW!.. this will be my sign by now!
  • Gary Wheeler (unregistered)

    I read that book in college, in a course titled... wait for it...

    Self-realization and Self-actualization in Modern Literature

  • (cs) in reply to Mac Sandridge
    Anonymous:
    Thankfully, it wasn't my job, but I knew a SAS programmer who was of German birth.  This isn't the odd part, she and I worked for a Florida based hospital and the first time she was away and someone else had to read her code, the managers got a serious shock!

    She coded the variables in GERMAN!  So, no reading the meaning from the name!


    Don't be such a lazy American cultural imperialist! Everyone should learn a foreign language or two!

    SCNR

    Actually I write my variables in German all the time, as does everyone else I work with. Of course, we work in Germany, for a German company, with all the requirements and analysis documents being in German.
  • Proteu (unregistered) in reply to Jeff S

    This is a great movie =D
    Kevin Spacey roX

  • (cs) in reply to brazzy
    brazzy:
    Anonymous:
    Thankfully, it wasn't my job, but I knew a SAS programmer who was of German birth.  This isn't the odd part, she and I worked for a Florida based hospital and the first time she was away and someone else had to read her code, the managers got a serious shock!

    She coded the variables in GERMAN!  So, no reading the meaning from the name!


    Don't be such a lazy American cultural imperialist! Everyone should learn a foreign language or two!

    SCNR

    Actually I write my variables in German all the time, as does everyone else I work with. Of course, we work in Germany, for a German company, with all the requirements and analysis documents being in German.

    In fact, German has some useful terms that have no English equivalent. [In the US] I was on a subcontractor team where the prime contractor was not what you'd call culturally literate, so we called our sub-project Schadenfreude. Another time, I explained a project plan in terms of finding the schwerpunkt.

    And angst and weltschmerz are always good for a few laughs.
  • Ryan (unregistered) in reply to Worf

        Actually, a slightly more pragmatic one for x86 is to fill memory with 0xCC.  If you mistakenly jump into your data and try to execute it, it instantly breaks into the debugger or kills the program.  (0xCC = int 3)

    captcha: shizzle

Leave a comment on “Who is Gregor Samsa?”

Log In or post as a guest

Replying to comment #:

« Return to Article