- 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
Two? What's the other one?
Admin
Damn, I was sure I was going to be first with the Hendrix ref...
Admin
Admin
Oh, yes, I've been waiting for this question!!! I'll post the link to Bobby comic as soon as I find the link. Please nobody comment meanwhile!
Admin
Admin
Perhaps it is actually referring to "Mary Random", a secretary in the HR department, and this is just a very severe case of hard-coding.
Admin
No. You're thinking of Merry, short for Meriadoc.
Admin
Admin
MY NAME IS SUE.
HOW DO YOU DO?
NOW YOU GONNA DIE.
Admin
Not to mention "the man they call Jayne".
Admin
It's not important.
Admin
This made me lough. I especially like how the $gender is unused.
captcha: abbas (how many of them?)
Admin
Like everybody sending e-mails containing only "Mary"?
Admin
So it's a stub function that was never fully implemented. Er. So? This actually looks like a good programming practice whose only fault was that this particular function wasn't important enough for someone to get around to implementing properly.
The fact that it was found by accident instead of during an investigation for why "Mary" keeps showing up in various places also shows it's not a very important method.
I wish the WTFs I find were this simple.
Admin
The obvious solution is to place a phone book on a wooden table, set up a web cam to capture an image, use OCR convert the image to words and then pick a name from there. Just remember (VERY IMPORTANT!), every day you need to flip the page in the phone book or you'll end up with the same set of names as the day before.
Admin
The precise "Mary" being returned is perfectly random, thank you.
Admin
Also, we could handle the gender parameter by keeping every name and the associated gender (male, female, either or FILE_NOT_FOUND) in an XML file so that after reading a name from the phone book, you can look up what gender it is. If it isn't the gender requested, grab another name from the phone book.
Admin
I'm guessing it's just a placeholder. The original author meant to elaborate, but the requirement for a random name came & went and there the function lies, waiting to be enhanced by the next voyager.
That would be you.
Admin
That'll never work. Once you've OCR'd the page, you need to tabulate the results, print them out individually and stash them inside Kinder Eggs, fill a room full of the things, then toss a black, mute, blind, deaf, legless, hunchback, lesbian midget in to select one at random.
Just remember (VERY IMPORTANT), tie a rope around her waist and hold onto it tightly, or you'll never be able to retrieve her.
Admin
This is a new but increasingly common and popular paradigm. You first define a function with a generic name (getRandomName), and a generic/pseudo implementation to meet the basic requirements. When there's time and budget later on, you expand it with a more extensive implementation (getRealRandomName).
Admin
I know exactly how that feels...
Admin
Good luck getting HR to put that in the job description. Unless they can wrap the whole thing up in a single catch-all phrase...perhaps "somebody like Kevin"?
Admin
Admin
I came here for a comment like this. Leaving satisfied.
Admin
Admin
void randomDDos() { run "DDoS 127.0.0.1"; }
Admin
Where is Mary a boy's name? Perhaps you don't remember the 'Married With Children' episode where Kelley burned the beloved family couch. There was one copy of the couch left, owned by the designer. He changed his name to something that sounded more like Muh-Ray. How was it spelled? Mary. Isn't that a girl's name, they asked? No, a girl spells it mAry (vocal accent on the 'a'). He spelled it marY.
Yeesh. I have to stop falling asleep in front of the TV.
Admin
Admin
TRWTF is that the function returns an incorrect value half the time. Here's the fix:
Admin
If you must know, we call that function to assign $whoWantsToDoYou and that it's the first thing the user sees after logging in. Helps morale around here. Anyway, we used to have a sizable list of switch-hitting sluts in the office (primarily in marketing and accounts payable) but sadly, after downsizing, Mary is all we have left.
Admin
The recession has been particularly hard on the office sluts.
Admin
In middle earth, Mary, of Mary and Pipin fame.
Also I once knew a guy named Marion, who went by Mary.
Admin
Luckily, no one has posted this [image]
Admin
Nope, it was posted already...
captcha: gravis
Admin
To Hell with Mary...
public static function getRandomName($gender) { return 'Irish Girl'; }
Admin
return getRandomName("hermaphrodite") + " is Brillant";
Admin
Of course, that was before I decided that generated code was nonsense and it should just throw a FILE_NOT_FOUND exception ;)
Admin
Admin
A Johnny Cash reference. Very nice.
Admin
... And we close out with a User Friendly reference. (Actually a double reference--quite elegant.)
Admin
Admin
Admin
"Random" is frequently used to mean "arbitrary"
Admin
Admin
Obviously some names had to get removed because else this line of code would be broken:
Admin
Unfortunately, getReallyRandomnName() is already defined, too:
He's going to have to go with getTrulyRandomName().
Admin
That's coding to requirements:
"Req 1.3.5: We want a function that returns some random name each time it's called"
"Mary" is some random name, let's return that!!
Admin
You fight like a dairy farmer.
Admin
To all the Merry vs. Mary pedants... you do know his name was actually Kalimac, right?
Admin