Writing tests before coding, is
extreme programming in a nutshell.
"Let's begin with a simple question:
What is XP? As you will see, it is a deliberate and disciplined approach to software development".
As I told, that is a sound principle. Once you understand and learn it, you will accelerate your programming skills.
Litterature:
See the last link in my signature (you find some of my favourites there in the upper right corner, PHP, XP and design patterns in one book)
or go to the
Addison Wesley Benjamin Cummings
and search for extreme programming.