Keeping your code strong
summary
Argues that project size, not per-file complexity, drives bugs and editing pain, with potential connections growing roughly as n(n-1)/2; offers three concrete cures: delete code, extract a gem/library, spin off a service (examples: feminizer gem, PDF and barcode Sinatra services, moving heavy binaries off Heroku to cut slug size). Recommends measuring complexity with metric_fu, flog and simple wc -l .rb, naming things clearly, and continuously rebalancing the codebase so each component stays small and easy to read and change.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:06Defining strong code
- 2:19The impact of code size
- 6:36Managing system complexity
- 9:38Strategies for shrinking code
- 12:17Extracting gems and services
- 14:18Interface design and services
- 20:25Preparing code for the future
- 23:22Naming and rebalancing
- 25:44Measuring and maintaining
related talks
28mAvoid overengineering & big ball of mud- 7 lessons for maintaining the balance
31mAn Optimistic Proposal for Making Horrible Code... Bearable
42mThe art of clean code
35mMind Over Error
40mMore Code More Problems
51mTwelve Ways to Make Code Suck Less
41mHow to write maintainable code
27mFinding Beauty in the Mundane
