I program in C and I believe I know the language well. I understand all the concepts and my problems never come from misuse of the language.

I have problems because I always forget or oversee things. Setting a variable to zero, or generating a particular test case. I keep finding bugs in my code due to conditions I could not foresee or forgot.

Any idea how to fix this?