📅 Join me for Acceptance Testing (Live Training) on Wed 25th Feb (17:00 - 19:00 CET) (100% discount for Optivem Journal members)
🔒 Hello, this is Valentina with a premium issue of the Optivem Journal. I help Engineering Leaders & Senior Software Developers apply TDD in Legacy Code.
If you’ve ever sat in a Friday meeting, you’ve probably heard:
“We need to follow SOLID!”
or
“TDD will guide our architecture!”
But here’s the uncomfortable truth:
Most developers treat SOLID like a rulebook and TDD like a silver bullet.
And neither works that way.
The real question is: which one actually drives design?
SOLID: The Smell Detector
SOLID provides a set of principles for maintainable code. When you use SOLID principles to review code, you can notice design smells:
Single Responsibility Principle: helps you notice volatile classes
Open/Closed Principle: helps you see where abstraction is needed
Liskov, ISP, DIP: point out awkward dependencies
TDD: The Design Engine
TDD (Test-Driven Development) helps us design in the following way:
Red → write a failing test → this is forcing us to design the interface that exposes some behavior
Green → write the minimum code to pass → typically there is not much effort here regarding design, quick-and-dirty is fine
Refactor → we refactor code —> clean design emerges
Therefore, TDD leads to:
Well-designed interfaces (in the RED step)
Well-designed implementation (in the GREEN step)

