First i started creating Unit tests for where i thought it's necessary. To make it worse mostly i've done it after i wrote the code to be tested.
The fact that i could choose what to test i could (i'm not a strong person you can say) leave out important/risky code parts because i said: yeah that's never gonna broke.
The fact that i wrote the tests after the code made my code hard to test. It was not unit based but instead a collection of hacks (which can simply be because i'm not talented).
Once i've started TDD
- I could never leave out stuff (or a lot less likely) from testing
- I wrote only the code that was really needed
- My code was well (or at least better) structured.
Do i always do TDD? No. But sometimes i also drink beer. Am i a bad person? :)
Happy coding!