blob: a33d2238ea7785db6ee4da6cc28fd117694eba22 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
---
tags:
- software-design
- software-engineering
- tdd
---
This phrase came from the https://www.cosmicpython.com/ book.. The core idea here is that during development you write **many** small unit-tests that make it easy and fast to test whether we are doing the correct thing.
Having many such small tests makes it hard to refactor, so at some point we can start dropping some of the very specific tests when we have more general tests and feel confident that everything works as intended. This makes it less brittle, because small very specific tests will start failing the moment you start refactoring a little bit.
Then when you need to start developing again you start by writing new very specific tests until you again feel confident that everything works as intended and is also tested by more general tests.
The analog is a bit to cycling: when you start to move you set the bicycle in a low gear and then once you are going you shift the gear lower and lower until you are at speed and comfortable.
In my mind it is still a bit unclear when that inflection point occurs that you decide to drop specific tests though, but I guess that also kind of comes with practice and experience.
|