Code Peer Review (PR), rules and advantages
image courtesy/credits: codebeat

Code Peer Review (PR), rules and advantages

Before discussing about PR review and its advantages, let's talk about how usually developers react on review comments

  • Well, those are just Code Beautification remarks
  • Those Static Code Analysis warnings will be caught by MISRA, I fix them later
  • Unit test coverage? will do that later !
  • etc...

Well that's exactly why PR review process exists in first place.

Peer Review (PR)

PR is a process to help developers to find possible bugs(if any) in advance, making sure all developers practice good/clean coding practices, good code documentation

Process is okay, But whose responsibility is PR review before pushing code to master/release branch ?

In My experience, an Architect/Technical lead should a mandatory reviewer for a PR along with one or more other developer/s in the team. At least 2 people should be reviewing a PR

If more people are reviewing PR more suggestions given, this will help everyone including developer and reviewers. Architect may focus on architecture, design and other developers can look into coding guidelines/practices, code optimizations etc...

Good Practices to follow for PR

  • Start with a good commit message (title) , I often observed that commit messages are not self explanatory, confusing
  • Self Check with coding guidelines, code formatting, clean code practices
  • Less/Few files modifications, if more files are modified its difficult to review and context will be lost.
  • No Technical Debt, try to make sure there is no technical debt (avoid)
  • Modify/Add unit tests, update unit test files for the modifications and UT coverage
  • DoD (Definition of Done), as per you project rules


Here are few good reads on PR

https://blog.codebeat.co/how-to-set-up-an-effective-code-review-b9a9f98d1800

https://github.com/thoughtbot/guides/tree/master/code-review

https://www.kenneth-truyers.net/2018/11/01/best-practices-good-pr/




要查看或添加评论,请登录

Ashok Athukuri的更多文章

  • Why I Think Young Software Engineers Lost Their Way

    Why I Think Young Software Engineers Lost Their Way

    Disclaimer: Dear readers, The views, thoughts, and opinions expressed in the text belong solely to the author, and not…

    2 条评论
  • Interviewing Software Developers

    Interviewing Software Developers

    Disclaimer: Dear readers, The views, thoughts, and opinions expressed in the text belong solely to the author, and not…

    3 条评论
  • Object Oriented Design Principles

    Object Oriented Design Principles

    Here are few Design Principles should be followed in Object Oriented programming, These are not specific to any…

    4 条评论

社区洞察

其他会员也浏览了