Immutable Ruby
summary
Argues for immutability by giving concrete fixes: use ActiveRecord read_only and a gem to lock specific attributes, call Ice Nine deep_freeze on YAML config, and replace mutable strings with frozen ones to avoid destructive shovels. Shows value objects via composed_of to shrink fat models and speed tests, demonstrates event sourcing with Postgres as the canonical log and a graph DB for views that can be rebuilt by replaying events, and demos persistent structures with Hamster while noting CPU and memory tradeoffs.
AI-written summary · about
chapters (25)
- 0:00Intro
- 0:21Immutable Ruby Michael Fairley
- 0:38Braintree
- 3:33In your application too!
- 4:50DANGER WILL ROBINSON
- 6:23deep_freeze with ice_nine
- 12:02Capture all changes to application state as a sequence of events
- 12:34Events Debits and credits (12/6/2012 16:30, "15.00", "Book")
- 13:30Replay Debug errors & test new code
- 14:09Derived state Working directory
- 14:28Replay git rebase
- 14:59Safety net
- 16:13Audit log
- 16:37Escape hatch
- 17:42Immutability lets you break the rules
- 17:52There are only two hard problems in Computer Science: cache invalidation and naming things.
- 18:27Normalization
- 18:55Thread Safety
- 19:17Performance
- 19:29Flexibility
- 20:29Next steps
- 21:00The Value of Values Simple Made Easy The Database as a Value Persistent Data Structures and Managed References
- 21:37Function Core/Imperative Shell Boundaries
- 22:01Event Sourcing Martin Fowler
- 22:31Bonus round!








