Writing code that lasts
summary
Ten concrete rules for making PHP code easier to read, test and change: use Composer packages (Guzzle, Tactician, Doctrine) instead of reinventing work, write tests for confidence, prefer small classes (≈10 methods) with few dependencies (2–5), replace getters/setters with behavior, use first‑class collections, and document surprising design choices. Practice object calisthenics — e.g. only one level of indentation and no else — and follow naming/whitespace rules; the presenter reports not writing an else in five years. Document your code for decisions that can't speak for themselves.
AI-written summary · about
chapters (13)
- 0:00Introduction and welcome
- 1:29Early career code regrets
- 6:24Balancing quality and shipping
- 12:28Making code last longer
- 16:40Testing for confidence
- 18:09Core design principles
- 22:00Package managers and open source
- 25:35Code as communication
- 28:03Object calisthenics introduction
- 31:36Calisthenics rules explained
- 48:08Documenting code decisions
- 51:02Practical improvement steps
- 54:19Q&A session
