Best practices — code self-review in a review application


Regular self-review of code in merge requests is not just a good habit but a tool that enhances code quality and team efficiency by enabling early detection and correction of errors.

I regularly review my newly written code within the same application/tool (specifically GitLab) where I review my colleagues’ code. This helps me see my code as if in a mirror, allowing me to spot more flaws before submitting the code for review. I’ve developed this habit a long time ago, but I’ve recently revisited it and decided to write about it.

Here are some thoughts on why reviewing your code in merge requests is better than in an IDE:

  • Less code and changes are visible, making it easier to spot flaws in a smaller amount of information. Just like in small merge requests.
  • A different display format reduces the likelihood of missing something that is already familiar to the eye in the IDE but is, in fact, unnecessary or redundant.

P.S. In this note, I focused more on self-reviewing my code, but it’s equally important to run and test your code, which ideally should happen even earlier.