
Anti-Patterns: Optimization, Generality, DRY

#56 - Refactoring–The Discipline for Writing Good Code - Christian Clausen
Topic 15 of 18
Published Sep 20, 2021 · Clip 40:10–43:29 (3:19)
Christian bashes four popular practices that feel good but are counterproductive: optimizing lines of code (compact one-liners are unreadable and bad for teamwork), speculative generality (adding parameters to solve a bigger class of problems that may never materialize, and which can even block later simplification), premature optimization (shaving milliseconds when the app takes five seconds to start), and reflexive DRY (unifying copies couples them, which is only right if the behavior must stay in sync — always ask whether the places will change together forever).