Best Practices For Writing Pull Request 🚀

Mohamed Dhaoui
8 min readJul 19, 2023

When people talk about code reviews, they focus on the reviewer. But the developer who writes the code is just as important to the review as the person who reads it. There’s scarcely any guidance on preparing your code for review, so authors often screw up this process out of sheer ignorance.

I have had amazing mentors who held me to the highest code quality standards, which was, to be honest, painful at first — the sinking feeling of not getting it right even after the 4th code review. Having a senior developer or peer invest in your growth is something immensely valuable — so we don’t want to take it for granted and make it worth their time.

This article describes best practices for participating in a code review when you’re the author and we will list a few advices to better write a pull request. Let’s start !

Why improve pull request ?

Improving code review technique helps your reviewer, your team, and, most importantly, you to :

  • Learn faster: If you prepare your changelist properly, it directs your reviewer’s attention to areas that support your growth rather than boring style violations. When you demonstrate an appreciation for constructive criticism, your reviewer provides better feedback .
  • Make others better: Your code…

--

--

Mohamed Dhaoui

Lead Data engineer and Data science practitioner ! Interested in data science and software development topics. GCP 5x certified and Go fan.