Skip to content

Instantly share code, notes, and snippets.

@up1
Last active August 29, 2015 14:25
Show Gist options
  • Save up1/553b4834399123348002 to your computer and use it in GitHub Desktop.
Save up1/553b4834399123348002 to your computer and use it in GitHub Desktop.
How to write bad code?
/* You are not expected to understand this. */
return TRUE; //return TRUE
/**
* isValid
* return boolean value
*/
public boolean isValid() {
}
if ($foo == ONE) goto a;
if ($bar == TWO) goto b;
goto c;
a:
echo ONE;
goto c;
b:
echo TWO;
goto c;
c:
echo 'not ONE or TWO';
(DEFUN HELLO-WORLD () (PRINT (LIST 'Hello 'World)))
print 'Hello World'
$b = a('Mr. Pet Rock');
$c = a($b) / EIGHT;
ถ้ามีหัว creative หน่อยจะเป็นดังนี้
ตั้งชื่อไม่ให้สื่อกับสิ่งที่ทำ
$pizza = slicePizza('Mr. Pet Rock');
$numPetRocks = slicePizza($pizza) / EIGHT;
import sys,os,re,fileinput;a=[i[2] for i in os.walk('.') if i[2]] [0];[sys.stdout.write(re.sub('at','op',j)) for j in fileinput.input(a,inplace=1)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment