Member-only story

The Two Disks Parable

David Rodenas PhD
1 min readMar 10, 2020

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?

CODE:
Tests are important, but without the production source code, we lose the product. We can always rewrite the tests.

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.

CODE:
But, can we rewrite the code?

TESTS:
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.

CODE:
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.

--

--

David Rodenas PhD
David Rodenas PhD

Written by David Rodenas PhD

Passionate software engineer & storyteller. Sharing knowledge to advance our skills. Join me on a journey of discovery in the world of software engineering.

No responses yet