Curing the common loop
summary
Shows concrete refactorings that remove loops, conditionals and temporary variables by using higher‑order functions on Laravel collections, demonstrating the same $2.9M result after replacing nested loops with map filter flatMap reduce sum pipelines. Uses PHP/Laravel collection methods like pluck and contains to simplify logic, runs Valet tests to prove correctness, and replaces ad‑hoc array code with readable Collection::map()->filter()->sum() chains that keep behavior and eliminate state.
AI-written summary · about
chapters (9)
- 0:00Start
- 0:20Curing the Common Loop Cadamwathan
- 0:47Higher Order FUNCTIONS
- 8:41Thinking in STEPS
- 10:25#2. CONDITIONALS
- 10:54Inline TEMP
- 12:11The Problem With PRIMITIVES
- 13:40Introducing COLLECTIONS
- 44:42FULL STACK RADIO
related talks
30mRefactoring to SOLID in Laravel
38mCrafting maintainable Laravel applications
40mEngineering Complex Applications with Laravel 4
11mIntroduction to functional programming
40mCrafting Elegant APIs with Laravel
21mThe Tale Tell Code
15mFrom Imperative to Declarative
27mModelling business requirements with Eloquent
