2 ms·
I don't see such a large overlap between code review and unit testing. Here's an example from one of my code reviews, where I discovered two issues: 1) A relax
by blub 9y ago
I don't see such a large overlap between code review and unit testing. Here's an example from one of my code reviews, where I discovered two issues:
1) A relaxed requirement was agreed to by the PO, but the remote developer wasn't aware of that and wrote code to fulfil the original complex requirement. The implementation was harder to understand and touched more areas of the code, leading to issue number 2.
2) By analysing the interactions between multiple units, I was able to determine that the code as implemented was in fact reading a setting too early, when it was not available, thereby having no effect at all compared to the already existing code. Ironically, this exact concern had prompted the negotiation with the PO which resulted in the relaxed requirement.
Interestingly the error was not caught by unit tests, because it didn't happen in a single unit. It wasn't caught by integration tests, because that particular online component was mocked and it passed code review by two other developers.
- eric_h 9y agoStatic analysis is another tool in the toolbox, and invaluable as well.