The Two Disks Parable
There are two disks: one contains the production source code, the other includes the unit developer and acceptance tests. We have used the most exquisite test-driven development to create tests and source code.
One of the two disks has crashed without a backup. Which do you hope it is?
Tests are important, but without the production source code, we lose the product. We can always rewrite the tests.
You cannot rewrite tests. Tests are the specification. If you lose them, you lose the specification. You do not know what it is functionality, what is free, and what is a bug.
But, can we rewrite the code?
Yes. We created tests using TDD. We wrote tests first, and tests created our code. Our code exists because of these tests, and we can repeat the process.
But the code would be different. Uhm. Better? The second time that I write the code, I do it better. Let’s crash the CODE and let TEST survive.
Thanks for the read. If you liked the article, check my most successful stories on Medium to read more. You can also become a Medium member by visiting this referral link.