Comment On Who is Gregor Samsa?

Sindri Traustason came in to work one morning to find himself the new owner of a high-priority issue that one of their customers were experiencing: all pages in their web application were erroring-out. Sindri dug in and found the following stack trace in the error logs ... [expand full text]
« PrevPage 1 | Page 2Next »

Re: Who is Gregor Samsa?

2006-07-11 14:58 • by Harsh
that is awesome

Re: Who is Gregor Samsa?

2006-07-11 15:01 • by ParkinT

Forty Two


(or six times nine)

Re: Who is Gregor Samsa?

2006-07-11 15:01 • by Sean
This is truly a Kafka-esque WTF.

Re: Who is Gregor Samsa?

2006-07-11 15:02 • by Jeff S
81162 in reply to 81161
Who is Keyser Soze ?

Re: Who is Gregor Samsa?

2006-07-11 15:05 • by uep
A little eccentric, but I think it's pretty cool actually.  I remember reading that story in highschool...

Just like the story, the code turned into a cockroach... or maybe it's not like the story, because cockroaches don't die.

Re: Who is Gregor Samsa?

2006-07-11 15:10 • by kmerkle
81167 in reply to 81165
Who is John Galt?

Re: Who is Gregor Samsa?

2006-07-11 15:10 • by Ben Adams
cockroach = bug ... coincidence?
---------------------------------------
Chance favors the prepared mind. - L. Pasteur

Re: Who is Gregor Samsa?

2006-07-11 15:12 • by Pyromancer
81169 in reply to 81165
Well that is definitely a BUG in the program :)

Re: Who is Gregor Samsa?

2006-07-11 15:14 • by JL
At least they thoroughly documented it.

Re: Who is Gregor Samsa?

2006-07-11 15:15 • by APAQ11
81171 in reply to 81169
At least it was well commented.

Re: Who is Gregor Samsa?

2006-07-11 15:15 • by Dazed
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.

Re: Who is Gregor Samsa?

2006-07-11 15:16 • by Satanicpuppy
W. T. F.

Re: Who is Gregor Samsa?

2006-07-11 15:17 • by tookie tookie
81174 in reply to 81172

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.


Amen

Re: Who is Gregor Samsa?

2006-07-11 15:17 • by Whacky Waving Inflatable Arm Flailing Tube Man
I'm thinking the name has more to do with the cockroach reproduction frequency, since this is an infinite recursion error.  Could just be coincidence too...

Re: Who is Gregor Samsa?

2006-07-11 15:18 • by unedjamacated
I know in my days I've embedded snippets into CVS/subversion logs, and comments.

One time I put the entire intro from an episode of the twilight zone, and another time, the six million dollar man.

"Submitted for your approval: one Max Phillips, a slightly the worse for wear maker of book, whose life has been as drab and undistinguished as a bundle of dirty clothes. And though it's very late in his day, he has an errant wish that the rest of his life might be sent out to a laundry to come back shiny and clean, this to be a gift of love to a son named Pip. Mr. Max Phillips, Homo sapiens, who is soon to discover that man is not as wise as he thinks, said lesson to be learned in the Twilight Zone."

On a bugfix commit ;) I thought it was rather nice.

Also:

"Gentlemen, we can rebuild him. We have the technology. Better than he was before. Better, stronger, faster."

On a commit to improve the performance of the innermost loop in a part of our application that was slowing down too much. PS object creation is slow, don't loop around it.

Re: Who is Gregor Samsa?

2006-07-11 15:20 • by Oscar L
81177 in reply to 81174
tookie tookie:

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.


Amen



And a Hallelujiah.  Stuff like this is funny when you're writing it, but there should definitely be a price to pay when someone else has to deal with your "cleverness" later.

Re: Who is Gregor Samsa?

2006-07-11 15:23 • by Nonny moose

its open source it can't have bugs


oh and you haven't seen the spec


</sarcasm>

Re: Who is Gregor Samsa?

2006-07-11 15:28 • by Sunday Ironfoot
81183 in reply to 81176
Sometimes I feel the same way as Gregor Samsa when I have to use XSLT...

"What has happened to me?", he thought. It was no dream....he was being forced to write XSLT!!! Oh Noos!!!11"

Re: Who is Gregor Samsa?

2006-07-11 15:29 • by Mike K.
This is a good one. We need more open source code WTF's. I know there a lot of them out there, as I've always been a huge open-source advocate.

Re: Who is Gregor Samsa?

2006-07-11 15:31 • by doodle
81185 in reply to 81176

Anonymous:
PS object creation is slow, don't loop around it.


Just make sure that object cleans up everything it needs to after every loop.


I was caught off guard by this one day, an email class that I wrote, and used many times, but used only to send 1 email at a time.


I had to send an email to about 20 clients about a problem with their orders placed over the weekend after a stored proc didn't get updated (#1 WTF) on Friday (#2 WTF)


Seconds before running the script, the project manager wanted a CC on every email, and before then, I  had the object creation inside the loop.  After this request, I moved the object creation outside of the loop.


The horror exposed itself after running the script and the send() function did not clear out items like Message Body, To, CC, BCC fields.


Client #1 got the email perfectly.


Client #2 got Client's #1 email, plus his appended to the message body


Client #20... well, got to see all Client#1-Client19's messages and email addresses in the To: field.


I almost hurled, then fixed the class.


 


 

Re: Who is Gregor Samsa?

2006-07-11 15:35 • by Time Waster
From: Xalan Developer
Sent: Tuesday, July 11, 2006 2:30 PM
To: The Apache Software Foundation
Subject: Source Code Availablity

Dear Apache Software Foundation,

I've noticed that you released my project as open source, as I have seen my
comments on The Daily WTF. Be warned that the comments in my code are immune
to goggles are should be immediately removed from your site.

Thank you for your cooperation.

-- Xalan Developer

captcha: stfu (I should listen to it, shouldn't I?)

Re: Who is Gregor Samsa?

2006-07-11 15:45 • by Steeldragon
81190 in reply to 81185
Anonymous:

Anonymous:
PS object creation is slow, don't loop around it.


Just make sure that object cleans up everything it needs to after every loop.


I was caught off guard by this one day, an email class that I wrote, and used many times, but used only to send 1 email at a time.


I had to send an email to about 20 clients about a problem with their orders placed over the weekend after a stored proc didn't get updated (#1 WTF) on Friday (#2 WTF)


Seconds before running the script, the project manager wanted a CC on every email, and before then, I  had the object creation inside the loop.  After this request, I moved the object creation outside of the loop.


The horror exposed itself after running the script and the send() function did not clear out items like Message Body, To, CC, BCC fields.


Client #1 got the email perfectly.


Client #2 got Client's #1 email, plus his appended to the message body


Client #20... well, got to see all Client#1-Client19's messages and email addresses in the To: field.


I almost hurled, then fixed the class.


 


 


lol...#20 mustve had a VERY long Email to read

Re: Who is Gregor Samsa?

2006-07-11 15:46 • by richleick
81191 in reply to 81187
From: The Apache Software Foundation
Sent: Tuesday, July 11, 2006 2:30 PM
To: Xalan Developer
Subject: RE: Source Code Availablity
Dear Xalan Developer,

Thank you for your past request. 

The Apache Software Foundation provides organizational, legal, and financial
support for a broad range of open source software projects. The Foundation
provides an established framework for intellectual property and financial
contributions that simultaneously limits contributors potential legal exposure.
Through a collaborative and meritocratic development process, Apache projects
deliver enterprise-grade, freely available software products that attract large
communities of users. The pragmatic Apache License makes it easy for all users,
commercial and individual, to deploy Apache products.


Formerly known as the Apache Group, the Foundation has been incorporated as
a membership-based, not-for-profit corporation in order to ensure that the
Apache projects continue to exist beyond the participation of individual
volunteers. Individuals who have demonstrated a commitment to collaborative
open-source software development, through sustained participation and
contributions within the Foundation's projects, are eligible for membership in
the ASF. An individual is awarded membership after nomination and approval by a
majority of the existing ASF members. Thus, the ASF
is governed by the community it most directly serves -- the people
collaborating within its projects.

The Foundation is a collaborative project of the ASF. Our goal is
to build and sustain the literal foundation upon which our open-source
software projects are based. Like the other projects, we will need
help to achieve this goal, and several groups have already contributed
their time and effort to good effect. However, it is often difficult
to find volunteers to perform the essential grunge work behind the
scenes. We are in the process of putting together a support
organization, using funds contributed
by the Apache community, that will provide the administrative
assistance needed to keep the projects moving at full steam.

Anonymous:
From: Xalan Developer
Sent: Tuesday, July 11, 2006 2:30 PM
To: The Apache Software Foundation
Subject: Source Code Availablity

Dear Apache Software Foundation,

I've noticed that you released my project as open source, as I have seen my
comments on The Daily WTF. Be warned that the comments in my code are immune
to goggles are should be immediately removed from your site.

Thank you for your cooperation.

-- Xalan Developer

captcha: stfu (I should listen to it, shouldn't I?)

Re: Who is Gregor Samsa?

2006-07-11 15:48 • by BletchleyPark
A new take on literate programming...

 





Re: Who is Gregor Samsa?

2006-07-11 15:52 • by mare
oh, come on, this is no wtf :P
...that Apache Xalan, an XSLT processor...
XSLT, which is a language for transforming XML documents...
...he found himself transformed...

Re: Who is Gregor Samsa?

2006-07-11 15:56 • by Disgruntled DBA
AHHH!  The flashbacks!

http://thedailywtf.com/forums/thread/52710.aspx

Re: Who is Gregor Samsa?

2006-07-11 15:56 • by Mark H
81195 in reply to 81161
Sean:
This is truly a Kafka-esque WTF.


This is a very clever WTF. I mean, the guy wakes up as a cockroach and there is ZERO explanation of it. Even Samsa himself adjusts pretty quickly. Meanwhile, the reader is muttering to himself "wtf?"

Same thing with The Trial, just drops the reader into the middle of a bizarre world with no explanation. It's a close analogy to most of the stories here, where somebody gets pulled into maintain code without any explanation of what's going on, and the deeper they dig...

Why they would intentionally do this in public code is beyond me, though. Maybe some obscure design philosophy?

Re: Who is Gregor Samsa?

2006-07-11 15:59 • by squirrel
And how simple it would have been to switch one line:
protected static String DEFAULT_TRANSLET_NAME = "GregorSamsa";

becomes
protected static String GREGOR_SAMSA = "DefaultTransletName";

You can even keep the clever comment.

Re: Who is Gregor Samsa?

2006-07-11 16:03 • by Wang-Lo
I do this sort of thing all the time. But I never substitute cute remarks for proper comments.

Well... hardly ever. I have labeled the cleanup section of a unit with the comment

"What am I, your mother?"

but it was pretty obvious that it was just a cleanup section.

-Wang-Lo.

Re: Who is Gregor Samsa?

2006-07-11 16:03 • by Sam

Actually, as soon as I saw the title I knew this had to do with The Metamorphosis.


The real WTF is that he wasn't a cockroach.  He was some other kind of beetle, according to novelist/entomologist Vladimir Nabokov.  Really, Alex, spreading such falsities....tsk, tsk.

Re: Who is Gregor Samsa?

2006-07-11 16:09 • by byte_lancer
81199 in reply to 81198
Alex!! What has thou done?

**Apparently at this very moment, our dear Paula has taken notice and started writing comments of similar nature in her code. That unfortunately, has resulted in the exclusion of the unnaturally Brillant tragedy of the single system.out.println statement**

Re: Who is Gregor Samsa?

2006-07-11 16:10 • by richleick
81200 in reply to 81197
Anonymous:
I do this sort of thing all the time. But I never substitute cute remarks for proper comments.

Well... hardly ever. I have labeled the cleanup section of a unit with the comment

"What am I, your mother?"

but it was pretty obvious that it was just a cleanup section.

-Wang-Lo.


I love this section of code, seeing as how the code is almost always added (checked in) to a repository that already tracks this.

/* Change Log: Enter Comments Below
  2002-11-01:  USER A
  Fixed Bug with...
  .....
  2006-07-11: SMART-A$$
  Go check the CVS logs and compare if you want to know what was done.
  DUH!  No, we would rather have a huge list of changes dating back years that cause
  us to scroll numerous pages before we can get to the actual code.
*/

Re: Who is Gregor Samsa?

2006-07-11 16:13 • by Franz Kafka
81201 in reply to 81198
Anonymous:

Actually, as soon as I saw the title I knew this had to do with The Metamorphosis.


The real WTF is that he wasn't a cockroach.  He was some other kind of beetle, according to novelist/entomologist Vladimir Nabokov.  Really, Alex, spreading such falsities....tsk, tsk.



Damnit Jim, I'm a Philosopher, not an entomologist!

Re: Who is Gregor Samsa?

2006-07-11 16:13 • by emurphy

Re: Who is Gregor Samsa?

2006-07-11 16:15 • by triso
Alex Papadimoulis:

...Apache Xalan, an XSLT processor, creates "Translet" classes at runtime...


What is the purpose of creating classes at runtime other than a WTF generator?  

Re: Who is Gregor Samsa?

2006-07-11 16:22 • by SolidSilver
81205 in reply to 81160
ParkinT:

Forty Two


(or six times nine)


"Nobody writes jokes in base 13." - DNA

Re: Who is Gregor Samsa?

2006-07-11 16:44 • by VGR
What's truly frightening about this is how widespread xalan is.  It's the default transformer of Java.



Every time I see source from an Apache project, my confidence in all Apache projects dwindles.



Re: Who is Gregor Samsa?

2006-07-11 16:47 • by GoatCheez

He is Franz Kafka!

Franz Kafka!

Be careful if you get him pissed…

Franz! Franz Kafka!

He’ll smite you with metaphor fists

Right now he can, he’s just a man

A warrior of words taking a stand

He is Franz Kafka!
Oh look, but there he is, what will he say?

I’m a lonely German…a lonely German from Prague!

Kafka! Kafka! Kafka!

Re: Who is Gregor Samsa?

2006-07-11 17:08 • by Scalar Context!
81209 in reply to 81207

http://en.wikipedia.org/wiki/Gregor_Samsa


You'll notice that the Wikipedia knew about this class all along!

Re: Who is Gregor Samsa?

2006-07-11 17:21 • by Reed
I love it!!


Re: Who is Gregor Samsa?

2006-07-11 17:30 • by qntmfred
81211 in reply to 81209
all along? well, a couple hours maybe

Re: Who is Gregor Samsa?

2006-07-11 17:46 • by Vercintegorix.
81215 in reply to 81204
triso:
Alex Papadimoulis:

...Apache Xalan, an XSLT processor, creates "Translet" classes at runtime...


What is the purpose of creating classes at runtime other than a WTF generator?  
It's all the rage these days. runtime classes + reflection. Why write code when you can write code to write code (to write code(to write code(to write code( ... ))))?

Re: Who is Gregor Samsa?

2006-07-11 17:54 • by richleick
81219 in reply to 81211
Anonymous:
all along? well, a couple hours maybe

:-$

Re: Who is Gregor Samsa?

2006-07-11 18:02 • by hanuman
81220 in reply to 81207
GoatCheez:
He is Franz Kafka!

Franz Kafka!

Be careful if you get him pissed…

Franz! Franz Kafka!

He’ll smite you with metaphor fists

Right now he can, he’s just a man

A warrior of words taking a stand

He is Franz Kafka!
Oh look, but there he is, what will he say?

I’m a lonely German…a lonely German from Prague!

Kafka! Kafka! Kafka!


That's my favorite reference I've seen on this site... ever.  Good stuff.  BTW, have you seen this GoatCheez: http://en.wikipedia.org/wiki/Dethklok

Where is Carmen San Diego?

Re: Who is Gregor Samsa?

2006-07-11 18:15 • by GoatCheez
81222 in reply to 81220
Anonymous:
GoatCheez:
He is Franz Kafka!

Franz Kafka!

Be careful if you get him pissed…

Franz! Franz Kafka!

He’ll smite you with metaphor fists

Right now he can, he’s just a man

A warrior of words taking a stand

He is Franz Kafka!
Oh look, but there he is, what will he say?

I’m a lonely German…a lonely German from Prague!

Kafka! Kafka! Kafka!


That's my favorite reference I've seen on this site... ever.  Good stuff.  BTW, have you seen this GoatCheez: http://en.wikipedia.org/wiki/Dethklok

Where is Carmen San Diego?


Oh I can't wait at all. I'm a HUGE metal fan. I think Dethklok will be one of the greatest shows ever.

He is Franz Kafka!

Re: Who is Gregor Samsa?

2006-07-11 18:55 • by Aeonymause
gregor samsa was NOT transformed into a "cockroach". This is a point of controversy, as the cockroach was a result of an overzealous first translation into english, and many (rightly) believe that it ruins the experience of reading it for the first time.

A more accurate translation is that he was transformed into a "bug" or "Monstrous Vermin"

Re: Who is Gregor Samsa?

2006-07-11 20:54 • by Inmare
Reminds me of a programming test I did two or three weeks ago. It was the day before the soccer match Germany-Sweden, so, living in Germany, the task was to do a match-tracking tool (goals, time...). The lecturer predicted the actual result with his example, letting Germany win by 2:0.
I couldn't resist and wrote the text of the Swedish national anthem as only comment (except of registration no and my name). Still got the best grade :-) but Sweden lost :-(.

Re: Who is Gregor Samsa?

2006-07-11 21:50 • by Rimu
81229 in reply to 81185
I did this once.... Only it was sent to 9000 people.

Needless to say, the server was bought to it's knees and the hosting company was not happy. At all.

Re: Who is Gregor Samsa?

2006-07-11 22:03 • by Anonymous Coward
Oh, the wonders of programmers completely stripped of any talent. 



I think the author of that class ought to be identified (no, I haven't
bothered to look it up), and ridiculed as the pretentious dinwit he is
for failing to pick a self-explanatory name for his class (any, and I
mean, ANY monkey of a programmer can do that), while at the same time
trying to appear clever by namedropping characters from last century's
most tedious, overrated, dystopian.

Re: Who is Gregor Samsa?

2006-07-11 23:40 • by 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?
« PrevPage 1 | Page 2Next »

Add Comment