Senior Track
SOLID in Real Rails Code
Each principle anchored in source code from Mastodon, Forem, Discourse, Gumroad, and Rails core. The lessons trace the rule back to where it came from, name the anti-pattern with a concrete scenario, and walk through how a senior codebase actually applies it.
Single Responsibility
7 lessons
Seven extractions for fat models and fat controllers. Service, form, query, policy, decorator, concern, and value objects.
Open/Closed
5 lessons
Five shapes for adding behavior without modifying existing code. Registry, adapter, middleware, pub-sub, delegated_type.
Liskov Substitution
2 lessons
Duck typing as Ruby's native idiom for substitutability, and where inheritance breaks the contract.
Interface Segregation
2 lessons
Focused concerns over fat mixins, and role-based interfaces over class-based dispatch.
Dependency Inversion
3 lessons
Inject collaborators, centralize configuration, and let the test environment swap dependencies cleanly.
Want to drill these? The matching Practice cards turn each principle into a design-judgment exercise.
Long-form companions — Open/Closed in Practice
Two deep-dive articles that show OCP applied at the codebase scale. Pair with the OCP lessons above.
Open/Closed in Practice — Gumroad payout system
Walks through Gumroad's open-source payout processor code. Real OSS, real OCP.
Open/Closed in Practice — invented examples
The same teaching shape with all-original examples (e-commerce discount strategies).