15 Comments
User's avatar
Vinicius Policena's avatar

> Within this process, every individual act of building is a process in which space gets differentiated. It is not a process of addition, in which preformed parts are combined to create a whole, but a process of unfolding, like the evolution of an embryo, in which the whole precedes the parts, and actually gives birth to them, by splitting.

Reading that run a thread through my brain connecting some observations:

- "grow like a tree" https://youtu.be/Saaz6D1azlU?si=UU2aNXnVjoCqNplP&t=2851

- https://tidyfirst.substack.com/p/ad-hoc-infrastructure

- That TDD video from PragProg where the first implementation of a production class was developed in the same file as its test class, being extracted to its own file only after it was "ripe" enough.

Seems to be the same principle, but applied to different scales. Now I really need to read The Timeless Way of Building!

Expand full comment
Kent Beck's avatar

Bingo!

Expand full comment
David Rasch's avatar

Fyi, link to https://testdesiderata.com/ doesn't work for me. maybe the www is tripping it up?

Expand full comment
Kent Beck's avatar

Should be fixed. Now waiting for DNS propagation (he says, sounding misleadingly informed).

Expand full comment
David Rasch's avatar

Also not a link on the web. Also, now a cert/name mismatch error :(

Expand full comment
Kent Beck's avatar

Apparently we all need to wait up to 24 hours for magical stuff to happen.

Expand full comment
Jeff Grigg's avatar

Yes on that last point. ;->

And this is a good article, nonetheless.

Expand full comment
Jeff Grigg's avatar

Like really! I just ran across this again and re-read it. And most of what it says is pretty much mostly what I've been thinking for some years. "Good advice!" is what I keep thinking.

I'm glad you wrote this. It is invaluable. Even if you missed the irony of my post that you were reacting to.

Expand full comment
Jay Bazuzi's avatar

It's interesting to notice why we decided to extract sub-elements: what was the motivation? Some examples:

- We wanted to re-use that logic somewhere new.

- We saw duplication and wanted to merge it.

- We notice a code smell and want to address it.

- The caller becomes more readable this is extracted.

- We learn that this concept is part of the domain, and want to express that in code.

- We want to improve or introduce a test for something.

Expand full comment
Kent Beck's avatar

More abstractly, either to increase cohesion or reduce coupling. The benefits of which are as you describe.

Expand full comment
Ben Christel's avatar

Great post! The redundant test dilemma is one I grapple with a lot.

One way I sometimes resolve it is to ask myself how confident I am that I've discovered the "right" organization into sub-elements, or whether the boundaries are likely to shift. I'll keep the system-level tests around to the extent that I care about the freedom to inline and re-extract sub-elements later.

Expand full comment
Eric Rizzo's avatar

How would this change if system-level tests aren't slow to run? Is there a threshold where the conclusions here will take over, but below which the calculus is different? eg, if TimeToRun(S) is 2x TTR(C)? 5x? 10x or more?

Expand full comment
Kent Beck's avatar

That's an important part of the tradeoff.

Expand full comment
Douglas Ronne's avatar

Wonderful, this is an argument I have with myself all the time.

Expand full comment
Tentor's avatar

I would disagree that S1 is redundant.

There are 8 potential outcomes of C1, S1, S2 passing or failing. Some of these are impossible, if C1 or S2 failing means S1 fails too. But S1 can still fail even if C1 and S2 pass.

Expand full comment