"Escape Your Framework"
summary
A small Rails site that imports movie credits becomes a worked example: code evolves from a controller full of side effects into a credits importer that uses the Values gem for immutable result objects, method-to-proc and currying for composition, pattern matching and an explicit list-of-actions DSL. The core returns a program of read/write actions and a simple shell interpreter runs them, which proves more testable, composable and practical than the original messy approach.
AI-written summary · about
chapters (13)
- 0:00Intro
- 2:15The brief
- 3:18Credits
- 4:46Extract From Controller
- 7:21Handle errors
- 11:54And then...
- 17:18Imperative Shell/Functional Core
- 26:34Extract ALL the Side Effects
- 27:18Extract Side Effects
- 27:57Return write side effect values
- 31:25Return read side effect values too
- 38:09Nicer API
- 39:21Version 1: Quick And Dirty








