Alexander Beletsky's development blog

My profession is engineering

Develop With Tests


I’ve been recently thinking about my TDD and I came to interesting conclusion. I’m not TDD practitioner any more!

TDD is quite strict practice, it suppose you following certain rules. The main rule is test first. You create test, you create code after. For years I’ve been using that practice as dogma. I’ve seen a lot of value with such approach and that worked for me really much.

Do you use that rules now? Not always.. Do you use something different than TDD? Yes, I do develop with tests.

See, TDD main power is not in tests itself. The power of TDD is Test Driven Design. This is design that makes code more readable and maintainable. Tests of cause helps regression and general quality, but it is not always the truth. As long as you practice TDD much you feel how designed for tests code should look like. You do not need to create test to prove that code is testable. Following very simple rules you simply guarantee that tests are possible here.

Now, I simply optimize the process a bit. I could skip first step and go ahead for code. That does not mean I’m skipping test. No, I’ll create there I feel it necessary.. And I feel that mostly to all code I create. But this is no longer TDD, I call that develop with tests. DWT as you want ;)

develop with tests

I think a some developers might say, “Oh, I’m using DWT as well”. Others will say, “I will use DWT since TDD is boring and requires too much time”. Please do not do that. I strongly believe that is TDD that could make you stronger as developers and your code robust and good looking. So follow the rules before you absolutely sure, you ready to break them.