GeezerVison is showing robbmalexander.github.io — robbmalexander.github.io
Object-Oriented Design Principles
“DRY”
-
“Don’t Repeat Yourself”: A development philosophy where repeated code is avoided.
-
Described by Andy Hunt and Dave Thomas as “Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.”
-
Advantages include:
-
Easier refactoring, as key code does not affect unrelated code.
-
More uniformity, as code blocks refer to required logic rather than partially recreating.
Rule of Three
-
Rule of Three refers to the guideline of waiting for the third use of a potentially abstracted code element before abstracting.
-
Immediate abstraction is avoided, as core requirements and definitions may not be feasibly recognized with few instances.
YAGNI
-
“You Aren’t Gonna Need It”: Design principle that discourages adding more functionality than currently required.
-
Defined as part of extreme programming philosophy alongside frequent testing and refactoring practices.
MVP