How does TDD help us navigate a complex world?

January 18, 2022

How does TDD help us navigate a complex world?

Certainty in an uncertain world?

In TDD, when we write unit tests, everything is fully known, certain, deterministic… BUT our world is a complex world with many unknowns…

Let’s look at the Cynefin framework and systems:

– Simple = WHY/WHAT & HOW are all known. We know what’s needed and how to get there. This means we have clarity around both our goals and the path to reach that goal. It’s factory-like.

– Complicated = Either WHY/WHAT or HOW are partially unknown. We’re not sure exactly what’s needed – the goal might not be clear, the requirements to reach that goal might be unclear, stakeholders may disagree about goals and requirements. Or, perhaps the technical implementation might not be certain.

– Complex = Both WHY/WHAT & HOW are partially unknown. We have uncertainty in both what’s needed and how to get there. This means uncertainty in both the requirements and the implementation. Neither the goals nor the execution is clear. This requires a more exploratory approach due to the higher risk and uncertainty. We need small iterations so that we can adapt.

– Chaotic = Both WHY/WHAT & HOW are unknown. The system is in a constant state of flux. Both goals, requirements and execution are undefined and the risk is really high. This requires the greatest level of experimentation, exploration, and shortest feedback loops.

As we can see, as we go from Simple -> Complicated – > Complex -> Chaotic, the world becomes hazier, we can’t don’t know our goals, we don’t know what’s needed, and we don’t know how to reach it either… 

So what can we do? Well, we can experiment and explore, then get feedback, learn, and adapt.

We make some kind of hypothesis, we’re making a hypothesis about our market & the business needs, and what product solution is needed. Software requirements are based on that best guess. These requirements are concretized as unit tests – the unit tests themselves are falsifiable hypotheses of the requirements. 

Unit tests are about isolation, certainty & determinism. “Creating a unit test helps a developer to really consider what needs to be done. Requirements are nailed down firmly by tests. There can be no misunderstanding a specification written in the form of executable code.” https://lnkd.in/etC9Rv-z

But remember, our world is uncertain. So this means even though we’re introducing certainty at the micro-level (at the level of the unit tests, to provide certainty to the developer), we nonetheless have to zoom out to the macro-level (to the users, the market) to re-assess where we are going and how to get there. 

It’s an experiment, an exploration.

The shorter the feedback loop, the faster we can adapt.

Optivem Group LLC 30 North Gould Street Sheridan, WY 82801 United States

Optivem DOO, MB 21609722, PIB 112111924, Heroja Maričića 93, Kraljevo 36000, Serbia

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.