Actually I started this blog a long time ago only to teach myself test driven development – hence the name. I know all the good reasons why I should’ve written unit tests first.
However I soon discovered that unit testing simply didn’t work out for me.
Seriously, I do know of the benefits of unit tests and I wish I was able to utilize it.
As I described earlier coding for me was a process of discovery and of thought. I didn’t know the result until I got there. How could I’ve written unit tests beforehand?
Instead I wrote many tests after I wrote the code they tested. It’s a tedious experience to write code that proves what you already established: that your code is working as otherwise you wouldn’t have come round to write a test in the first place. And changes are worse for your code gets broken although you’re changing it to improve it. Fixing the indicator jist feels wrong and is not what unit testing is about.
Maybe in web development the requirements are usually too unspecific to base good unit codes on. At least this seems to be true for the many years of my own experience..
Functional and acceptance tests are a different matter as you can create them as soon as you can describe an idea.
Maybe it’s just me but unit tests and I never became friends.