Virus In Training


You know your programming lang sucks when you have this by mozey
June 7, 2008, 3:37 pm
Filed under: blog | Tags: , ,

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.

Advertisement

9 Comments so far
Leave a comment

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

Comment by Anonymous

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

Comment by mozey

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.

Comment by hoba

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

Comment by Anonymous

In python it would be

file = file[‘file’]

so… python sucks too? πŸ™‚
Are you saying that all dynamic variable languages suck?

Bye.

Comment by Shu

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.

Comment by Joshua Ditty

Makes perfect sense to me πŸ˜‰

Comment by Richard@Home

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

Comment by Anonymous Coward

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.

Comment by mozey




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s



%d bloggers like this: