Rule of three (computer programming)
id:
rule-of-three-computer-programming-304-8575659
title:
Rule of three (computer programming)
text:
Rule of three is a code refactoring rule of thumb to decide when similar pieces of code should be refactored to avoid duplication. It states that two instances of similar code do not require refactoring, but when similar code is used three times, it should be extracted into a new procedure. The rule was popularised by Martin Fowler in Refactoring and attributed to Don Roberts. Duplication is considered a bad practice in programming because it makes the code harder to maintain. When the rule enco
brand slug:
wiki
category slug:
encyclopedia
description:
Refactoring rule of thumb
original url:
https://en.wikipedia.org/wiki/Rule_of_three_(computer_programming)
date created:
date modified:
2023-09-03T21:33:29Z
main entity:
{"identifier":"Q7378984","url":"https://www.wikidata.org/entity/Q7378984"}
image:
fields total:
13
integrity:
14