Comment On letter_array

"My company sells access to a massive PHP application that was built a few years ago by The Originals," writes Magnus Bergmark. "The application has everything: slow interface, quirks-mode invalid HTML4, hidden POST forms for every link, you name it." [expand full text]
« PrevPage 1 | Page 2Next »

Re: letter_array

2009-10-28 09:02 • by SkaveRat
$comment = Array("W", "T," "F");
//W T F

Re: letter_array

2009-10-28 09:03 • by Huh? (unregistered)
$letter_array = array(
"F", "I", "R", "S", "T", "!");
// F I R S T !

Come on, it had to be done.

Re: letter_array

2009-10-28 09:06 • by Anonymous (unregistered)
>> // F I R S T !

It isn't.

Re: letter_array

2009-10-28 09:06 • by toshir0
and TRWTF is.... ? ^^

the lack of comments ?
the inanity of the rare comments ? oO

that's everyday stuff... ^^

(btw, that* pretty much sucks indeed !)


* this error that occurred ^^

Re: letter_array

2009-10-28 09:14 • by highphilosopher (unregistered)
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.

Re: letter_array

2009-10-28 09:16 • by Drew (unregistered)
"!" is not a letter! D:

Re: letter_array

2009-10-28 09:17 • by Gramma (unregistered)
289180 in reply to 289178
highphilosopher:

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", "!");


You missed a letter.

Re: letter_array

2009-10-28 09:24 • by Chris Haas (unregistered)

$letter_array = array(
"A", //A
"B", //B
"C", //C
"D", //D
"E", //E
"F", //F
"G", //G
"H", //H
"I", //I
"J", //J
"K", //K
"L", //L
"M", //M
"N", //N
"O", //O
"P", //P
"Q", //Q
"R", //R
"S", //S
"T", //T
"U", //U
"V", //V
"W", //W
"X", //X
"Y", //Y
"Z", //Z
"!"); //!

Re: letter_array

2009-10-28 09:24 • by Anonymous (unregistered)
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.

Re: letter_array

2009-10-28 09:25 • by highphilosopher (unregistered)
289184 in reply to 289180
Gramma:
highphilosopher:

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", "!");


You missed a letter.


Did not.

Re: letter_array

2009-10-28 09:43 • by Beaker (unregistered)
289187 in reply to 289184
I think he means you forgot the "FILE_NOT_FOUND" element of the array.

Re: letter_array

2009-10-28 09:46 • by dv (unregistered)
289188 in reply to 289187
Beaker:
I think he means you forgot the "FILE_NOT_FOUND" element of the array.


I think you accidentally FILE_NOT_FOUND there.

Captcha: acsi ? Some kind of lowercase ASCII?

Re: letter_array

2009-10-28 09:48 • by highphilosopher (unregistered)
289189 in reply to 289187
Beaker:
I think he means you forgot the "FILE_NOT_FOUND" element of the array.


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"

Re: letter_array

2009-10-28 09:54 • by lolwtf
289190 in reply to 289174
Huh?:
$letter_array = array(
"F", "R", "I", "S", "T", "!");
// F I R S T !

Come on, it had to be done.
Fixed.

Re: letter_array

2009-10-28 09:54 • by Anonymous (unregistered)
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.

Re: letter_array

2009-10-28 09:57 • by grzlbrmft (unregistered)
289192 in reply to 289174
Huh?:
... // F I R S T !
Come on, it had to be done.

No!

captcha: still not pseudo japanese :-(

Re: letter_array

2009-10-28 10:00 • by Tophpornottophp (unregistered)
learn "file not found" in 21 days!

Re: letter_array

2009-10-28 10:00 • by powerlord
289194 in reply to 289187
Beaker:
I think he means you forgot the "FILE_NOT_FOUND" element of the array.


brillant!

Re: letter_array

2009-10-28 10:04 • by noone (unregistered)
289195 in reply to 289190
lolwtf:
Huh?:
$letter_array = array(
"F", "R", "I", "S", "T", "!");
// F I R S T !

Come on, it had to be done.
Fixed.

I like that the comment is now incorrect....

Re: letter_array

2009-10-28 10:07 • by noone (unregistered)
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!

Re: letter_array

2009-10-28 10:09 • by Huh? (unregistered)
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!"

Re: letter_array

2009-10-28 10:15 • by monkeyPushButton (unregistered)
289199 in reply to 289189
highphilosopher:
Beaker:
I think he means you forgot the "FILE_NOT_FOUND" element of the array.
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"
Better than the FILE_NOT_FOUND that I read I suppose.

"Dear FILE_NOT_FOUND,
I never thought it could happen to me..."

Re: letter_array

2009-10-28 10:29 • by s0be
289200 in reply to 289198
Huh?:
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!"


well played sir.... well played....

Re: letter_array

2009-10-28 10:35 • by Anonymous (unregistered)
289201 in reply to 289198
Huh?:
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!"
I haven't heard this joke since I was 5. Even then it wasn't funny.

Re: letter_array

2009-10-28 10:37 • by AlpineR
Thanks to this thread, I'll be humming the "Twinkle, Twinkle, Little Star" tune for the rest of the day.

Re: letter_array

2009-10-28 10:55 • by Adrian (unregistered)
289203 in reply to 289202
AlpineR:
Thanks to this thread, I'll be humming the "Twinkle, Twinkle, Little Star" tune for the rest of the day.

If you fancy a break from that, try humming "Baa Baa Black Sheep" instead. Or save time and go straight to "Ah! vous dirai-je, Maman".

Re: letter_array

2009-10-28 11:12 • by EatenByAGrue (unregistered)
A group called "The Originals"? Huh, I wonder if they had to change their name to "The New Originals", or maybe "The Thamesmen"?

Re: letter_array

2009-10-28 11:15 • by Anon (unregistered)
289205 in reply to 289199
monkeyPushButton:
highphilosopher:
Beaker:
I think he means you forgot the "FILE_NOT_FOUND" element of the array.
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"
Better than the FILE_NOT_FOUND that I read I suppose.

"Dear FILE_NOT_FOUND,
I never thought it could happen to me..."


You must not have seen FILE_NOT_FOUND does Dallas.

Re: letter_array

2009-10-28 11:26 • by Ozz (unregistered)
289206 in reply to 289193
Tophpornottophp:
learn "file not found" in 21 days!
I had to read your name about half a dozen times before I realized what it said - all I could see was the bit that said "porno". Does that make me a bad person?
(I guess so - my CAPTCHA is ratis...)

Re: letter_array

2009-10-28 11:33 • by Mr Boredom (unregistered)
Is it just me or is this the dullest WTF ever? Thank God it didn't take too long to read!

Re: letter_array

2009-10-28 11:37 • by lyates

Re: letter_array

2009-10-28 11:43 • by valentin (unregistered)
shorter:
array_merge(range('A','Z'), array('!'))

Re: letter_array

2009-10-28 11:49 • by Shredder (unregistered)
289211 in reply to 289209
valentin:
shorter:
array_merge(range('A','Z'), array('!'))


OMG, you're so clever and l33t!

...


You don't really understand the point of this site, do you?

Re: letter_array

2009-10-28 11:51 • by valentin (unregistered)
289212 in reply to 289211
do you get any points for being an idiot?

Re: letter_array

2009-10-28 11:55 • by highphilosopher (unregistered)
289213 in reply to 289212
valentin:
do you get any points for being an idiot?


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!

Re: letter_array

2009-10-28 12:00 • by Dlareg
$comment = $letter_array(22) + $letter_array(19) + $letter_array(5)

Re: letter_array

2009-10-28 12:05 • by Rodnas (unregistered)
stupid development awards 2009. In the category commenting on the bleeding obvious the winner is .....

Re: letter_array

2009-10-28 12:10 • by jeff (unregistered)
I think he first made the comment "a b c d ..." etc and then did a replace on the space for ", " ..

Re: letter_array

2009-10-28 12:32 • by ContraCorners
289218 in reply to 289211
Shredder:
valentin:
shorter:
array_merge(range('A','Z'), array('!'))


OMG, you're so clever and l33t!

...


You don't really understand the point of this site, do you?

There's a point to this site?

Re: letter_array

2009-10-28 12:35 • by Daniel Pope (unregistered)
$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 .= '!';

Re: letter_array

2009-10-28 12:46 • by hdgjhd+ (unregistered)
We need a LetterFactory. And XML. And a neural network. Garglepussy!

Re: letter_array

2009-10-28 12:55 • by My Name (unregistered)
hidden POST forms for every link

That seems to be the default for many .Net applications that I have seen. If it included a 10KB serialized session object in a hidden input_field as well, it would be an exact match :-(

Re: letter_array

2009-10-28 12:59 • by hdgdl (unregistered)
289224 in reply to 289220
What we really need is a GarglepussyFactory ^^

TRWTF is that this wasn't a proper WTF at all...

captcha: acsi - Alphabet Crime Scene Investigation

Re: letter_array

2009-10-28 13:09 • by Zylon
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.

Re: letter_array

2009-10-28 13:10 • by Garglepussy (unregistered)
289226 in reply to 289220
hdgjhd+:
We need a LetterFactory. And XML. And a neural network. Garglepussy!


Yes?

Re: letter_array

2009-10-28 13:24 • by GlobalG (unregistered)
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

Re: letter_array

2009-10-28 13:35 • by BSDGuy (unregistered)
289232 in reply to 289191
Anonymous:
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.


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.

Re: letter_array

2009-10-28 14:05 • by Tonsil (unregistered)
289233 in reply to 289204
EatenByAGrue:
A group called "The Originals"? Huh, I wonder if they had to change their name to "The New Originals", or maybe "The Thamesmen"?


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"...

Re: letter_array

2009-10-28 14:49 • by Izzy (unregistered)
$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

Re: letter_array

2009-10-28 16:10 • by notromda
I like Ruby:

('A'..'Z').collect + ['!']
« PrevPage 1 | Page 2Next »

Add Comment