When bugs occur, the worst of all possible strategies is to continue writing code. It will guarantee that your code will soon have even more bugs, and debugging them will be even more difficult. The
Jidoka (stop and fix) principle from Toyota Production Systems is very effective in this situation as well.