- 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
Oooh... I get to be the first responent....
Reminds my of a WTF I saw years ago. (The original was in the funky script used by FileNet -- which is a WTF in itself -- so I'll translate into a more recognizable language)
char cArnold = "|";
for(i=0; i<len; ++i)
{
/// TO stuff with str[i]
if (str[i] == cArnold)
break;
}
So, why is that variable called "Arnold"? After ponding it for some time (that idoim was used often in the code), I finally realized --- because it was the terminator.
Admin
Was that "true2" as in "true as well", or "too true"? Could things ever become "true" enough to become "false" due to "disbelief" or "astonishment"?
Admin
This is just the providing forward compatibility for boolean logic on quantum computers.
Admin
Dude, that is great. I'm gonna start using that one...LOL
Admin
Neat! What's the next value after "true2"? "true4ever"? and what about "false2"?
Admin
i stumbled upon some code that had parameters that looked like this: p_sSaveSTR
I assume the p_ stood for "parameter," the s prefix stood for string, and the STR was a backup for those who missed the s prefix. The interesting thing was that each method basically only accepted one parameters, which would be a string in the format of "Phil|Scott|3025 Wentworth Ave" and then they'd use split to convert the string into the array, and use the array to populate a recordset.
Got the job done, I guess.
Admin
you can clearly see that this person hasn't taken a class in basic programming to find out that strings take up space as it's longer, and data types such as boolean take up minimal space.
"true", "false"... that's the wtf. then when you validate against that variable, you're doing a string comparision that's always more time consuming than a boolean or integer based comparison.
The "true2" just reminds me of a vb guy click/dragging a button on the form, and leaving them "Button1" and "Button2". Looks like hate code to me. :)
Admin
That "Arnold" story reminded me of one from my very first programming job. This was back in the Dark Days when people actually had to maintain MAKE files by hand. I realized that because of the company standards we had adopted (one header for each module, base names must match, no circular references), it was trivial to write a program that scanned our source code and automatically built the MAKE file.
So I built it. This was a tool for our own internal use, not production code, so I decided I could have some fun in it.
In the data structures inside that program was a variable named GuzintaFile. Someone asked me what that meant? "Well," I said, "one file GOES INTO the compile of another...".
Admin
One time, in the very beginning of my career, in some FoxPro (xBase) production code I wrote while consulting for Wells Fargo, I was having a little bit of fun with the code, and wrote something approximately like the following:
Here's the p-code:
Now, FoxPro doesn't enforce type safety on variables, AND I made the horrible mistake of not validating the input before using it. Also, the version of FoxPro I was using at the time had no notion of Debug vs Release, so when an error occurred, a pretty dialog box appeared showing the offending line of code that raised the error.
In order to create a pun using the language, and because I'm was/am a sexist male pig, I chose to name my variable "blowjob".
So the real code was something like:
...
blowjob = GetInputValueFromForm(I forget the actual function name, but you get it)
SELECT tablename
SEEK blowjob
...
Well, it was a numeric field and he typed some alpha characters in, and whammo, dialog box appears saying "An Error has occurred. SEEK BLOWJOB". Of course, the dialog only had an "OK" button on it, which added to the hilarity.
Yes, I should have been fired, but the manager I reported to thought it was hilarious as the end user of this application was in fact quite uptight.
Admin
I think we've all gotten to the point where you had yet another counter/label/sub name and had to think up some name for it.
My best (and I think it was quite common in those days) example comes from Turbo Basic (which needed no line numbers):
... code here ...
Hell:
... more code here ...
if ... something or other ... then goto hell
For any dutch speaking people here, on my university x86 assembly project I used a label 'NaarDePomp'. Nice label to use in a loop ;)
<FONT size=1>(For people who don't read dutch, literally it would say 'Walk to the (water)pump' which basically means 'get outta here' or 'goto hell'.)</FONT>
Drak
Admin
Blue's message reminds me of this:
http://digilander.libero.it/chiediloapippo/Engineering/iarchitect/stupid.htm
The site is really a good laugh.
Drak
Admin
This is hilarious.
I suppose "true" is equal to <FONT color=#0000ff>true</FONT>. And when does "true2" get's used?
Admin
I've got a few like that.
"Why is this program named betsy_ross?"
"Don't you know? That is the program you run to set the flags!"
"Okay, why is this one rotisserie?"
"That one takes a slice of the cylinder and rotates it to create a full cylinder!"
"And this one named x-ray?"
"It lets you view inside data files to see the variables."
"Oh, now I'm getting it. So this one, named executioner, it probably kills off other programs, right?"
"No, that one just runs programs."
Admin
Well, since everyone like the "Arnold" story, let's me tell you about, My Nightmare, part II (Almost certainly the same programmer, possibly the same file)
DocumentTypes[] Shakes = GetDocumentTypes();
for(int i =0; i< Shakes.Length; ++i)
ProcessDocumentType(Shakes[i]);
So, why was an array of DocumentTypes called "Shakes"? Anyone? Bueller?
Because a DocumentType was called a "DT" and the "DTs" ("Delirium tremens")(http://www.answers.com/topic/delirium-tremens) are the "Shakes"
Admin
Drak, that was a funny site indeed! The only example close to mine was the Autodesk tooltip with "idiot" in it... But still, quite funny!
Admin
PowerBuilder has a dialog box where you can build & test SQL statements. The toolbar button which run (i.e., "executes") the query, has just an axe on it. I'm told that during the beta, it was a bloody axe.
Admin
More proof that all developers have a morbid sense of humor.
Drak
Admin
Truest?
MoreTrue?
True.Degree = Nth ??
Power(True, MAX) (See cArnold above)
Admin
Haha! I copy pasted this to a colleague, and the first words he said were 'What the f*ck?!?' without even knowing where this snippet came from [:O]
Drak
Admin
Heh, that's great humour! One should always be allowed a little fun while coding as long as it is not overdone!
Admin
True 2 - for all those times when True just isn't True enough.
[N]
Admin
I assume the p_ stood for "parameter," the s prefix stood for string, and the STR was a backup for those who missed the s prefix.
Prefix naming convention - now that's a WTF in itself.
At least they didn't name it sStringSTR I guess [:)]
Admin
Another dutch funny variable name:
in a project i had to use dutch variablenames, prefixes(3 letters) which indicate the type of variable (not very uncommon) so i had to store a receivingchannel for a message over a queue. in dutch, receivechannel = "OntvangstKanaal" added a prefix for a string type it would be strOntvangstKanaal which could be literally translated as shit-catch-channel
After a reviewer of the customer waded through the code, i had to change it into another variablename
Admin
<div style="font-size: 0.7em">font-size: 0.7em
<div style="font-size: 0.7em">font-size: 0.7em
<div style="font-size: 0.7em">font-size: 0.7em
</div>
</div>
</div>
</div>
</font>
gets:
This is the cause of some strange font sizing problems in this topic. "em" refers to the parent font size and so nested use of e.g. "0.7em" causes shrinking of the text. (see used stylesheet in the source, classes txt1-txt5).
Admin
replace "topic" with "forum"
Admin
I had a routine lying around that parsed a string in the form <verb> <arg=value> <arg=value> ... However, I needed to parse a similar string, one that didn't contain a verb. No problem really, all I needed to do was put a dummy verb in the string. That one I called... You guessed it, "dummy".
Now, if the system found a string it couldn't parse, it would split out an error message and include the string in order to help understand the problem.
Hilarity ensued when one day I accidentally passed an empty string to the parser, triggering a validation error that read something like:
"Unable to parse string: dummy."
Luckily I caught that one during testing. I can imagine customers might not have been entirely amused by the phrasing of that particular error message...
Admin
its obviously a fuzzy logic true.
Admin
son of a bitch.
Admin
i once worked with a guy who named a java interface IInterface. yep, two I's (the first one is to indicate that this is, indeed an interface (not a class). what to make of the remaining "Interface" part of the name is up to all of you.
Admin
true for a given value of true..... I don't think this guy has found his true vocation yet, perhaps programming isn't for him and the career of a politician beckons.
Admin
<FONT face=Verdana color=black size=2>Working at a local university many, many years ago, I had my hand in a number of applications that were basically the same (e.g. keeping track of "things"), but were different enough to make the job interesting.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT>
<FONT face=Verdana color=black size=2>The applications were developed on an old VAX system, and were executed by the users via the use of COM files (just like the MS-DOC BAT files). Our naming convention at the time was to create three letter COM file names. For example, the COM file that ran the telephone inventory system application was named TIS.COM.<o:p></o:p></FONT>
<FONT face=Verdana color=black size=2>I wrote an application that kept track of student athlete information. I must have been in a good mood the day I named that COM file because instead of using SAI.COM, I used JOX.COM...<o:p></o:p></FONT>
<FONT face=Verdana color=black size=2>Get it?</FONT>
Admin
Fun in cool. Cleverness (especially when it comes to variable names) for its own sake is dumb. cArnold is dumb.
Admin
Some years ago, Someone I know write a simple database app for his friend's wife. It was called "Terry's Information Tracking System" --- with the appropriate abbreviation for the filename.
Admin
Perhaps programming is his true vocation, but politics is his true2 vocation.
Admin
true, true
Admin
In the first paid programming job I ever did (I was actually a salesman for the store, but they needed a POS system and didn't want to pay for one), I was using Foxpro 2.5 for MS-DOS. As a typical snarky first-timer, I had some fun with the variable names: for example, the customer table was named SUCKERS, the employee table was SLAVES, and the error message window was S_O_L. The worst was a boolean variable which marked whether or not a customer was in the database; as a nod to both Lisp and the Jargon File, I dubbed it CUS_P.
Admin
Dude, that is great. I'm gonna start using that one...LOL
[/quote]