Once and only once

From CSSEMediaWiki
Revision as of 20:50, 7 October 2008 by Johannes Pagwiwoko (Talk | contribs)
Jump to: navigation, search

The idea here is that no code should be repeated if that code is being used to perform the same operation. This refers to Duplicate code smell

More specifically no behaviour should be duplicated. Any place where this is found to be happening Extract Method should be applied.

There is a nice quote in DRY that sums it up much better than i can.

See also

Personal tools