Else Considered Harmful
summary
Code claims that the problem is the else not the if and shows concrete replacements: bail early so the main flow stays unindented, replace conditional with polymorphism or a type keyed map instead of sprawling if else chains, and extract conditionals into named functions when elimination is impossible. The talk measures how elses introduce context switches, cites the surprising prevalence of else clauses in code, and demonstrates patterns and small refactors that actually reduce complexity and make behavior visible.
AI-written summary · about
chapters (12)
- 0:00Intro
- 4:58Context
- 5:18Why Else
- 7:12Face Recognition
- 7:51Sound Recognition
- 8:56Essential Part
- 11:14Polymorphism
- 13:59Patterns
- 18:07Conditionals
- 18:19Extracting
- 18:49Abstraction
- 19:11Closing








