RailsConf 2014 - All the Little Things by Sandi Metz
15 人推荐 · 跨 15 个月 · 2015–2025

中文导读
面向对象设计大师 Sandi Metz 的封神重构演讲。借经典 Gilded Rose 题面,将一段散发恶臭的嵌套条件分支层层剥茧为几个精炼的对象;并奠定了那句传世箴言:“重复的代码远比错误的抽象代价更低”。
为什么 HN 推它
十年来在 HN 上被程序员反复安利的顶级架构与重构讲座,把面向对象设计哲学与实战手法结合得天衣无缝。
「这场演讲仅凭一个精巧的案例,就把所有最核心的软件设计价值观展现得淋漓尽致。」HN 网友原话:this talk captures all the important values in a single example.
英文原摘要(HackerTube / Claude 整理)
Sandi Metz takes an ugly section of conditional code and refactors it into a few simple objects, bridging object-oriented theory and practice. The talk includes her take on the Gilded Rose refactoring kata and the idea that duplication is cheaper than the wrong abstraction.
HN treats it as a top-tier programming talk for learning refactoring and for the wrong-abstraction principle, recommended repeatedly over a decade.
HN 上的提及
is amazing for understanding the general concepts around refactoring OOP code.
This is a great presentation about refactoring that may be useful
Both of these talks are in my top 5.
there's a lot of beauty in the way Sandi Metz demos a refactoring of a thing called The Gilded Rose