Testing as an equal 1st class citizen (to coding)
summary
Argues that testing and coding must be equal first-class citizens with concrete practices: instrument tests (pytest/coverage) to spot dead code, aim for 100% branch coverage so dead lines surface, measure test cyclomatic complexity and keep it near one path, name tests as short IDs with rich docstrings (given‑when‑then), and prefer minimal diagnostics on green. Cites NightTrader’s $450M loss from dead C++ code and finds in Cyber Dojo dead-test commits about 1 in 15, so these techniques prevent real failures.
AI-written summary · about
chapters (18)
- 0:00Start
- 7:49free chocolate for everyone!
- 11:29stable systems tend to oppose their own proper function
- 13:23evolution is always co-evolution
- 29:14what is the coverage of a function? og, simple statement coverage
- 31:32are you confident enough to delete the dead code?
- 31:46do you think it is important to delete dead code?
- 37:15unless I have a way to detect and delete dead code then I will accumulate dead code
- 38:12what is the complexity of a function? eg, the number of different paths
- 39:01Equal Rights VOTES For Tests! TESTS
- 41:33hands up if you've ever thought a failing test was passing or vice-versa
- 41:50a test function should do one thing when it and something completely different when it passes
- 42:41a difference that makes a difference
- 42:55when a test function fails helpful diagnostics printed
- 46:20naming a function? • member function? • return value assignment? • argument expressions? • side effects?
- 49:36naming a test function is different because a test function is different
- 51:14there is too much context to carry in a single identifier
- 54:51uids make it easy to call test functions








