We write small pieces of code that make a test pass. Bad code is hard to test, so if we write the test first, we are less likely to write complex code. Therefore our app will be easier to maintain on the long run.
I read the above point while working on Rails Unit Testing. This is extracted from the lessons learnt by the author and this is the point that need to be keep in mind in software development. I liked this and hence i posted this as a quote.