Virus In Training

You know your programming lang sucks when you have this

Posted by: mozey on: June 7, 2008

I was playing around with a wordpress plugin!, i saw this jem!
$file = $file['file'];

WTF!?!?!?!?!?

++++++++++++++

UPDATE

++++++++++++++

Upon further thought!!!, i think you guys are right!, this is not the language’s fault. The variable names should have been named more clearly. NOW STOP BADGERING ME ABOUT THIS.

9 Responses to "You know your programming lang sucks when you have this"

It’s gem, not jem. Go back to school.

screw you hippie!, this is my blog, and in my blog, its not gem, not jem!.

It’s not the language that sucks, it’s clearly the rockstar developer who wrote that code.

Because you could write that screwed up line in almost any language.

And it’s the programming languages fault when the developer decides to use bad variable names?

In python it would be

file = file['file']

so… python sucks too? :)
Are you saying that all dynamic variable languages suck?

Bye.

You can’t blame PHP for that. At first I thought maybe the script was uploading a file through a file form field, but that would be passed as $_FILES['fieldname']. If the field in the HTML were named file then it would be $_FILES['file'], but no. Those variables are named by the programmer, and might be ok depending on the rest of the code. It is, at least, descriptive. Much better than some code I’ve seen with variables named $rbz, $aaa, and $t.

Makes perfect sense to me ;-)

I’m surprised you were intelligent enough to identify that WordPress was composed using PHP.

This is more appropriate for the context:

$i = $like['men'];
P.S. ever seen fight club?
** EDITED

Hello Anonymous,

Look, its perfectly okay if you like men!, there is nothing wrong with that!. Your family will support you, so well all of us. And yes fightclub was a good movie, i never read the book!, but apparently, the dude who wrote it, also did this other book about “invisible monsters”, creepy stuff!.

And thank you for coming out on my blog, i’m humbled by the honor.

Leave a Reply