Refactoring: The ASMR of Programming Talks
summary
A messy util class becomes a focused RecipientIdResolver with instance state and two explicit public methods instead of a symbolic option, reducing ternary logic and duplicated empty-string multiplications. The refactor pairs small RSpec tests (happy paths only) with FactoryBot fixtures, introduces early returns and readable private checks, and leaves production code unchanged as a teaching artifact. Claim: clearer public surface and easier future reuse; result: simpler code paths and better bug visibility.
AI-written summary · about
chapters (17)
- 0:00Introduction
- 1:04Refactoring feels like ASMR
- 2:20Live refactoring begins
- 5:36Adding tests to legacy code
- 6:41Renaming class for clarity
- 7:43Extracting form data
- 8:25Simplifying public interface
- 10:09Breaking down symbol argument
- 11:14Refactoring resolve method
- 12:19Combining similar methods
- 13:23When to stop
- 15:10Emotional impact of refactoring
- 17:57Call to action
- 19:21Code smells and recipes
- 20:45Developing refactoring instincts
- 21:48Avoiding greenfield trap
- 22:50Recommended resources
related talks
29mLet’s refactor some Ruby code
18mImpactful Refactors: Refactoring for Readability
12mImpactful Refactors: Refactoring for Readability
48mRefactoring from Good to Great - A Live-Coding Odyssey
46mBetter code through boring(er) tests
26mTherapeutic Refactoring
28mFluent Refactoring
45mHow Programming in Other Languages Made my Ruby Code Better
