@zeitschlag in short

@zeitschlag in short

More or less unit tests

Yesterday, I wrote some code, but I didn’t write any unit tests, like most of the time. I know, that this is a bad habbit and I want to get rid of it. So, first thing this morning: Writing some tests. What helped me was this book

And while doing so, I fixed two bugs and afterwards, a colleague of mine requested some minor refactorings. Thankfully, now that there were tests, it was a joy to change the code and not break anything.

The thing is: Whenever I write tests, I make some positive experiences from it pretty much right away. But when I write code the next time, I just don’t write tests — again. I have no idea, why.