Once and only once
This is an old revision of this page, as edited by Ed Poor (talk | contribs) at 20:08, December 14, 2009. It may differ significantly from current revision.
Once and only once It is a rule of thumb in agile software development. A function should be defined in only one place, because it is easier to maintain that way. Even a few lines of code or one complex formula is better wrapped into a method or subroutine.