Saw the title. Immediately thought of something I saw today at work. Not too different from yours. 'if ('True' == 'True')'. I should note that this is javascript generated by a template file.
I've actually used 1==2 and 1==1 to basically comment sections out or create an infinite while loop. Only really useful in C-style languages
Dumb mistakes I've seen include commented out error checking because of a reversed greater than sign and a SQL query that deletes the whole table before rebuilding the entire thing every day
Take a minute look at that and tell me what the keys stand for. When you figure it out you'll realize why this is the worst piece of code you've ever seen.
[+] [-] fzfzqfz|13 years ago|reply
Each line of HTML is generated like that :
$html.='<html>';
$html.='<body>';
$html.='The content';
$html.='</body>';
$html.='</html>';
The dev used this in every file, each file contain thousands of lines like that. Worst project i have ever seen, and i must work alone on it. FML.
[+] [-] krapp|13 years ago|reply
[+] [-] pyfap|13 years ago|reply
[+] [-] tdubbed|13 years ago|reply
Dumb mistakes I've seen include commented out error checking because of a reversed greater than sign and a SQL query that deletes the whole table before rebuilding the entire thing every day
[+] [-] eb0la|13 years ago|reply
The code was really awful, and that part hurt my eyes:
/* commented out code. <--- Yep. That was the actual comment.
At least (s)he knew what a block comment was.[+] [-] DanielN|13 years ago|reply
[+] [-] whalesalad|13 years ago|reply
[+] [-] krapp|13 years ago|reply
[+] [-] dangrossman|13 years ago|reply
[+] [-] chrisdevereux|13 years ago|reply
[+] [-] AbhishekBiswal|13 years ago|reply
if( 1 == 1 ) cout << "it's true" << endl; else cout << "false" << endl;
Haha, 1==1
[+] [-] orangethirty|13 years ago|reply
[+] [-] kschua|13 years ago|reply
if (obj instanceof java.lang.Object)
[+] [-] eduardordm|13 years ago|reply
This is (was in Sun's time) an actual possible certification question and you are wrong, this CAN return false:
[+] [-] _yields|13 years ago|reply
[+] [-] codeonfire|13 years ago|reply
if (failed) { return SUCCESS; }
[+] [-] graycat|13 years ago|reply