I prefer to make programs without flaws in it . If they do appear, I look at the faults I get, think of what might cause them, then correct it. Sometimes I use printf/cout/MessageBox to see if a certain piece of code is running or not, and what value it has.