-
code is debt (and bad code is a unhedged call option)
- 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 unless you're sure it is necessary
- dont optimize prematurely
-
DRY DRY DRY
-
be consistent
-
be predictable (aka no magic)
-
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
-
first you don't know the rules, then you learn the rules, then you break the rules
See also: https://en.wikipedia.org/wiki/Category:Programming_principles