6 ms·
> You write some code and a code reviewer points out that you used an API incorrectly, which you did because the documentation is out of sync with the actual AP
by catalogia 7y ago
> You write some code and a code reviewer points out that you used an API incorrectly, which you did because the documentation is out of sync with the actual API. You will, of course, fix the mistake, but will you "apologize"?
If it was feasible for me to catch the erroneous API behavior through testing, before code review, I would see no reason to not apologize.
Your second scenario is not even remotely ambiguous, of course I'd apologize if I caused other people that much hassle.
- kragen 7y agoIt's always feasible to find a bug by testing. Even in the case where your code relies on some accidentally convenient behavior that might disappear in the next version of the API, you could have reimplemented the API as a stub in your test from only the documented interface. But it's often more efficient to find bugs through code review.