On 07/20/2016 05:38 PM, Lukas Slebodnik wrote:
On (20/07/16 16:33), Nikolai Kondrashov wrote:
> Hi Jakub,
>
> Thanks for your swift response :)!
>
> On 07/20/2016 04:17 PM, Jakub Hrozek wrote:
>> On Wed, Jul 20, 2016 at 03:53:54PM +0300, Nikolai Kondrashov wrote:
>> better: If a developer works on a module that is confusing to
>> understand, document the code flow.
>
> And here is the pitfall: the author is the one least qualified to judge how
> confusing the code is, because he/she already groks it. I'm not saying it's
> impossible, but bias would be expected.
>
Therefore we have a review.
If reviewer does not understand the code then the code should be changed.
Documentation will not help.
Reviewers are usually developers, and usually *core* developers, who
understand a lot about the context and code already, so they're poor judges as
well.
It's easy to reason about the code which you discussed with your colleagues
for the past week or even a month, talked about on meetings, etc. However,
when you come back to it half a year later, you get a different value of
"confusing". Not speaking about newbies.
+ @see my other response about unit test.
Thanks, Lukas, replied.
Nick