Clean Code: The Next Chapter
summary
Live refactoring of the Video Store kata shows concrete moves: keep tests green and use IDE refactorings to Extract Method, rename and inline until methods read like prose; replace long parameter lists with a parameter object or value type; move behavior to the owning class and prefer enums over magic numbers. Follow three rules for a hygienic switch (default, only instruction, one line per case). Demonstrations use Java (IntelliJ), unit tests as scaffolding, mob/timeboxed refactors, and a real example of a 35k-line class split into ~300 classes that works.
AI-written summary · about
chapters (10)
- 0:00Start
- 16:48package the interface in a jar
- 42:33putting state in a singleton
- 50:28keep side-effects at the boundaries
- 1:03:35build a testing framework
- 1:08:47extract constants
- 1:27:53start with duplicating the method
- 1:28:49reduce the indentation
- 1:41:07aligning the code in the specification
- 2:10:18make a public static class statement formatter








