principles:don_t_repeat_yourself
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
principles:don_t_repeat_yourself [2021-02-01 21:06] – old revision restored (2020-12-10 03:58) 95.216.157.202 | principles:don_t_repeat_yourself [2021-10-18 21:27] – old revision restored (2015-06-26 15:45) christian | ||
---|---|---|---|
Line 28: | Line 28: | ||
* Add a new invokable module (a function, a method, a class, etc.) instead of duplicating code | * Add a new invokable module (a function, a method, a class, etc.) instead of duplicating code | ||
+ | * Factor out a common base class | ||
* Use code generation when information has to be represented in multiple forms | * Use code generation when information has to be represented in multiple forms | ||
* Use polymorphism to avoid repeatedly enumerating a set of possible solutions in if or switch statements | * Use polymorphism to avoid repeatedly enumerating a set of possible solutions in if or switch statements |
principles/don_t_repeat_yourself.txt · Last modified: 2021-10-18 21:27 by christian