5 reasons why you should review your own PR 🔍
Tags: webdev, learning, github, beginners
Published: 2024-03-24 14:45:14

So, you have finished implementing a new feature or fixing a bug, and you have submitted a pull request (PR) for review. And you are very happy.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emyzsm4xi3gg9aqkb3ct.png)

But your team members are not happy with the quality of your code, and they have pointed out several issues that you overlooked.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5zgbc16lp0xqbxuprd2f.png)

But don't worry. This is not uncommon.

But you could have avoided this situation by reviewing your own code before submitting the PR. In this article, we will explore five reasons why you should review your own PRs before involving others.

- **Early Error Detection**: A lot of times when you are writing code, you might overlook small mistakes or typos that can lead to bugs or issues later on.

  ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sx4o4jx9r8mtr0ihsswh.png)

  Also you don't like to hear this:

  ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfvo99nx1lyeytn14hmm.png)

  By reviewing your own code, you can catch these errors early on and fix them before they become bigger problems. This helps in reducing the number of bugs and issues that need to be fixed during the formal code review process.

- **Accelerate the process**: Addressing potential issues or making improvements during self-review accelerates the overall review process. Your team members won't have to mention minor issues and it will be easy for them to review. You won't have to communicate back and forth with your team members to resolve minor problems.

- **Self-Reflection and Skill Enhancement**: Learning from your mistakes is an essential part of personal growth and skill enhancement. By conducting a self-review of your code, you can reflect on your design decisions and implementation choices. This process helps you identify areas where you can improve and strive for continuous enhancement of your skills.

- **Alignment with Standards**: Ensuring Consistency with Guidelines Reviewing your own code against established coding standards and project guidelines helps maintain consistency within the codebase. By adhering to best practices and conventions, you contribute to overall code quality and readability.

- **Personal Accountability and Ownership**: Taking Responsibility for Code Quality Engaging in self-review demonstrates a sense of ownership and accountability for your contributions. By taking the initiative to ensure code quality before involving others, you contribute to a culture of excellence and collaboration within your development team.

I hope now you understand the importance of reviewing your own PRs before involving others. It not only helps in improving the quality of your code but also accelerates the review process and enhances your skills. So, next time you submit a PR, make sure to review it yourself first.

If the blog is helpful, please like and share it with your team.
I also run a Youtube channel where I teach full-stack development. You can check it out [here](https://www.youtube.com/channel/UCBaGowNYTUsm3IDaHbLRMYw/).
Please consider subscribing if you find the content useful.

Happy Coding!

Videos you can watch next:

{% youtube hrlmbRo1iOQ %}
{% youtube PoTUX9_3LaQ %}
{% youtube tFp4UhfDoQU %}
{% youtube hHCabCNLmPk %}