Someone I used to work with was keen on test driven development: http://en.wikipedia.org/wiki/Test-driven_development
Haven't used it myself or read any of the books, but I thought you might be interested. I quite like the idea of writing the tests first. John
