- 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
adds a whole new dimension to sloppy seconds
Admin
Obfuscation by distraction... A whole new method...
Admin
People that use function names like this in production code should be shot, killed, shot again and then hung...
function names like checkThatGoDaimnThing() aren't just enough for his frustration??
Admin
The head bug is Sally doesn't give any on the first date. So you have to call her again.
Admin
Must ... kill ... programmer ...
I'm assuming of course that the real code has a lovely descriptive comment block before it saying what it does and thus it is merely amusing rather than retarded.
captcha: 1337
Admin
In my company, in depatament I work, there is like 20+ men hired and almost no woman. I think that adopting this naming convention would make our work maybe not more efficient, but at least more enjoyable.
No quack for 'head bug'.
Cheers, Hob.
Admin
LOL, too bad he didn't overload so we'd have 'chromosome' instead of 'int', would have made it the most 'feminine-oriented-code' ever =)
We had a colleague like that too (many, many, many years ago). He preferred things like the 'Hahaah()' and the 'Hihi()' function, still, this tops it, big-time.
Admin
OK guys, I'm gonna call Sally at 551-8932.
Any tips on what to say to a girl? I'm a little nervous...I mean, I've seen one before, but I didn't talk to it.
Admin
Best... Comment... Ever!
Captcha: jiggles. I wonder if Sally does?
Admin
Remember Jenny defaults to 867-5309
Admin
Another WTF might be the quality of grammar and spelling demonstrated above.
captcha - stfu
Admin
The first C job I ever had was on a system that had originally been written in FORTRAN, and while it had been re-written rather than ported, much of the "utility" library had been ported. Our convention was that every function in a library had a name that contained a two letter prefix with the library name. When they were using FORTRAN, there was a pesky little limitation on the length of subroutine names, so the ones that had been directly ported all had names like "ut272" while the ones that had been written in C had names like "ut_point_in_polygon". So every now and then a developer (sometimes me, sometimes somebody else) would get annoyed at having to remember what "ut272" meant and would go on a search and destroy changing all the names of a given function, and then trimphantly announcing to the whole company what the new method name was. It was usually greeted by a round of applause except for the 4 or 5 developers left over from when it was in FORTRAN who had grown accustomed to the old names.
I remember the day when I triumphantly removed the last vestige of Fortran from that program - the developers had wanted a VMS stack trace on various error conditions, so they had a "utNNN" function that was written in Fortran that did an intentional division by zero. That seemed stupid to me, and besides, it was in Fortran and I hated Fortran. So I attacked the "Orange Wall" and found sure enough there was a syscall I could make in C that would give me a stack trace without resorting to Fortran. I was so proud.
Admin
You have to respect that it repeats until Trisha is done. Lucky Trisha.
Admin
Totally bad of him to use non-meaningful variable names x and y.
And so, Sally can wait.
Admin
Chromosomes, dude.
Admin
I used to work with a guy named Shiv. All his variables, through his code, would be variants of his name: $Shiv1, $Shiv2, $Shiv3, $ShivTest, etc. Made future troubleshooting nearly impossible!
Admin
Function name like that are common in code obfuscation contests.
Admin
Heh ... a company I worked for once had a religious publishing division ... and some of their programmers used religious references for goto tags.
Fatal error routing: HELL
Normal end of job routine: HEAVEN
A co-worker told me about a another programmer he knew that LOVED trees ... so all his tags, variables, etc, were named after trees.
Admin
"I've seen one before, but I didn't talk to it."
You forgot to inflate her first?
Admin
One just have to wonder what the function Paula does.
Admin
Ahh... Back in the college days, most of my variable naming schemas were made after movies, books or things like that. Specifically, I remember something like
kwisatz_haderach.add(shai_hulud);
or something like that. One of my friends told me that of course he would be the Kwisatz Haderach after ingesting that much spice!!!
Or calling all my matrix instances "neo", "trinity", "morpheus" ...
Of course, I have since moved on to real descriptive variable names, however some algorithmic code still bears some funny references...
Admin
He'd better pray to Demeter that Trisha doesn't discover all those calls to his harem while she's busy.
Admin
Well, that's because it's Borat.
Chris Mattern
Admin
I think he gave the code VD.
Admin
Admin
Admin
Ouch, this WTF and some of the comments pain me right here...
:: thumps chest ::
Code is complex. We, as programmers, should use every single character to good effect to make understanding our code easier.
This includes whitespace, comments, names, everything! To throw away your names, effectively, by using non-relevant naming schemes, is a CRIME! A crime, I say!
Admin
Admin
Hehe, you beat me to it.
A funny aside to this though... I used to work with a guy who had the number 867-5309. He didn't use that phone anymore, and kept the number around for novelty purposes.
He kept an answering machine attached to it.
Every so often, he'd bring in the recordings from the machine so that we could all have a laugh at the drunken calls that he got.
Admin
I once did that for a listener socket instance. It handled most of it's stuff internally but one or two calls on it where necessary from main.cpp so I eventually just named it lisa and didn't care. Eventually there were two of those sockets so the second became bart.
Indeed I usually avoid such nonsense these days.
Captcha: foxtrot. I was rather thinking of Mambo 5.
Admin
Is it not obvious?
Admin
PMSL
captcha: null
mmmm
Admin
Someone's been watching too much Scrubs
Admin
I guess all this might stem from him actually being hung
Admin
I used to work with a guy who would call all his variables a1; a2; a3 etc., then have great globs of code along the lines of: a1 = a1 + 1; a2 = a2 + 1; a3 = a3 + 1; ... etc.
I tried to introduce him to such modern concepts as meaningful names and even arrays, but it was no use!
Admin
So, if I wanted to date Sally, I'd have to get past Trish? Or can I call them both?
No, wait, Cassie & Beth look like they're much more fun. Ah, my wife caught me in a fatal exception. She used a Shiv. "goto HELL." Thank God it's not Cobol
Admin
Hmm... I actually have that song somewhere in my old cassette collection ...
Admin
I wish... Have a look at Roedy Green's 'How to write unmaintainable code' essay.
============= 17. Names From Mathematics
Choose variable names that masquerade as mathematical operators, e.g.:
Choose variable names with irrelevant emotional connotation. e.g.:
============
Captcha: genius
Recognition at last!
Admin
(Hmm, am I missing something or is there no longer any way to quote the original post without manually copy-pasting?)
Check out that end on Trisha... is she wearing a thong?
Admin
Worst wtf in a long time. Malicious intent is lacking in most wtfs.
Admin
I'm attending the local college to actually get a degree in what I have been doing for over a decade. The teachers ingrain this behavior. They teach these poor students habits which will harm them long term.
Making a struct called video, then doing this: video Videos[5];
one character difference. arrgggh. ALL the variable names are a1, a2, etc. 300 lines of code-with one brief comment at the top of the function.
Going to the classes for the credit is painful. I want to pour bleech into my eyes half the time.
Admin
Marginally better then function names like:
X XX XXX XXXX XXXXX XXXXXX
Admin
Reminds me of an application I was working on which had this class to draw a certain kind of diagrams. The class was called ElseDiagram. For the longest time I thought the name of the class meant that the diagrams were not the standard diagrams, instead something else. It turned out that the programmer who developed the class was named Else, which is a common Norwegian female name.
Admin
Admin
int myInt;
That's REAL descriptive, thanks.
Admin
I also remember code with wonderful variable names (within one iteration) of start, _start, __start, dstart, _dstart, __dstart and several more like those for end. And those were just "days"m obviously minutes, hours and week boundaries were named likewise. Still hurts my eyes.
Admin
Admin
Well I generally try to make my names meaningful, however occasionally I do throw in the odd joke here and there. For instance I have something called a wordTextField... in my code this is abbreviated to "wTF" of course!
Admin
As for the int myInt;
That is a problem only if this int should be for something particular. If it is used later as simply a counter for iteration then I see no reason why you need a better name, of course int myCounter; might have been a better choice.
Admin