The code is strong in this one...
-
Last week for some nonsense reason my boss agreed that I would help one of our customers with some code they were having problems with that worked with some of the data we feed to them.
Initially I was expecting some enormous screw up that would make my eyes bleed, but it wasn't terribly bad really. It was clearly the work of someone new to programming who had put it together what they could, but was struggling with the trickier bits. Variables were named in classic newbie tradition of what the variable is for, not what it does - lots of MyInteger1, String2, etc. and all the usuals that most people will probably recognise. Well, apart from one, OfTheJedi. "WTH is this for?" I was thinking. Then I got to the end to see the final line of the function. "return OfTheJedi;"
That was how every single function returned it's value. FFS.
-
I suppose it's more entertaining than that ugly bitch: retval.
-
@RayS said:
"return OfTheJedi;"
Someone's nephew and/or student wrote this. It's amazing how you can tell just from one line of code...
-
I like it.
-
At least it's not "Return of the King". Event trees walked in these movies.
-
There's only one Return, and it ain't of the king!
-
@RayS said:
return OfTheJedi;
Some days I wish I was in a position to affect the coding standards at my client.
-
Yes, I can see the problem there. Get him to change the "O" to lowercase. Or is this .net foolishness?
-
@dhromed said:
I suppose it's more entertaining than that ugly bitch: retval.
Her cousins err, result, and status are slightly less homely.
-
My favourite was always VB6: On Error Goto Hell
-
I saw an "88 level" in a Cobol program about 97 years ago called "HELL_FREEZES_OVER" just so the programmer could code
WHEN HELL_FREEZES_OVER.....
-
@lolwtf said:
My favourite was always VB6: On Error Goto Hell
In retrospect, probably the most accurate one...
-
Meh, I liked this better:
double cheeseburger;
char broiled;
long time;
-