Automated testing.
There's loads of stuff written about dos/don'ts, TDD, etc. but doing some testing is better than none. It's not a silver bullet, and it's possible to get too caught up in tests to the detriment of the system; but you can cross those bridges if/when you get to them.