principles:don_t_repeat_yourself
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
principles:don_t_repeat_yourself [2013-09-06 13:56] – [Strategies] common bas class christian | principles:don_t_repeat_yourself [2021-09-02 17:48] – old revision restored (2021-05-11 19:02) 65.21.179.175 | ||
---|---|---|---|
Line 9: | Line 9: | ||
* [[contexts: | * [[contexts: | ||
- | * [[contexts: | + | |
===== Principle Statement ===== | ===== Principle Statement ===== | ||
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 bas 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 | ||
Line 91: | Line 90: | ||
* [[http:// | * [[http:// | ||
- | ===== Discussion ===== | ||
- | |||
- | Discuss this wiki article and the principle on the corresponding [[talk: |
principles/don_t_repeat_yourself.txt · Last modified: 2021-10-18 21:27 by christian