Start Test Names With “Should”
tl;dr: Reasons include: (1) It removes redundancy, because the function name should already be in the call stack. (2) It is falsifiable i.e. a person reviewing the test can decide to which degree the name agrees with the actual test. (3) Encourages testing one property of the function per test.
featured in #323
Why Naming Stuff Is Hard?
-
Shekhar Gulati
tl;dr: Shekar provides 3 reasons: (1) Developers don’t re-read their code often enough. (2) Lack of business domain understanding. (3) Undervalue good naming. Also, helpful questions to ask: "which business concept is this functionality related to? How can I map business terms to code? What can I learn from API contracts and / or documentation of competitors?"
featured in #313
Please Put Units In Names
-
Ruud van Asseldonk
tl;dr: Ruud compares similar looking lines of code in Python, Java and Haskell, and shows us how they each have very different outcomes and that the the underlying issue is a "code readability trap." Ruud recommends putting units into names or using strong types.
featured in #301