Thread: Funny stuff
View Single Post
Old 26th October 2010
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Quote:
Originally Posted by Carpetsmoker View Post
The sort of code I have to deal with at work ATM (*NOT* written by me, from the previous guy).

How can it be physically possible to write this? (Yes, this is one "line" of code).

Code:
                $queryInsert = "INSERT INTO leverancier_artikel(leverancier_id,leverancier_artikelnr,fabrikant_artikelnr,merk,omschrijving,prijs,prijs_valuta,voorraad,artikel_groep,ean,status,timestamp) VALUES($leverancier_id,\"".$leverancier_artikelnr."\",\"".$fabrikant_artikelnr."\",\"".$merk."\",\"".$omschrijving."\",\"".$prijs."\",\"".$prijs_valuta."\",\"".$voorraad."\",\"".$artikel_groep."\",\"".$ean."\",\"".$status."\",$timestamp)";
Even worse, this code has been copies ~15 times too. Instead of creating one function and reusing that. Seriously, this code quality isn't measured in "wtf/minutes" but in "wtf/seconds"

Unless that is encoded in baby talk instead of a real spoken language, I don't see what's so funny about it. I've seen worse, up to and including gobs of inlined multi-language code just to fetch a non breaking space out of a database. That's when I took a break.

The intelligence I see out of most "Educated" people I've crossed codes with, makes me seriously doubt the virtue of a degree related to programming.... or that birth control is working.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote