- 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
$comment = Array("W", "T," "F"); //W T F
Admin
$letter_array = array( "F", "I", "R", "S", "T", "!"); // F I R S T !
Come on, it had to be done.
Admin
It isn't.
Admin
and TRWTF is.... ? ^^
the lack of comments ? the inanity of the rare comments ? oO
that's everyday stuff... ^^
(btw, that* pretty much sucks indeed !)
Admin
TRWTF is that the programmer didn't know how to write proper self documenting code.
This:
$letter_array = array( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!"); // A B C D E F G H I J K L M N O P Q R S T U V W X Y Z !
Should have been This:
$abcdefghijklmnopqrstuvwxyz!_array = array( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!");
Gee what's this world coming to.
Admin
"!" is not a letter! D:
Admin
You missed a letter.
Admin
Admin
PHP MADE ME DO IT! I WAS A GOOD CODER UNTIL I STARTED WRITING PHP! Truly, I'm sorry. It was PHP what made me do it, really.
Admin
Did not.
Admin
I think he means you forgot the "FILE_NOT_FOUND" element of the array.
Admin
I think you accidentally FILE_NOT_FOUND there.
Captcha: acsi ? Some kind of lowercase ASCII?
Admin
stupid! stupid! stupid! I've read three books on that subject! I can't believe I missed that!
"FILE_NOT_FOUND and you" "tracking your files in code" "FILE_NOT_FOUND goes to college"
Admin
Admin
I once had to tackle a nearly incomprehensible system with code spread out over 50+ files (for no reason), some 800 different states that got passed around, functions with names that no longer matched what they did, parameters that weren't used, return values that were never read; most of the functionality was achieved through side effects (all variables were global). It contained no comments, except this one:
line[0] = '\0'; /* initialize string to empty */
However that one was repeated about 100 times all over the program.
Admin
captcha: still not pseudo japanese :-(
Admin
learn "file not found" in 21 days!
Admin
brillant!
Admin
Admin
So the true WTF is that $letter_array should have been called $letter_array_plus_one_random_punctuation_mark ?
Just imagining the poor maintenance developer who is expecting $letter_array to only contain, well, letters.
Captcha: damnum Are we using the Automated Curse Generator for CAPTCHA now? Damnum! Damnum to heck!
Admin
Reminds me of a little joke:
Johnny was in programming class and had to use the bathroom. The teacher asked him to create a completely useful letter array. So Johnny went back to his desk and showed the teacher:
$letter_array = array( "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "!"); // A B C D E F G H I J K L M N O Q R S T U V W X Y Z !
Johnny said, "It is even commented, can I go to the bathroom?" The teacher said, "Wait, where's the P?" Johnny said, "Running down my left leg!"
Admin
"Dear FILE_NOT_FOUND, I never thought it could happen to me..."
Admin
well played sir.... well played....
Admin
Admin
Thanks to this thread, I'll be humming the "Twinkle, Twinkle, Little Star" tune for the rest of the day.
Admin
Admin
A group called "The Originals"? Huh, I wonder if they had to change their name to "The New Originals", or maybe "The Thamesmen"?
Admin
You must not have seen FILE_NOT_FOUND does Dallas.
Admin
Admin
Is it just me or is this the dullest WTF ever? Thank God it didn't take too long to read!
Admin
Admin
shorter: array_merge(range('A','Z'), array('!'))
Admin
OMG, you're so clever and l33t!
...
You don't really understand the point of this site, do you?
Admin
do you get any points for being an idiot?
Admin
Yes he does, since the two of you are arguing, and you're code doesn't even compile.
--- WITH WTF ---
array_merge(range('A','Z'), array('!'))
--- WITHOUT WTF ---
$letter_array = array_merge(range('A','Z'), array('!'));
interesting captcha: dolor - Pain, Misery, Grief
This captcha thing is better than any psychic I've seen yet!
Admin
$comment = $letter_array(22) + $letter_array(19) + $letter_array(5)
Admin
stupid development awards 2009. In the category commenting on the bleeding obvious the winner is .....
Admin
I think he first made the comment "a b c d ..." etc and then did a replace on the space for ", " ..
Admin
Admin
$letters_array = array(); while (count($letters_array) < 26) { $letters_array[] = chr(rand() % 256); $letters_array = array_unique($letters_array); $letters_array = str_split(preg_replace('/[^A-Z]/', '', implode($letters_array)); } sort($letters_array); $letters_array .= '!';
Admin
We need a LetterFactory. And XML. And a neural network. Garglepussy!
Admin
Admin
What we really need is a GarglepussyFactory ^^
TRWTF is that this wasn't a proper WTF at all...
captcha: acsi - Alphabet Crime Scene Investigation
Admin
For the love of god, can we please finally let "developmesuction" or "devildestruction" or "devoreunion" or whatever the hell it is finally die? It is to neologisms what ADA was to programming. What IE was to web standards. What Trespasser was to gaming. What Cat in the Hat was to film. What My Mother the Car was to sitcoms. What iSnack2.0 was to food. Just let it die. In the name of all that is holy... let it die.
Admin
Yes?
Admin
The comment itself is not a WTF at all, in fact I am pretty sure that comment was there before the actual statement. its easier to write A-Z in a comment and then make the array. This is to make sure its in order to not miss any letter.
The bigger WTF is no comments, but then again, I have seen worse
Admin
LOL, that is much worse than this WTF. This WTF is riddled with bad redundancy, however, line[0] having the ONE comment LOL!!
It's made worse by the fact, that the string isn't empty at all because line[1-end] may have garbage or what have you...all they did was put EOF at the beginning, which works under 'ideal'conditions.
Everyone codes with "high hopes" these days. Code for errors, not for WTFs.
Admin
Wow. I don't know what's worse, that you made the joke or that I got it without having to look it up. Off to eat a "shark sandwich"...
Admin
$letter_array = array( "S", "H", "E", "N", "A", "N", "I", "G", "A", "N", "S", "!"); // S H E N A N I G A N S
Admin
I like Ruby:
('A'..'Z').collect + ['!']