From OO Patterns to Functional Programming w/o Killing Yourself
summary
Converts a sprawling OO strategy-based mortgage scoring system into a pipeline of pure data-transforming callables using Ruby lambdas/modules as callables and simple hashes, using merge+reduce to thread immutable state. Replaces many strategy classes and heavy object passing with a configurable per-bank ordered list of functions (data-as-hash pipeline). Adds new banks move from ~two weeks to “pleasant and fast,” system runs in production for over a year with no major incidents.
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:18About me
- 1:15ObjectOriented Programming
- 3:06I did my research
- 3:44Business context
- 4:40Credit Score
- 5:18Credit Score Implementation
- 6:15Score Calculator
- 7:06Private Methods
- 7:23refactoring
- 8:19production
- 9:00bank report
- 9:43new banks
- 11:25strategy patterns
- 12:06amortization strategy
- 12:57new strategies
- 13:30pain
- 14:03slow
- 15:05classical symptoms
- 15:25trying different solutions
- 17:12semantically
- 18:36first class functions
- 18:50lambdas
- 20:49pipeline
- 23:58final solution
- 24:49lessons learned
related talks
26mBlending Functional and OO Programming in Ruby
34mSprinkles of Functional Programming
40mMake Ruby Functional Again!
37mFunctional Programming in Ruby
44mFunctional Programming for Rubyists
28mFunctional Principles for OO Development
42mTaking inspiration from the functional world
33mBetter Ruby through Functional Programming
