How TDD and CDD make your apps suck less
summary
Claim: using Test Driven Development plus Comment Driven Development makes code measurably better. Demonstrates writing tests around commented code, adding validations and exceptions, renaming long methods into withdraw/deposit, wrapping operations in a DB transaction to ensure rollback, and using autotest with metric tools like flog (score drops from ~25 total and a worst method 18.3 to 21.6 total and 6.6 worst). Tests grow from one weak assertion to five tests nine assertions and the refactor actually passes.
AI-written summary · about
chapters (13)
- 0:00TDD and CDD intro
- 1:43Why apps suck
- 2:47What is CDD
- 3:51TDD and CDD benefits
- 6:16When to use TDD/CDD
- 7:41Testing tools
- 9:26Live refactoring demo
- 12:35Validation tests
- 14:22Authorization tests
- 15:47Refactoring clarity
- 17:58Final refactored code
- 19:25Code quality with Flog
- 19:45Conclusion








