Write slop to test your code
One thing I heard was really solid advice. If you're working on something large and critical, you should be writing a lot of slop (quick, throwaway AI code). Just keep it out of the code base and use it to test the code base.
The more critical the app, the more slop you should be writing to test it.