RailsConf 2014 - All the Little Things by Sandi Metz

Channel:Confreaks · Length:38:47 · Published:2014-05-21 · Views:190746

Watch on YouTube

Summary

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.

Why HN recommends it

HN treats it as a top-tier programming talk for learning refactoring and for the wrong-abstraction principle, recommended repeatedly over a decade.

this talk captures all the important values in a single example. — HN, 2016

Python, Ruby & scripting languages · Software architecture & design · Testing, debugging & developer tools

Subtitles (excerpt)

(jazzy music) Sandi:So you'd think that writing object-oriented code was hard. All you have to do is look at our apps, alright? We mean well, and we write code that almost always inevitably we eventually come to hate it. And the more I think about this, these days, somehow my job is to think about how to write better code. And the more I think about it, the more I think that all of the problems we cause have the same simple solution, and that when people ask me now how to write object-oriented code, I give them one small piece of advice. I say make smaller things, that's all it is. Make smaller classes, make smaller methods, and let them know as little about each other as possible. And lately I've been on a quest. I've had this obsession for the last couple of months, and it's been about conditionals. There's a lot of code out there with nasty conditionals in it, and I've been wondering, when should I replace conditionals with small objects, and how should I do this, and what would happen to my code if I do? And I was really confident in Miami in November and I inflicted this obsession upon Jim Weirich, whom some of you probably knew, and he pointed me in the direction of the Gilded Rose.

On Hacker News

One of the many great takeaways from Sandi Metz's talk at Railsconf 2014: "Duplication is far cheaper than the wrong abstraction." [VIDEO] Worth watching in its entirety, but the quote is from ~13:59 in that video. — wilkystyle, 2025-08
"Duplication is far cheaper than the wrong abstraction." — Sandi Metz ( [VIDEO] ) This talk by her is one of my favorites ever. Her ideas definitely made me a better programmer. — abvdasker, 2020-01
I'm a huge proponent of this concept. The goal is to be able to build and iterate as fast as possible. Most of this is achieved when new folks can step in and understand the code right away. Needless abstraction slows this down and makes the app more brittle to changes in response to customer/client inputs. Sandi Metz had an awesome presentation about this during a Rails Conf. "Duplication is far… — chrischattin, 2019-01
Define "technical". But when it comes to programming I always enjoy Sandi Metz's talks. I can highly recomend this talk she made at the RailsConf in 2014, about taking an ugly beast of code and turning it to something more digestable and beautiful [VIDEO] — da_murvel, 2018-10
These talks are a little skewed to the game/high performance programming side of the art, but still very interesting in general. Of the ones I've already seen I really like Mike Acton's talk. Since this has become such a nice thread some additions I'd add: * Sandi Metz going through the Gilded Rose or "All the small things" [VIDEO] I already subscribed to her programming style and the general Rub… — tinco, 2016-12

Related videos