News for hackers. Stuff that matters.
Re:Effective Code Reviews – A Primer by dragonwriter on Monday March 11, 2019 @12:17PM (#19360095)
> Because it signals to me that the only one who understands this piece of business logic that we have applied to our code base is a test, which is a piece of code.

That...makes no sense. Tests do not understand rules, nor do they (or are they intended to) fully encapsulate them. They are intended to capture specific instances of application of the rules that have been verified with the person(s) defining expectations—the customer for acceptance tests or unit tests of key business functions, but possibly the team itself when the test is a unit test of an implementation detail.

The test isn't the only one that understands the ruler, it's the output of a process that validates that the test writers (who are humans on the team) understand the rule, and also concrete examples which aid anyone who comes.later in understanding the rule.

To me, not having defined test scenarios (whether automated and thus part of the code base or not) is a signal that the team probably doesn't (and almost definitely doesn't if there has been turnover so that the implementors of the functionality are no longer on the team) fully understand the intended function of the code.

There are no comments on this comment yet.