4 ms·
I prefer to think about these rules in terms of bets. Adding e.g. a symbolic constant is a bet. You win if during the lifetime of the system, you discover that
by limmeau 14y ago
I prefer to think about these rules in terms of bets.
Adding e.g. a symbolic constant is a bet. You win if during the lifetime of the system, you discover that the constant must be changed, and the gain is the time saved by changing it quickly and with few errors. If you never have to change the constant, you lose the time spent on introducing the constant and the time spent on looking up the constant while reading the code.
Most of the rules here are long change (or whatever the financial people call betting on something), except for KISS.
- tinco 14y agoI agree. Also, extracting to methods and constants is long on on the idea that the code might be harder to understand without meaningful symbols in the future, which is a pretty safe bet usually :)