Thread: Funny stuff
View Single Post
Old 25th October 2010
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

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"
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote