"The Clean Code Talks -- Inheritance, Polymorphism, & Testing"
What it is
Misko Hevery's Clean Code Talk shows how to use object-oriented techniques such as polymorphism to remove repeated if and switch statements. The result is code that is easier to test, understand and maintain.
Why Hacker News recommends it
HN commenters recommend it as a thorough treatment of replacing conditionals with polymorphism and why flags and deep ifs can be code smells.
- 3 people recommended it
- 3 different months
- 0 strong recommendations
- first 2009, last 2023
What HN commenters said
“which is more comprehensive than the posted article.”
More comprehensive treatment of replacing conditionals with polymorphism.
derwiki, 2009-09 · Recommendation · in “Using Polymorphism instead of conditionals when programming”
“I believe the google clean code talks gives a far better arguement than I ever could.”
Better argument for OO principles than the blog.
VBprogrammer, 2010-06 · Recommendation · in “Criminal Overengineering”
“This talk gives a great overview of why boolean flags (rather, if-statements) can be a code smell”
Why boolean flags and deep if-statements are a code smell.
Mr_P, 2022-05 · Recommendation · in “Flags Are a Code Smell (2014)”
Excerpts from Hacker News comments, linked to the originals. Summaries and labels were written by a language model from those comments.
Topics: clean code, polymorphism, object-oriented design, testing, refactoring
Also recommended by the same people
talkA Talk Near the Future of Python (a.k.a., Dave live-codes a WebAssembly Interpreter)David Beazley · 7 HN recommenders · 2019–2025
talkTreating the Farm as an Ecosystem with Gabe Brown Part 1, The 5 Tenets of Soil HealthLiving Web Farms · 12 HN recommenders · 2019–2025
documentaryA4 / V2 Rocket in detail: TurbopumpAstronomy and Nature TV · 3 HN recommenders · 2019–2022
talkAlex Evans at Umbra Ignite 2015: Learning From FailureMedia Molecule · 7 HN recommenders · 2017–2026
talkRailsConf 2014 - All the Little Things by Sandi MetzConfreaks · 15 HN recommenders · 2015–2025
talk"Simple Made Easy" - Rich Hickey (2011)Strange Loop Conference · 14 HN recommenders · 2022–2026
talk"Making Impossible States Impossible" by Richard Feldmanelm-conf · 9 HN recommenders · 2017–2026
talkHow To Design A Good API and Why it MattersGoogle TechTalks · 12 HN recommenders · 2011–2025