3 ms·
> And tests that document how the code is supposed to work... For me the most important word here is 'supposed'. All the time I read documentation describe ho
by aequitas 10y ago
> And tests that document how the code is supposed to work...
For me the most important word here is 'supposed'.
All the time I read documentation describe how code works step by step (what each 'if' does, but spelled out more verbose). And test that only test that a function does by mocking out everything else.
But I don't care reading what code does. I can see that by looking at the code. I want to know what the developer intended/expected the code to do, so I can validate it against what the code actually does.
Most of the time assumptions are made with those expectations. And with those expectations you have a much better idea why a trivial refactor of a piece of logic could unearth a massive 'undocumented feature'.