
Software Engineer at heart. Tech Lead by craft. With 16+ years in software engineering, I solve complex problems and enable the delivery of a continuous and efficient flow of value.
Search for a command to run...

Software Engineer at heart. Tech Lead by craft. With 16+ years in software engineering, I solve complex problems and enable the delivery of a continuous and efficient flow of value.
No comments yet. Be the first to comment.
The promotion we didn't expect

Architecture is the art of drawing lines. A cheeky definition. I think of architecture as how concerns are separated and the rules that govern them. The lines we draw tend to depict this perspective. Clean Architecture is my go-to for source code. He...

A reflection on my leadership journey

The art of crafting clean repositories

I've worked in unstructured, Waterfall, and Agile software processes since 2009. One I found ineffective is 'Waterfall in sprints', confused as Agile. When I saw a meme about it, I realised it's a common Agile anti-pattern. Here, I'll unpack what I m...

There’s a theory of stability. It applies to entities. We can observe its effect on human behaviour. It explains why parents tend to be more stable individuals than teenagers. And can explain why unit tests make code more stable.
The theory says stability increases with dependants. Let’s explore this by juxtaposing parents and teenagers. A typical teenager doesn’t have dependants. They can afford to change their behaviour. They can change their sleeping patterns. They change their discipline, perhaps to play more computer games and study less. Because their changes, for the most part, only affect them. Parents are different.
Parents have dependants, their children. If they’re conscientious, this makes them stable. They can’t change their sleeping patterns, because children may miss out on important activities. They have to stay disciplined, be it to keep their job as a breadwinner or to help their children at home. Their behaviour remains consistent because changes to it may have a bad effect on their dependants. You may now think, 'That's commendable. But how is this relevant to unit tests?’
Think of unit tests as the expectations of what your code’s supposed to do personified as dependants. Writing them gives your code dependants. In theory, a unit of code's stability should go up when you make tests depend on it. Dependants can also provide feedback to their dependency about how well they're regulating their behaviour. A child can inform their parent if things are wrong. Unit tests also do this. Not to their units but to software engineers. They tell you when the changes to their dependency, the unit, is wrong.
That's it! A strange perspective of unit tests. They're dependants you give to units of code to increase stability.