- 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
Alright, now even I am thinking TDWTF is going downhill. This is clearly just a placeholder, that never got implemented. Forgetting to implement something before using the code in production is crap, but it's no WTF.
Admin
Yes, whole article in fact.
Admin
Clearly this function is not the real random name function, though. "Mary" is an integer name. (In Fortran.)
Admin
It's random alright, but drawn from a very specific distribution.
Admin
There's also an Austrian actor called Klaus Maria Brandauer. (An aeon ago, he played the villain Largo in Never Say Never Again.)
Confusingly, 'Mario' is a male name in German, but 'Marion' is female.
"Surely you can't be serious." "I am serious. And don't call me Shirley."
Admin
I disagree. I can't imagine any situation where you'd actually need a random name. I think rather than being a placeholder that never got implemented, it was a debugging function to be used in place of, say, a call to a (not yet existing) database during development. It should have been removed, but wasn't.
Admin
As big as I am, at least. Thanks for taking that one for the team.
PS -- I don't usually play the captcha game -- but "ingenium" is going to be worked into my next conversation with my CIO. "What's wrong with the server?" "It's low on ingenium"
Admin
Quite Contrary, the name returned by the function is as random as it can be. The original coder probably chose it at random. :))
Admin
"I have no idea who put this in"
This is why "svn blame" has been invented.
Admin
bool DoesSheHaveALittleLamb(const string &name) { if (name == "Mary") return true; return false; }
Admin
Yes, she does look a bit like a man.
Admin
I feel compelled to complete this code:
Admin
There is no Dana, only ZUUL!!!
Admin
public static function getRandomName($gender) { t$ = (strtolower(substr($gender, 1)) == "m") ? "t" : ""; return "Mar.$t.y"; }
Admin
Admin
Batman's son is called Robin and BTW Maria is a more or less common middle name for men
Admin
Damn somebody beat me to it
Admin
The method could at least return "Chris" so as to be correct for either gender.
Admin
Reminds me of some animated series:
"3, 3, 3, ..."
"Are these really random?"
"That's the problem. You never know".
Admin
Admin
That name was randomly generated. Just where does the function name say that it will be randomly generated every time?
Admin
I think the function name should be getDefaultName instead of getRandomName