Mistakes are an integral part of our work. Finding and understanding them takes a lot of time. Troubleshooting is often just a line of code. How can the process of searching and understanding be optimized? This is possible through strategic preparation of the code base. For this I systematically apply several transformations from the field of defensive programming. The aim is to shorten the distance between the cause and the occurrence of a fault. In addition, I consider special and overlooked situations. Using the examples presented, you can stabilize your code tomorrow and carry out your own analyses more efficiently. I also give an outlook on how you can get even more out of this concept.