Old php site from year 2000.<p>Each line of HTML is generated like that :<p>$html.='<html>';<p>$html.='<body>';<p>$html.='The content';<p>$html.='</body>';<p>$html.='</html>';<p>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.
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<p>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
I remember in college, someone left his/hers C assignment source code in the lab (laptops were a luxury in that time).<p>The code was really awful, and that part hurt my eyes:<p>/* commented out code. <--- Yep. That was the actual comment.<p><pre><code> and here was the code
seriously
*/
</code></pre>
At least (s)he knew what a block comment was.
My personal favorite:<p><pre><code> $array = array('z'=>12, 'o'=>43, 't'=>32, 'th'=>85, 'f'=>91, 'fi'=>42);
</code></pre>
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.
This might make some sense if it wasn't for the comment at the end...<p><pre><code> enum BankID {
ONE = 1,
TWO = 2,
THREE = 3,
FOUR = 4
// add more if needed
};</code></pre>
My Teacher used this code to explain conditions in class :<p>if( 1 == 1 )
cout << "it's true" << endl;
else
cout << "false" << endl;<p>Haha, 1==1