Building Software That's Easy to Change
No bloated abstractions or fragile tests. Just practical ideas for keeping code clean and maintainable.
Too many test suites are annoying to work with. They either mock every little internal class and break whenever you refactor, or they are huge, slow integration tests. We prefer a simpler middle ground: fast tests that use real objects and are easy for humans to read.
How We Work
Use real objects in unit tests
Don't mock everything. When classes work together in real life, test them together. That way your tests verify real behavior, and you can safely refactor internal code without tests breaking.
Given-When-Then for clear stories
Set up the state (Given), run the action (When), and check the result (Then). Hide messy setup code in small helper methods so anyone reading the test understands what the feature does.
Visual text assertions
When system state is complex (like game maps, grids, or button bars), assert them with visual ASCII strings. If a test fails, you can see what is wrong in one second.
Only mock when necessary
We only mock external things like databases, network requests, or system clocks. Internal classes stay real and work together.
Why the spiral?
A spiral starts from a simple center and grows outward naturally without losing its shape. We like to build software the same way: start with simple rules, keep tests readable, and let the codebase grow without turning into a mess.