Code review: how to be a good writer

Hey! My name is Sergey Zagursky, I work at Joom in the infrastructure team. In my practice as a code reviewer, I regularly encounter the fact that the author does not understand that the reviewer is not a magic black box into which you can throw any changes and get feedback on them. The reviewer, like the author, as a human being, has a number of weaknesses. And the author should (if, of course, he is interested in a quality review), help the reviewer as much as possible.





I want to tell you how the author of the code can simplify the work of the reviewer and thereby increase both the quality of the review and the productivity of the reviewer. This article may well be used in your internal corporate documentation as a guide for preparing changes for review. It, in fact, was compiled from such a guide.





Why do we do a code review

. , .





. , . , . . . , « », . , . 





: . — . , , . . , . , , . 





, . , . , , write only . .





, . - ( ). , .





— .





, , , . , . . , , « ». , , . . , . - .





, . . , . , . , . .





- , , . , , , , . , , , , , .





, -, . , , , .





. , , -, , . . .





, , , , . Pull Request .





, , , . , , .





, Pull Request, , . 500 . — 1000 . , 1000 , Pull Request’. 





, , , . , , . 1000+ , , , . . , . , Pull Request’, « ».





, sed’. . . Pull Request’, , .





. , : , , , . . — . , , . 





- , , . . , « » - . . , , , , .





, , . , , . , .





, . ? ! , . , . . . . - , , TODO-, , . , . . 





, 10% , , . , , . , 20%, 50% , .





.





Pull Request’. , . , . «OK» «», . , , . , . — . - , , . , , , . , , . , , , .





Pull Request, , . . rebase .





? , !








All Articles