From 441aba3411e1bdf90fa7b42b1675b421484f43e8 Mon Sep 17 00:00:00 2001 From: Asiel Leal Celdeiro <15990580+lealceldeiro@users.noreply.github.com> Date: Thu, 7 Sep 2023 17:18:10 +0300 Subject: [PATCH] Add notes from "Clean Craftsmanship" --- CleanCraftsmanship/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CleanCraftsmanship/README.md b/CleanCraftsmanship/README.md index a30fa6a..fa165c1 100644 --- a/CleanCraftsmanship/README.md +++ b/CleanCraftsmanship/README.md @@ -80,6 +80,21 @@ Rule 5: Generalize where possible. > As the tests get more specific, the code gets more generic. +**Stairstep tests** + +Some tests are written just to force us to create classes or functions or other structures that we’re going to need. +Sometimes these tests are so simple that they assert nothing. Other times they assert something very naive. Often +these tests are superseded by more comprehensive tests later and can be safely deleted. We call these kinds of tests +_stairstep tests_ because they are like stairs that allow us to incrementally increase the complexity to the +appropriate level. + +**Misplaced responsibility** + +A design flaw in which the function that claims to perform a computation does not actually perform the computation. +The computation is performed elsewhere. + +Rule 6: When the code feels wrong, fix the design before proceeding. + ## Part I: Standards ## Part I: Ethics