The first mistake that nearly every single programmer makes is presuming that this code will work as intended:
float total = 0;
for(float a = 0; a != 2; a += 0.01f) {
total += a;
}
The novice programmer assumes that this will sum up every single number in the range 0, 0.01, 0.02, 0.03, .....