numbered for ease of reference, not for priority
- code is debt, and bad code is an unhedged call option (a)
- our users dont care about the code
- every line of code has costs (your time, readability, maintainability, complexity)
- its like owning a house with lots of rooms. its nice when your friends come over once a month, but you pay rent every day
- dont add features prematurely
-
be consistent
-
no magic! be predictable
-
no magic numbers/strings — use constants instead
-
a good repro is 90% of a bugfix
-
code is written once, but is read many times
-
ship early, ship often
-
first code, then ship, then measure, then optimize
-
remember the 80/20 rule, and the 90/90 rule
-
design layers of abstraction with deep modules (a)
-
prefer encapsulated complexity (a)
-
comments should describe what’s not obvious (a). i used to hate comments but this book (a) changed my mind.
-
Postel’s law is wrong — be strict both ways
-
budget your innovation tokens (a)
- first you don’t know the rules, then you learn the rules, then you break the rules
See also: programming principles, hacker laws (a), Dieter Rams’ principles (a), the Zen of python (a), Urbit precepts (a)
old version here