- 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
Mmm, reminds me of a former programmer who named a variable "blister_me_brandy" in honor of a hot waitress he met at a pancake house. I think it was used as a signal to reset the system.
Admin
I just women's names for my personal computers. It's a little creepy I s'pose, but my girlfriend doesn't mind.(0)
It's easier to talk about "Opal" than "The P3-800 I fished out of the trash, cleaned up, installed gNewSense, and am using as a desktop machine" when you have 14 computers.
"Bessie" > "the Gateway that my doctor friend gave to me after he upgraded" etc.
(0) I sometimes call her "The Karen" because I already have a computer named Karen. We had a (thankfully humorous) discussion about who had the name first. :)
Admin
"the "fallback" name to give anything if you don't know what to name it" Man oh man right on! If you don't know what to name a variable, STOP CODING! Don't code any further because you are begining to loose track of what it is you are trying to code. Take a break or look back at the spec. and answer the question; "What is it you are trying to do?" Develop a plan and begin again. The variable name will occur to you naturally. If you write code without a plan, then it's likely to end up on thedailywtf.com and that's what profs. should be teaching!
Admin
I wonder if he commented these functions so that IntelliDense would give additional info?
Admin
The documentation says it runs a complex algorithm, but in reality, it does nothing, and blocks for a very long time.
Then it returns 'brillant'
Admin
Fully self contained iterators, who cares what they are called be it I or MySelfContainedIterator, it won't be seen outside the scope fo the function it is in, and it's useage is immediatly apparent when it is used. This argument is a non-argument as it doesn't matter.
But I agree, most comp-sci student learn the i, a, x names as fallbacks for everything. It's even worse when these are the parameters for a function. I agree, if the variable has any useage outside of a simply iterator there should be some clue what to name it according to the specification and usage. Iterators themselves are almost never mentioned in specs and if they were, you aren't writting spec, you are writting code.
Admin
I think the forum ate my last post.
Admin
I generally abhor the "my" prefix as well, but I did find one use for it. I was using JBuilder (a WTF of its own) which puts the bulk of its generated GUI code in a jbInit() method. I got tired of it messing up the changes I would make by hand in that method, so eventually I moved them all out to a method called myInit(). I suppose I could have called it postJbInit() or customInit(), but there's something to be said for the logical and visual symmetry of the two methods.
Admin
I bet the guy's a closet gay. He's covering up... "Look how not gay I am! Look how much I love women! I even name functions after them!" Closet case.
Admin
This is why I say it is a non issue, something like this is preference, it is neither right nor wrong. The name does give you info as to what it is and that is its purpose.
As for the OP, the x and y vars are used for something more then iteraters, they have some meaning, but the names don't help. If y was a job index I could care less if it was jobID or MyJobID since it was contained withing the scope of the function. x on the other hand would need to be more like jobID since it is exposed as a parameter; it is exposed outside the scope so it needs more formal conventions.
Admin
No you just call Trish and she will call Sally, Cassie, Beth and many more... :) This is fun.
Captcha: shizzle (how appropriate!)
Admin
Because the Win32 libraries contain a "window" class, that keyword is unavailable for use. Yes, Microsoft in it's infinite wisdom chose to use a word that would almost certainly be used in any application that used the library directly. At my previous company, the window class was then fenetre (french for "window"), and all other windows were sub-classes of it. We didn't want to use MFC or any of that crap because that would have tied us to only the Windows platform, rather than making it at least partially portable code.
It made it really fun, because we could defenestrate a fenetre. Mostly because defenestrate is a fun word to say.
captcha: craptastic (aka, the Win32 libraries)
Admin
You should have read RFC 1178, "Choosing a Name for Your Computer".
No, this is not a joke RFC! Everybody should read that one before choosing a hostname.
Admin
Oh, I see the problem: this one crashed with a "Divide By Zero" error, right?
Admin
[quote]One of my friends told me that of course he would be the Kwisatz Haderach after ingesting that much spice!!![quote]
hahaha! Oh wait, I don't get it.
Admin
FYI I don't care what anyone's captcha word is and most other people probably don't either.
Admin
Now we know it's your int and other's should touch it, especially if it's private.
Admin
People are hanged, pictures are hung ;-)
Admin
Admin
o_O
Admin
ROTFL!
Admin
Admin
I think the original WTF assumes too much, such as that these functions are modeled after women's names. We've all known a number of men with names generally though to be women's names (Kelly, Casey, etc.etc.).
These are obviously NOT functions modeled after women or women's names as they simply do not have enough arguments.
Admin
Remember if programming in FORTRAN that:
God is REAL unless declared INTEGER.
Admin
Remember if programming in FORTRAN that:
God is REAL unless declared INTEGER.
Admin
I'll occasionally use one or two of those during a debugging session, but always remove them by the end of the session. And I give them better names than that (e.g. ewm_count for a loop counter).
Admin
=> marypoppins == +Inf (division by zero)
Admin
I work for a corp. that names all the servers after employees' kids - we all feel a little sad when one of the admins tells us that Susan died overnight for no reason, but they replaced her before anybody noticed.
Admin
Admin
What Win32 window class are you referring to? window isn't a keyword, at it is available for use.
Admin
(Unless you have one of those lovely offices where this guy shares out his excel "database", that guy runs sql server express that the mail server connects to, another dude is the office's mp3 repository, and so on.)
Admin
Admin
You shut up newbie! (to the admins: this is not a flame)
Admin
Admin
How timely. I was just working with a function called GoDoTheVooDoo()
The weird name didn't bother me so much as the variable passing convention we use here: pass by global variable.
Admin
When I first learned programming at uni in 1972 we had an alphabet of A B for real numbers and I J for integers, and all the digits. We could use A1 A2 B6 B7 and so on. Someone complained, and the lecturer joked that it was to stop people using rude words. I commented that 'B-zero-zero-B' (B00B) was possible. He never liked me much after that.
Admin
In fact VMS had the ability to not only trigger a stack dump, but to then unroll the stack a specified number fo frames and continue. All of these are controled by system calls available from any langauge.
Admin
As the original submitter, I should mention that Derrick has somewhat editied the code and the explanatory text - to a much funnier effect I might add. The code in question was in reality 6800 assembler, and the comments were very few and far between. So no, there was no descriptive header saying what each Sally, Beth or Cassie did, to any useful degree anyway. AFAIK, the guy wasn't gay and hence overcompensating (though as he's since become some sort of politician who knows?). My own theory is that due to his unfortunate physical ugliness it was his way of having a sort of harem at his beck and call. The code in question runs in a very common consumer electronic device fitted in many homes in the UK and elsewhere... alarming!
Admin
14 boxes - Man, I don't want to have your electricity bill. As for naming - I use the names of planets and moons.
Admin
truly, an object oriented programming =)
Admin
And be made to sing 'I will survive'
Admin
There, you're getting it!
Admin
Did anyone else think to themselves "she died, but we got another one that looks Just Like Her!", followed shortly by "THAT'S NOT SUSAN!, WAAAH!".
/evil
Admin
My favourite function names were in the system scripts in the Apollo Domain system (c 1985). When they needed a throwaway function in a script they usually called it hunoz or hukairz (say it out loud).
(nice brown captcha - chocobot)
Admin
Bear in mind that maybe a lot of us are not native english speakers so i donno if grammar is to be an issue.
Admin
[quote user="CleverShark"][quote]One of my friends told me that of course he would be the Kwisatz Haderach after ingesting that much spice!!![quote]
hahaha! Oh wait, I don't get it.[/quote]
I suggest you run to the nearest bookstore and buy a copy of Frank Herbert's "Dune" (all 6 of them :-)).
Admin
No, marypoppins = 0. god is infinite.
Admin
Admin
I heard you say
Admin
I am doing this thing quite often. Sometimes a video is simply just a video. Or do you want to call it myVideo all the time? One thing though. You should have a naming scheme. Following the Java naming scheme all class names start with a capital letter.
If you follow this scheme something like MessageBox messageBox; is no problem. The difference is obvious and even if you get something wrong, then the compiler will catch it.