User Tools

Site Tools


principles:don_t_repeat_yourself

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
principles:don_t_repeat_yourself [2013-05-19 22:09] – external edit 127.0.0.1principles:don_t_repeat_yourself [2015-06-26 15:45] – [Strategies] 207.107.205.22
Line 9: Line 9:
  
   * [[contexts:Object-Oriented Design]]   * [[contexts:Object-Oriented Design]]
 +  * [[contexts:Implementation]]
 ===== 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 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
Line 38: Line 39:
 ===== Origin ===== ===== Origin =====
  
-Andrew Hunt and David Thomas//[[http://pragprog.com/book/tpp/the-pragmatic-programmer|The Pragmatic Programmer: From Journeyman to Master]]// +{{page>resources:The Pragmatic Programmer#reference}}
- +
 ===== Evidence ===== ===== Evidence =====
 /* Comment out what is not applicable and explain the rest: */ /* Comment out what is not applicable and explain the rest: */
Line 81: Line 80:
 ===== Description Status ===== ===== Description Status =====
 /* Choose one of the following and comment out the rest: */ /* Choose one of the following and comment out the rest: */
-[[wiki:Stub]] +/*[[wiki:Stub]]*
-/*[[wiki:Incomplete]]*/+[[wiki:Incomplete]]
 /*[[wiki:Complete]]*/ /*[[wiki:Complete]]*/
  
Line 92: Line 91:
   * [[http://programmer.97things.oreilly.com/wiki/index.php/Don't_Repeat_Yourself|97things: Don't_Repeat_Yourself]]   * [[http://programmer.97things.oreilly.com/wiki/index.php/Don't_Repeat_Yourself|97things: Don't_Repeat_Yourself]]
  
 +===== Discussion =====
 +
 +Discuss this wiki article and the principle on the corresponding [[talk:principles:Don't Repeat Yourself|talk page]].
principles/don_t_repeat_yourself.txt · Last modified: 2021-10-18 21:27 by christian