"Bubble Gum"
Some loops look as if they are held together by bubble gum
The underlying problem is that students modify buggy code until it works, without really understanding it at all
Example:
public void sayHello() { int i = 1; while (i > 0) { System.out.println("Hello"); i = 0; } }
This did not, of course, need to be a loop at all
It compiles fine, and it works, but somehow it is not quite right
(next)