
Favorite Refactoring Patterns

#56 - Refactoring–The Discipline for Writing Good Code - Christian Clausen
Topic 16 of 18
Published Sep 20, 2021 · Clip 43:29–45:36 (2:07)
Christian names extract method as the classical foundation of all refactoring, and his personal favorite, replace type code with classes, where replacing an enum with classes makes all the ifs and checks magically disappear — chapter four of his book, which gives him chills. He notes the strategy pattern is more useful and powerful overall, but replace type code holds a special place as the moment he realized refactoring's power. He also mentions the book is in production and he hopes it will be out that year.