- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
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"
Admin
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"
Admin
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.....
Admin
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.
Admin
<JABBERWOCKY>
<TWASBRILLIG>
I'm quite sure the spec would be a long passage quoted from Kafka...
>/TWASBRILLIG>
</JABBERWOCKY>
Admin
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).
Admin
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>
Admin
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.
Admin
Because
Admin
Point taken
Admin
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.
Admin
Now this is a useful comment, from my PowerBuilder days ...
// Luke, I am your father
child.setParent( this );
Admin
Man, nerds can be so effing annoying, can't they?
Admin
A friend of mine wrote a class with these 2 methods.
void setParent( SomeObjectId id);
SomeObjectId whoseyourdaddy():
Admin
Who cares for "customers" at Apache anyway ?
Admin
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
Admin
A guy at work used to do this:
char *willy = (char *)malloc(100);
// ...
free(willy);
captcha: photogenic
Admin
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.
Admin
Awesome one. I've done that before. Still cracks me up (did it all the time in Borland Delphi)
Admin
Who is Gregor Samsa? The Brillant Paula's brother...
Admin
It's !true
Admin
Save the cute comments for the bathroom wall...
Admin
It's actually base D, and intended to D-base you.
Now, who knows the NEXT stock phrase in this perennial hacker conversation?
Admin
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!).
Admin
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
Admin
Quick, What movie:
"Ready Kafka"
give up.
Spaceballs.
Admin
Sigh. Base is not something you should really be joking about.
Admin
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.
Admin
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!
Admin
WOW!.. this will be my sign by now!
Admin
I read that book in college, in a course titled... wait for it...
Self-realization and Self-actualization in Modern Literature
Admin
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.
Admin
This is a great movie =D
Kevin Spacey roX
Admin
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.
Admin
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