Idiot Programming

Entries
-- -- ---
 * This troper has seen two, both by students whom he was trying to help:
 * One guy initialized three variables, i, j, and k, all to the same initial value before a loop, then incremented all three variables in immediate succession at the end of each iteration, making no other changes to the variables anywhere else. Although knowing him, to ask why he didn't just use one variable would be like asking a guy arguing with a brick wall why his shirt is backwards.
 * Another guy wrote an algorithm which took two arguments, each a string from a list of 25, and gave one of three outputs - the first output occurred if both arguments were the same, the second occurred if the second argument was in the 12 possibilities in the list immediately after the first argument (wrapping around from the end to the start), and third occurred elsewise (i.e. if the second argument was in the 12 before the first argument, also wrapping around). Even after I suggested to just use modular arithmetic, he stuck with his original plan: 25 if statements for each possible value of the first argument, each of which contained a block of 25 more if statements for each possible value of the second argument, for a total of 650 if statements.
 * I deliberately did one, to see if my CS teacher was any good. I used a GOTO for a simple loop. The teacher did question why I did it, but realized that, since I knew how to use goto without being taught, I was probably a decent programmer. I told him it was a bad habit from programming my calculator, where GOTO is essential to do anything. That excuse was Obfuscating Stupidity, since I didn't want to be answering the entire class's questions.
 * One of This Troper's classmates. GOTOs everywhere? Check. Redundant source-code spread among many source files (this was from a numerical methods program she had to develop)? Check. Nondescriptive variable names like a, aa, aaa being used everywhere? Check. 10+ commands in a single line? Check. I wonder if she was a BASIC (not Visual Basic, more like Q Basic) programmer before starting C?
 * Another guy on the same class was a little better: his code felt like it was written under a heavy dose of caffeine, but was readable once indented and the variable names replaced by meaningful ones.
 * I had to write a C-minus compiler for a class in college and the first iteration of the code was very much this trope. My first attempt was a 10k+ line brute-force approach with literally the same thing repeated hundreds of times. I finally realized what a dummy I was and put the repeated code in its own function and just called it when it was needed, reducing the program to around 1500 lines.