How To Code Like A Writer
summary
Argues that applying Strunk and White rules to code produces clearer, smaller Ruby: takes a 427-line Rails utility with 427 lines and no tests, writes characterization tests, extracts a ShipmentBuilder and a ShipmentList helper, and reduces duplication from 36 to 0 while dropping flog 180.4→77.2 and shrinking the build_shipments complexity dramatically (from ~120.7 to single digits); the refactor yields small, test-backed methods and a working, maintainable shipping routine. Strunk and White
AI-written summary · about
chapters (26)
- 0:00Intro
- 0:29About Nick
- 4:58What does it do
- 5:57Refactoring
- 7:12Practical first step
- 7:41Isolation
- 8:29Unlit
- 8:45Explanation
- 10:06Store ID
- 11:33Order Line Item
- 13:13Refactor
- 14:04Testing
- 15:49Assign Adders
- 16:31Unnecessary Words
- 17:17Consolidating
- 18:31Changing line items
- 18:55Rule 213
- 20:11Class Adder
- 20:40Consolidation
- 22:01Line Items
- 26:56Consolidate To Dropships
- 27:44Label
- 33:23Flog Score
- 34:50Why did it work
- 36:32Breaking every rule
- 38:19Dont repeat yourself
related talks
34mNarrative Reflections: Transmuting Ruby Code into...
37mRefactoring the Technical Interview
46mThe Zen of Programming. A personal journey towards writing beautiful code.
52mThe Zen of Programming
13mRailsConf 2011: Corey Haines
32mRuby for Startups
48mWhat If Shakespeare Wrote Ruby
36mTeach Your Way To Better Code
