Once and only once

From Conservapedia
This is an old revision of this page, as edited by WesleyS (talk | contribs) at 22:29, November 22, 2008. It may differ significantly from current revision.
Jump to navigation Jump to search

Once and only once is a rule of thumb in 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.