Not really pertinent to Android, but as I was first learning to code (C#, unfortunately), one of my programs required a while loop, amd the condition on which to run it needed to be written as "while (true == false)" in order for it to trigger correctly. Using my intended variable for the loop condition caused it to not run, and other attempted fixes caused infinite loops or no action.
To this day I'm unsure if it was other code in the program that caused this or what, but it is fundamentally, the worst code I've ever seen.
Perhaps not quite in the spirit of what was intended by "bad code", but nonetheless, felt the need to share.
Sent from my LG-E970 using xda app-developers app