Real World Gobbledygook
summary
Builds an auction domain with orders and products, gets tests green for evaluate, average and JSON output, then replaces subclass methods with type class traits (Number, JsonWriter, Eval, Addable) and puts implementations in implicit instances so code stays pure data and behavior lives in one place. Uses implicit conversions for Ops syntax and demos Cats/Scalaz basics: Show, Eq, Functor. Result is generic, compile-time checked behavior, fewer runtime wrappers, and working tests throughout.
AI-written summary · about
chapters (22)
- 0:00Introduction and setup
- 0:50Jimmy’s blackout and grief
- 2:16Jimmy’s auction system domain
- 3:40First feature calculate final checkout
- 5:52Second feature calculate average price
- 8:39Adapter pattern and boilerplate
- 9:01Third feature present orders as JSON
- 11:52Coupling and domain purity concerns
- 13:38Reinventing the wheel refactor
- 16:02Type classes and ad hoc polymorphism
- 21:42Type class instances and patterns
- 24:33Semigroup and monoid explained
- 26:18Type class definition and laws
- 28:06Type classes vs OOP encapsulation
- 29:51When to use type classes
- 31:18Monads and other scary terms
- 32:29Live coding with Cats library
- 33:11Type class Show demonstration
- 34:58Type class Equals demonstration
- 36:45Functor type class explained
- 39:00Functor in production code
- 40:47Summary and Q&A teaser
