<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Reviewpad</title>
    <description>The latest articles on DEV Community by Reviewpad (@codereviewpad).</description>
    <link>https://dev.to/codereviewpad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F630834%2Fa296ced1-7a11-47f2-b2ef-3c6a5c97f562.jpg</url>
      <title>DEV Community: Reviewpad</title>
      <link>https://dev.to/codereviewpad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codereviewpad"/>
    <language>en</language>
    <item>
      <title>How Reviewpad is Putting the Reviewer Assignment Problem to Rest</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Fri, 24 Feb 2023 10:52:20 +0000</pubDate>
      <link>https://dev.to/reviewpad/how-reviewpad-is-putting-the-reviewer-assignment-problem-to-rest-28bb</link>
      <guid>https://dev.to/reviewpad/how-reviewpad-is-putting-the-reviewer-assignment-problem-to-rest-28bb</guid>
      <description>&lt;p&gt;&lt;em&gt;Streamline your code reviews with Reviewpad. Our advanced algorithm suggests the best reviewers for your pull requests, making your workflow faster and more efficient.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Are you tired of manually assigning reviewers to pull requests on GitHub? Do you find it time-consuming and difficult to ensure that each pull request is assigned to the most appropriate reviewer? If so, Reviewpad has the solution for you. With its new Code Reviewer Assignment feature, Reviewpad can help you streamline your code review process and ensure that each pull request is assigned to the right reviewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Manual PR Reviewer Assignments
&lt;/h2&gt;

&lt;p&gt;For teams working on GitHub, the manual assignment of reviewers to pull requests can be a time-consuming and error-prone process. As development teams grow in size, the need for an automated review assignment mechanism becomes increasingly critical. Without such a mechanism, developers must spend valuable time manually selecting the most relevant and available reviewers for each pull request. This process can take critical time away from development tasks, slow down the review process, and lead to bias in the selection of reviewers.&lt;/p&gt;

&lt;p&gt;In addition, it can be challenging to ensure that reviewers have the necessary expertise to review the code in the pull request. This can result in longer review cycles, errors in the code, and delays in the development process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reviewpad's Innovative Solution for Effortless Reviews
&lt;/h2&gt;

&lt;p&gt;Reviewpad's Code Author Reviewer Assignment Mechanism aims to solve these problems by automating the assignment of reviewers to pull requests. Reviewpad analyzes the past contribution history of code authors and uses that data to suggest the most appropriate reviewers for each pull request.&lt;/p&gt;

&lt;p&gt;In this process, &lt;strong&gt;Reviewpad considers two factors when assigning a reviewer&lt;/strong&gt;. Those are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Relevancy&lt;/strong&gt; and&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Availability&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;of the reviewers.&lt;/p&gt;

&lt;p&gt;The relevancy evaluation is based on the authorship of the code. It analyzes how many lines of code have been written by possible reviewers in the latest version of the impacted source files.&lt;/p&gt;

&lt;p&gt;The availability evaluation is based on the number of open reviews per reviewer, which ensures that reviewers with too many open reviews are considered unavailable.&lt;/p&gt;

&lt;p&gt;If there are no reviewers available or identified by the algorithm, a random user within the organization will be assigned as the reviewer for the PR. This fallback mechanism ensures that the pull request does not remain unreviewed and that the code changes are still scrutinized by someone in the organization.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Crucial Role of assignCodeAuthorReviewers Function
&lt;/h2&gt;

&lt;p&gt;Reviewpad's Code Author Reviewer Assignment Mechanism is powered by the &lt;code&gt;assignCodeAuthorReviewers&lt;/code&gt; function, a built-in function that takes several parameters to determine the most relevant and available reviewers for each pull request.&lt;/p&gt;

&lt;p&gt;This function is critical as it allows teams to customize the review assignment process to fit their specific needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding the Parameters of assignCodeAuthorReviewers
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;assignCodeAuthorReviewers()&lt;/code&gt; function takes three parameters.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;Total&lt;/code&gt; (Optional): This parameter specifies the total number of reviewers to assign to a pull request. The default value is one, but you can change it to assign more than one reviewer to a pull request.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Excluded Reviewers&lt;/code&gt; (Optional): This parameter is a list of reviewers to exclude from being assigned to a pull request. You can use this parameter to exclude specific reviewers who might not be appropriate for the review.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Max Reviews&lt;/code&gt; (Optional): This parameter specifies the maximum number of open reviews per reviewer. If a reviewer has more open reviews than this value, they will be considered unavailable and will not be assigned to the pull request. If we don't specify a value to Max Reviews, the algorithm ignores that parameter and considers reviewers regardless of the number of open reviews they have.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Examples of assignCodeAuthorReviewers at Work
&lt;/h3&gt;

&lt;p&gt;Let's look at an example of how you can use the &lt;code&gt;assignCodeAuthorReviewers&lt;/code&gt; function in Reviewpad.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example 1
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;$assignCodeAuthorReviewers()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example uses the default parameters for the &lt;code&gt;assignCodeAuthorReviewers&lt;/code&gt; function. It will assign one reviewer to the pull request based on code authorship and availability.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example 2
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;$assignCodeAuthorReviewers(3)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example assigns three reviewers to the pull request based on code authorship and availability.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example 3
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;$assignCodeAuthorReviewers(2, ["user1", "user2"])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example assigns two reviewers to the pull request, but it excludes &lt;code&gt;"user1"&lt;/code&gt; and &lt;code&gt;"user2"&lt;/code&gt; from being assigned as reviewers.&lt;/p&gt;

&lt;h4&gt;
  
  
  Example 4
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="s"&gt;$assignCodeAuthorReviewers(1, [], 2)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example assigns one reviewer to the pull request, but it limits the number of open reviews per reviewer to two.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Step-by-Step Guide to Using Reviewpad's Code Author Reviewer Assignment Feature
&lt;/h2&gt;

&lt;p&gt;Now that you have a better understanding of the &lt;code&gt;assignCodeAuthorReviewers&lt;/code&gt; function, let's take a look at the steps of the workflow of the Reviewpad's Code Reviewer Assignment Mechanism.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;: Sign up for Reviewpad and integrate it with your GitHub account. (&lt;a href="https://docs.reviewpad.com/getting-started/installation" rel="noopener noreferrer"&gt;Installation Guide ↗︎&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;: In your repository, create a new workflow with the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;workflows&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Code Author Reviewer Assignment&lt;/span&gt;
    &lt;span class="na"&gt;if&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;!$isDraft()'&lt;/span&gt;
    &lt;span class="na"&gt;then&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;$assignCodeAuthorReviewers()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;: Customize the &lt;code&gt;assignCodeAuthorReviewers&lt;/code&gt; function to fit your specific needs. You can use the parameters and variables mentioned earlier in this article to customize the review assignment process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4&lt;/strong&gt;: Create a draft pull request in your repository.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5&lt;/strong&gt;: When the pull request is ready for review, move it to the &lt;code&gt;Ready for Review&lt;/code&gt; status.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6&lt;/strong&gt;: Reviewpad's Code Author Reviewer Assignment Mechanism will analyze the relevancy and the availability of the reviewers and suggest the most appropriate reviewers for the pull request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Discovering the Advanced Functionality of Reviewpad
&lt;/h2&gt;

&lt;p&gt;It's important to note that Reviewpad's Code Author Reviewer Assignment Mechanism is a powerful tool that can help you streamline your code review process. However, it's not a replacement for good code review practices. It's still important to ensure that reviewers have the necessary expertise to review the code in the pull request and to maintain a clear and organized review process.&lt;/p&gt;

&lt;p&gt;In addition, Reviewpad provides other powerful features such as &lt;a href="https://docs.reviewpad.com/use-cases/automated-labelling" rel="noopener noreferrer"&gt;automated pull request labeling&lt;/a&gt;, &lt;a href="https://docs.reviewpad.com/use-cases/auto-merge" rel="noopener noreferrer"&gt;automatic pull request merge&lt;/a&gt;, and &lt;a href="https://docs.reviewpad.com/use-cases/enforce-branch-conventions" rel="noopener noreferrer"&gt;enforcing branch conventions&lt;/a&gt;. By using Reviewpad's Code Reviewer Assignment feature in combination with these other features, you can create a robust and efficient code review process that saves time and reduces errors.&lt;/p&gt;

</description>
      <category>critique</category>
      <category>uidesign</category>
      <category>ui</category>
      <category>productdesign</category>
    </item>
    <item>
      <title>Fluid Pull Requests</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Thu, 05 Jan 2023 17:32:00 +0000</pubDate>
      <link>https://dev.to/reviewpad/fluid-pull-requests-36a4</link>
      <guid>https://dev.to/reviewpad/fluid-pull-requests-36a4</guid>
      <description>&lt;p&gt;By &lt;a href="https://www.linkedin.com/in/freddymallet/"&gt;Freddy Mallet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pull Requests have become the backbone of the DevOps movement: the faster, the safer, the better. But the code review step, this systematic and synchronized communication task between humans, inherited from ancient times, slows down the overall development lifecycle for an illusion of safety. It’s time to introduce the Fluid Pull Requests paradigm.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Back in 2008, GitHub introduced the concept of Pull Request and, by doing so, significantly eased the contribution to &lt;strong&gt;open-source&lt;/strong&gt; projects. For the first time, it had never been so simple for two strangers to collaborate on the same code base. At that time, the only purpose of a Pull Request was to provide a safe way to suggest code changes and discuss them in a collaborative interface. &lt;/p&gt;

&lt;p&gt;More than a decade later, &lt;strong&gt;170 Million&lt;/strong&gt; [1] Pull Requests are created each year on &lt;strong&gt;private projects&lt;/strong&gt; and 30 Million on public projects. So the concept has been embraced by the overall software industry and has become a de facto standard. During the same period, the &lt;strong&gt;DevOps&lt;/strong&gt; movement took off, and nowadays, Pull Requests are the &lt;strong&gt;backbone&lt;/strong&gt; of any automated SDLC (Software Delivery LifeCycle). On each Pull Request, many highly valuable tasks are fully automated: building, testing, static analysis to spot bugs, deployment on staging environments, etc. All this DevOps movement could be summarized in one mantra: &lt;strong&gt;“The faster, the safer, the better”&lt;/strong&gt;. Starting in 2015, the DORA (DevOps Research and Assessment) [2] team has identified four key metrics that indicate the performance of a software development team. Three of those four metrics illustrate this mantra: Deployment Frequency, Lead Time for Changes, and Time to Restore Service.&lt;/p&gt;

&lt;p&gt;So today, the lifecycle of a Pull Request should be a matter of a few hours, but it is always a few days or even a few weeks. Developers managed to automate many things, but we still have in the middle of each PR lifecycle a systematic and &lt;strong&gt;synchronized communication task between humans&lt;/strong&gt;: the code review step. This inflexible code review step, inherited from 2008, slows down everything and is the main bottleneck.&lt;/p&gt;

&lt;p&gt;Why do we keep on accepting to pay such a price? Why do we keep on pushing the stop-the-line button on each PR? Because no software, no static analyzer, nor AI will ever be able to formally prove that a code change is safe and maintainable. Our tooling will keep evolving to spot more patterns but proving the absence of problems is an unsolvable challenge. So we rely on humans to do so. But humans are even less efficient at spotting problems, tracking a flow of execution, or keeping more than 10 variables in our working memory. This is especially true when each PR has to be reviewed. Developers are progressively desensitized, and LGTM symptoms arise. We’re just accepting to pay the price for an &lt;strong&gt;illusion of safety&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So what do we suggest doing? As we said, Pull Requests are nowadays the backbone of the DevOps infrastructure, so we can’t work without them. Moreover, today there is no code analyzer to prove the absence of bugs or vulnerabilities, or critical design flaws, so we still need developers to review some code changes. The only problem is that this code review is done systematically, regardless of the context, and always involves synchronous communication between humans. Here is where the Fluid Pull Requests paradigm knocks on the door.&lt;/p&gt;

&lt;p&gt;At the core of this Fluid Pull Requests paradigm is the capacity to adjust the code review process based on the &lt;strong&gt;sensitivity of the code change&lt;/strong&gt;, either to &lt;strong&gt;lighten or strengthen it&lt;/strong&gt;. This sensitivity evaluation must take into account several different elements. We can mention, for instance, the seniority of the developer on a code base, the complexity of the code change, or the history of changes. Based on this sensitivity evaluation, you can specify and automate &lt;strong&gt;several code review processes&lt;/strong&gt; to automatically approve and merge, do an asynchronous review, assign several reviewers, and spot the most sensitive parts of the code changes. For instance, if a database migration script is added, it could be relevant to involve the database team, but only to approve this piece of code.&lt;/p&gt;

&lt;p&gt;I guess you got it: Fluid Pull Requests is an extension of the Pull Request concept, to increase both the throughput and safety of delivery. We still rely on human review, but only when it’s the most relevant, and in a very driven way. &lt;strong&gt;Instead of reviewing everything every time, we only have the most critical changes reviewed by the most impactful reviewers&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;p&gt;[1] Octoverse Report 2021: &lt;a href="https://octoverse.github.com/writing-code-faster"&gt;https://octoverse.github.com/writing-code-faster&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;[2] DevOps Research and Assessment: &lt;a href="https://www.devops-research.com/research.html"&gt;https://www.devops-research.com/research.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>culture</category>
      <category>practices</category>
    </item>
    <item>
      <title>How to improve code review culture (for managers and CTOs)</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Mon, 27 Sep 2021 16:03:55 +0000</pubDate>
      <link>https://dev.to/codereviewpad/how-to-improve-code-review-culture-for-managers-and-ctos-3bbb</link>
      <guid>https://dev.to/codereviewpad/how-to-improve-code-review-culture-for-managers-and-ctos-3bbb</guid>
      <description>&lt;p&gt;&lt;em&gt;We have discussed best practices and principles. Now is time to get to the task and start arguing about practicalities. If you are leading a team, and you need your code reviews to be better, more effective, and a more perfect tool for team-building, what can you &lt;strong&gt;actually do&lt;/strong&gt;?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We have the answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define what the truth is
&lt;/h2&gt;

&lt;p&gt;Does that title sound excessively ambitious? Is Reviewpad finally becoming political? No to both!&lt;/p&gt;

&lt;p&gt;What we mean is that you need to produce &lt;strong&gt;and maintain&lt;/strong&gt; a well-documented source of truth to keep every member of your team on the same page. Code reviews are essentially about co-ownership of the final product, and at their core they are a collaborative endeavor. If all members of the team (especially the more opinionated) don't agree on some basic principles, this can undermine the whole deal.&lt;/p&gt;

&lt;p&gt;Here's what this document should contain (at least):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A clear-cut definition of the team's priorities&lt;/strong&gt;. What do you do in special/urgent cases? Can you skip tests when the team is in a hurry or not? Should code reviews supersede other work when the deadlines are getting close? What constitutes "a hurry"? What qualifies as "getting close"? Etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish a pull request description template&lt;/strong&gt;. And make sure people use it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Establish a code review checklist&lt;/strong&gt;. And make sure more experienced developers, who probably won't need a checklist, don't fail to keep to its standards.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Leverage automation
&lt;/h2&gt;

&lt;p&gt;Code reviews are an engaging, interesting, personal experience. They are not an afternoon spent nitpicking for teeny bugs that a linter can easily find.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reviewpad.com/blog/automation-in-code-reviews-dos-and-donts/"&gt;We have written an article&lt;/a&gt; where we detail where and when automation is a must-have, and also some of our thoughts about when you can't rely on it. We recommend going through it, but the bottom line is simple: figure out what kinds of work a machine can do better than you, and let it. Linters, test coverage tools, etc. are great tools that you should use to your advantage.&lt;/p&gt;

&lt;h2&gt;
  
  
  In regards to pull requests: tell your team to favour what's easy
&lt;/h2&gt;

&lt;p&gt;We tend to focus much of our attention on how to improve the review itself. We do, however, know very well that the quality of the review is heavily reliant on how sensible requests are.&lt;/p&gt;

&lt;p&gt;Speak to your team, and create clear guidelines: make life easier for the reviewer.&lt;/p&gt;

&lt;p&gt;Encourage pull requests of &lt;strong&gt;manageable size&lt;/strong&gt; and &lt;strong&gt;clear context&lt;/strong&gt; , both of which can be defined in the document mentioned earlier.&lt;/p&gt;

&lt;h2&gt;
  
  
  Everyone reviews code
&lt;/h2&gt;

&lt;p&gt;This one is self-explanatory, but it must be said: everyone needs to be doing reviews. There's no advantage in overworking your most senior teammates (which happens too frequently), and there's a lot to lose in terms of learning and improvement from keeping juniors from doing them.&lt;/p&gt;

&lt;p&gt;Be sensible in how you assign code reviews, &lt;strong&gt;of course&lt;/strong&gt; , but share the wealth!&lt;/p&gt;

&lt;h2&gt;
  
  
  Ban LGTM
&lt;/h2&gt;

&lt;p&gt;Avoid rubber stamp reviews as much as possible. Code reviews are a process of &lt;strong&gt;continuous improvement&lt;/strong&gt; , and every bit of work you do should follow in this spirit. If there are in fact no mistakes, and the code is absolutely pristine, share this achievement with the rest of the team..&lt;/p&gt;

&lt;h2&gt;
  
  
  Power to the people
&lt;/h2&gt;

&lt;p&gt;Team spirit is fundamental. Co-ownership is key. One of the reasons why code reviews sometimes fail, and create rifts among teams, is that people are working towards their own views and goals about the sprint/product instead of agreeing on &lt;strong&gt;collective goals&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let your team control the review process. Allow the establishment of goals to be a collective process, and have everyone commit to it. This will naturally lead to what should be encouraged (positive/constructive/actionable) comments, instead of what should be discouraged (negative/damaging/empty) ones.&lt;/p&gt;

&lt;p&gt;To empower your team is to make them responsible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get Reviewpad
&lt;/h2&gt;

&lt;p&gt;We may be a little biased, but the fact is we are using Reviewpad to do our reviews while we build it. We have been doing it from really early on.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reviewpad.com/get-started/"&gt;Try it out yourself&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>culture</category>
    </item>
    <item>
      <title>Managing expectations in code reviews</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Mon, 06 Sep 2021 10:55:57 +0000</pubDate>
      <link>https://dev.to/reviewpad/managing-expectations-in-code-reviews-5ehp</link>
      <guid>https://dev.to/reviewpad/managing-expectations-in-code-reviews-5ehp</guid>
      <description>&lt;p&gt;&lt;em&gt;Best practices are&lt;/em&gt; &lt;a href="https://reviewpad.com/blog/six-best-practices-to-improve-your-code-reviews/"&gt;&lt;em&gt;one thing&lt;/em&gt;&lt;/a&gt; &lt;em&gt;that surely matters. Improving standards is always good. Who could argue against that? But what do you expect to get from code reviews? How do you expect the experience to go? Managing these expectations, especially when it's often so hard to measure results, can be daunting. Here are some thoughts on how to manage this.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Embrace the qualitative
&lt;/h2&gt;

&lt;p&gt;Code reviews are about &lt;strong&gt;continuous improvement&lt;/strong&gt;. That means it won't always be easy (sometimes it will be impossible) to quantify how much you've improved. Any metric you can come up with to measure &lt;strong&gt;return on investment (ROI)&lt;/strong&gt; is likely flawed, and will probably tell you as much about the quality of your other processes as the reviews themselves.&lt;/p&gt;

&lt;p&gt;We do know some things, such as the skyrocketing costs of &lt;a href="https://www.typemock.com/software-bugs-infographic"&gt;catching bugs later&lt;/a&gt;, but the value of code reviews far exceeds that of simple debugging. The kinds of improvements code reviews achieve can sometimes only be felt years later, when an entirely different team is charged with updating the codebase and finding easily readable code.&lt;/p&gt;

&lt;p&gt;Some things you just can't measure. We need to accept this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expect people will be reading you
&lt;/h2&gt;

&lt;p&gt;This goes for several stages of the process. Sometimes developers will tend to forget that all their notes and comments will be read by a person that is also a teammate. A person with feelings, issues, and varying degrees of seniority and skill. Sometimes developers will tend to forget that their code will have to be read and understood by people over time.&lt;/p&gt;

&lt;p&gt;This means you must be mindful of what you're telling others, but also what you're asking of them. A couple of examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Massive pull requests will probably lead to shorter and more superficial comments. Is this what you want?&lt;/li&gt;
&lt;li&gt;Reviewers will need to place themselves. Have you provided the context that will allow them to fully understand what you're going for?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Always keep in mind: if you're typing it, expect someone will read it.&lt;/p&gt;

&lt;h2&gt;
  
  
  People make mistakes
&lt;/h2&gt;

&lt;p&gt;One of the hardest things to manage regarding code reviews is the frustration that comes from reviewing bad code. Lots of mistakes, bad choices in terms of style, and unreadable code.&lt;/p&gt;

&lt;p&gt;This, however, is almost inevitable. You're going to have to deal with bad code sometimes.&lt;/p&gt;

&lt;p&gt;It's important to not let that frustration boil over into aggressive or hurtful comments. Communication must always be geared towards improvement, both of the codebase and the team. Code reviews are a great way for everyone to learn from mistakes, but that depends on the kindness of the reviewers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be mindful of people's schedules
&lt;/h2&gt;

&lt;p&gt;Full-time code reviewers are rare. And even if they weren't, they would have a schedule anyway. Sometimes we expect our colleagues to pick up whatever is our priority as if it is also theirs, but that's not how it works.&lt;/p&gt;

&lt;p&gt;Code reviews are often treated by teams like an afterthought, something that can be done by anyone "as soon as they have a minute". This is never the case, and reviewing is a task that should be treated with the same consideration as any other. Assign your reviews in due time, and expect people will be busy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices matter
&lt;/h2&gt;

&lt;p&gt;Your expectations of code reviews should always take into account how they are being done. Are you posting the pull requests to a public channel and expecting anyone to pick them up? Then you shouldn't be surprised no one does, or if it takes them a long time to do so. Are you bundling up all the reviews and doing them at the end of the week? Then you should expect a lot of confusion. Are you reviewing for hours on end? Expect mistakes.&lt;/p&gt;

&lt;p&gt;The full benefit of code reviews heavily depends on them being integrated into a continuous code-review-centric operational model, and the more your practices reflect this, the more you can expect from them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code reviews are about your team
&lt;/h2&gt;

&lt;p&gt;An underappreciated aspect of code reviews is how they are a collective endeavor. We believe in them as a form of fomenting co-ownership of the codebase, and always tell reviewers to not think of what they're looking over as someone else's work. It belongs to the whole team.&lt;/p&gt;

&lt;p&gt;Code reviews, when done right, will expand the whole team's knowledge of the product, and help everyone learn with both the mistakes and the skills of everyone else.&lt;/p&gt;

&lt;p&gt;This is probably the most important thing you can expect from code reviews, if you make them work in that way: you can expect them to be not only a guarantor of your code's quality, but also a true engine of team building.&lt;/p&gt;




&lt;p&gt;What are your expectations for code reviews? Did we miss something important? Drop us a line on Twitter (&lt;a href="https://twitter.com/codereviewpad"&gt;@codereviewpad&lt;/a&gt;) and let us know!&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A code review checklist from Reviewpad</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Fri, 20 Aug 2021 09:25:02 +0000</pubDate>
      <link>https://dev.to/reviewpad/a-code-review-checklist-from-reviewpad-1887</link>
      <guid>https://dev.to/reviewpad/a-code-review-checklist-from-reviewpad-1887</guid>
      <description>&lt;p&gt;&lt;em&gt;Not everyone will need a checklist for code reviews, and not all code reviews will fit into your checklist. We accept that, and &lt;a href="https://reviewpad.com/blog/six-more-best-practices-to-improve-your-code-review/"&gt;we have written about how some more senior developers sometimes even think they get in their way&lt;/a&gt;. They are a very good idea, however, if you haven't yet reached a comfort zone with your reviews.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A good checklist will keep you &lt;strong&gt;consistent&lt;/strong&gt;. It will also prevent mistakes and omissions.&lt;/p&gt;

&lt;p&gt;Here's our humble proposal, just to get you started:&lt;/p&gt;

&lt;h3&gt;
  
  
  Are all requirements met? 📋
&lt;/h3&gt;

&lt;p&gt;Requirements are the basis for all development. Regardless of what the project you're working on is, and its scope, you will have a series of basic (and not so basic) requirements that the code must accomplish.&lt;/p&gt;

&lt;p&gt;Check them, one by one.&lt;/p&gt;

&lt;p&gt;Find the relevant code.&lt;/p&gt;

&lt;p&gt;Review it.&lt;/p&gt;

&lt;p&gt;Job done.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are code conventions being followed? 🤝
&lt;/h3&gt;

&lt;p&gt;Code conventions aren't bylaws, and they will change from project to project, and from language to language. They must be kept consistent throughout, otherwise, you can give rise to a whole ocean of troubles.&lt;/p&gt;

&lt;p&gt;Whatever's been established for the project and language you're working with, it's your job while doing a code review, that everything is up to snuff. That ranges from things as trite as indentation to things as meaningful as comments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consistency&lt;/strong&gt; is the key word.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are magic values/scenarios accounted for? 🦄
&lt;/h3&gt;

&lt;p&gt;What would you think if you saw the number 259200000 in the middle of a particularly important piece of code about dates (i.e. days and months, not romantic liaisons), with no explanation?&lt;/p&gt;

&lt;p&gt;And that number is absolutely key for the way the function works?&lt;/p&gt;

&lt;p&gt;You wouldn't be happy, would you? Well, that's the number of milliseconds in three days, and some people might immediately get it and others might not. Anything that is key for the inner workings of your code that isn't explained, is said to just "magically" work.&lt;/p&gt;

&lt;p&gt;There's no magic in development. Make sure everything is clear. Which leads us to:&lt;/p&gt;

&lt;h3&gt;
  
  
  Is the code easy to read? 🤓
&lt;/h3&gt;

&lt;p&gt;Remember: you don't know who is going to be doing maintenance on the code base your team is working on. It may be you, or not. And even if it is you, it's going to be the &lt;strong&gt;future you&lt;/strong&gt;. We can promise you right now that you will not remember why that wonderfully clever function you've just written down works.&lt;/p&gt;

&lt;p&gt;Everything needs to be readable. As readable as you can possibly make it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does it have good test coverage? ✅
&lt;/h3&gt;

&lt;p&gt;As much as the codebase as possible should be covered when running your tests. If the percentage isn't high enough, then you probably need to consider changing the battery of tests you're running.&lt;/p&gt;

&lt;p&gt;Tests aren't technically a part of code reviews, but they definitely go hand in hand as two of the most effective practices to ensure code quality.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is there no unused code? 💤
&lt;/h3&gt;

&lt;p&gt;Pretty self-explanatory, right? If the code is unused, it shouldn't be there. No good can come of it. Only mistakes.&lt;/p&gt;




&lt;p&gt;Did you enjoy our little checklist? Did we miss something? Is there a key step to your reviewing process that you feel should be on everyone's list?&lt;/p&gt;

&lt;p&gt;Make sure to drop us a line on Twitter (&lt;a class="mentioned-user" href="https://dev.to/codereviewpad"&gt;@codereviewpad&lt;/a&gt;) and let us know.&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>checklist</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How long should code reviews take?</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Mon, 16 Aug 2021 13:28:16 +0000</pubDate>
      <link>https://dev.to/reviewpad/how-long-should-code-reviews-take-igj</link>
      <guid>https://dev.to/reviewpad/how-long-should-code-reviews-take-igj</guid>
      <description>&lt;p&gt;&lt;em&gt;This is one of the most controversial aspects of code reviews. People just don't seem to agree about how long one should be taking doing code reviews, how long the ideal code review is, or even if you should time them at all.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The underlying thought is &lt;strong&gt;valid&lt;/strong&gt; : code reviews depend on our ability to remain focused and detect minor flaws. It's not an activity that you can perform well for very long. Tiredness and distractedness will destroy your productivity.&lt;/p&gt;

&lt;p&gt;So how do we optimise this? Should we measure time? Set targets, such as the number of lines of code reviewed? Trust our body and perceptions?&lt;/p&gt;

&lt;p&gt;We have some thoughts ourselves, but we'll leave those for the end of the article. In the meantime, let's look at the best arguments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code reviews should take a fixed amount of time
&lt;/h2&gt;

&lt;p&gt;This is one of the more common suggestions. The idea is that whether you're measuring how much code you actually go through or not (because this is heavily reliant on its quality), you should focus on time, so you know you aren't doing too much and reviewing whilst tired.&lt;/p&gt;

&lt;p&gt;Common answers range from &lt;a href="https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/"&gt;60 minutes&lt;/a&gt; to &lt;a href="https://hamidmosalla.com/2020/11/11/code-review-best-practices-a-short-guide/"&gt;2 hours&lt;/a&gt;, and it is generally agreed that anything that exceeds two hours is too much and would necessitate taking breaks.&lt;/p&gt;

&lt;p&gt;Not everyone emphasizes fixed amounts, however.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code reviews should be limited by space, not time
&lt;/h2&gt;

&lt;p&gt;This is the second most popular suggestion. The argument is that time isn't the best way to limit reviewing, the number of lines of code checked is.&lt;/p&gt;

&lt;p&gt;The idea is that different reviewers with different skill sets are likely to take varying amounts of time to get the same work done.&lt;/p&gt;

&lt;p&gt;This makes time-limited sessions an unreliable predictor of when the job will be done.&lt;/p&gt;

&lt;p&gt;Proponents of best practices usually recommend around &lt;a href="https://asus-aics.github.io/DeveloperGuide/pages/003_code_review/"&gt;300&lt;/a&gt; or &lt;a href="https://smartbear.com/learn/code-review/best-practices-for-peer-code-review/"&gt;400&lt;/a&gt; lines of code at one go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cognitive loads vary, so you should do both
&lt;/h2&gt;

&lt;p&gt;This is by far the most common answer out there.&lt;/p&gt;

&lt;p&gt;To put it quite simply, different people in different teams have varying degrees of tolerance for cognitive load. Some can work for longer hours, some can deal with more work.&lt;/p&gt;

&lt;p&gt;No one is superhuman, though, and we shouldn't expect that.&lt;/p&gt;

&lt;p&gt;The ideal solution, if you are doing both, is to set limits in terms of &lt;strong&gt;both time and space&lt;/strong&gt; and stop whenever you reach whichever is first.&lt;/p&gt;

&lt;h2&gt;
  
  
  Our suggestion: figure out what works for you
&lt;/h2&gt;

&lt;p&gt;When recommendations for best practices are this divisive, odds are different strokes will work for different folks.&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;not&lt;/strong&gt; a bad thing.&lt;/p&gt;

&lt;p&gt;We do believe that best practices for code reviews will be better defined in the future (and we definitely hope to contribute to that conversation), but some aspects of it will always be up to the characteristics of the team.&lt;/p&gt;

&lt;p&gt;Here's our recommendation, that we've included in &lt;a href="https://reviewpad.com/blog/six-best-practices-to-improve-your-code-reviews/"&gt;our Best Practices article&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;Time your own code reviews.&lt;/p&gt;

&lt;p&gt;Figure out how long it usually takes you to get through your work, and be mindful of your own limitations. Once you've understood how long it usually takes you to get through the amount of work you're comfortable with, you will learn a number of important things, such as:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Which part of the codebase takes you the longest;&lt;/li&gt;
&lt;li&gt;How long it typically takes you to handle specific issues;&lt;/li&gt;
&lt;li&gt;When any given review is taking longer than usual, which can mean there are problems that need fixing elsewhere in the development process;&lt;/li&gt;
&lt;li&gt;When you will need to compartmentalise and divide the work.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is part of a larger point about code reviews best practices, which is all about &lt;a href="https://reviewpad.com/blog/code-review-metrics-that-make-sense/"&gt;acquiring metrics that make your work easier&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Something else that makes your work easier is having the correct tools for the job.&lt;/p&gt;

&lt;p&gt;Which, incidentally, is what we make.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reviewpad.com/get-started/"&gt;Take a look&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>beginners</category>
      <category>culture</category>
    </item>
    <item>
      <title>Code reviews in a nutshell</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Thu, 05 Aug 2021 15:41:15 +0000</pubDate>
      <link>https://dev.to/reviewpad/code-reviews-in-a-nutshell-d2e</link>
      <guid>https://dev.to/reviewpad/code-reviews-in-a-nutshell-d2e</guid>
      <description>&lt;p&gt;&lt;em&gt;When you’re working on a specific field, it is extremely important to never lose focus. What are the basics of your work? Why does it matter? Why do you do what you do?&lt;br&gt;&lt;br&gt;We have decided to step back a little and take a good hard look at code reviews as a concept, and think through the basics of the work, why it matters, and how it’s become a cornerstone of software development.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;What are code reviews?&lt;/h2&gt;

&lt;p&gt;Some concepts are so ingrained in our day-to-day activities that we have a hard time defining them precisely. A code review is one of them. A lot of confusion arises from this. One of the most common misconceptions about code reviews is that they are the same as pull requests.&lt;/p&gt;

&lt;p&gt;This is false.&lt;/p&gt;

&lt;p&gt;Not only are code reviews &lt;strong&gt;not pull requests&lt;/strong&gt;, they can happen independently of them, and outside of version control systems, such as Git. These are all tools that make code reviews more effective and easier to perform, but they don’t define the practice.&lt;/p&gt;

&lt;p&gt;Code reviews, or peer reviews, are any and all software quality assurance activities where a person (or persons) that is not the original creator of the code will verify it by reading it.&lt;/p&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;It’s that simple.&lt;/p&gt;

&lt;h2&gt;Why do we need code reviews?&lt;/h2&gt;

&lt;p&gt;There are a ton of &lt;a href="https://reviewpad.com/blog/automation-in-code-reviews-dos-and-donts/" rel="noreferrer noopener"&gt;automated processes&lt;/a&gt; for reviewing code, correct? And there’s a lot to be said about &lt;a href="https://reviewpad.com/blog/code-review-metrics-that-make-sense/" rel="noreferrer noopener"&gt;metrics&lt;/a&gt; that can guide a review, which can also be systematised even by someone without a deep knowledge of the code, correct?&lt;/p&gt;

&lt;p&gt;So why do we need some of our brighter development minds to be spending a significant amount of time poring over code that has already been tested and passed?&lt;/p&gt;

&lt;p&gt;For several reasons.&lt;/p&gt;

&lt;p&gt;We need code to be &lt;strong&gt;readable&lt;/strong&gt;. When we are performing code reviews, we aren’t just debugging, we are doing an exercise in creative reading. We are checking to see if we can perfectly understand everything the code does. Every codebase needs to be updated, and it’s just not practical to always rely on the original developer to do so. The code needs to be readable by someone else.&lt;/p&gt;

&lt;p&gt;We need to transfer &lt;strong&gt;knowledge&lt;/strong&gt;. A team that is composed of individuals that only understand the code they wrote is a team that doesn’t understand its own product. Code reviews aren’t just about improving the codebase, they are also about improving on what the team knows.&lt;/p&gt;

&lt;p&gt;We need &lt;strong&gt;continuous improvement&lt;/strong&gt;, not just fixing problems. A code review shouldn’t just focus on picking bugs or defects. The reviewer is a second set of eyes and a second mind, and they always need to be thinking critically. Are there better solutions? Can we improve quality? Can this be done more efficiently?&lt;/p&gt;

&lt;p&gt;We need it for &lt;strong&gt;team building&lt;/strong&gt;. Collective ownership is key. The team needs to know that every single line of code is owned collectively by everyone, not just by the person who typed. Code reviews make the team understand that everyone can contribute with valuable input at any stage of development in a practical sense.&lt;/p&gt;

&lt;h2&gt;So how do I do them?&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://reviewpad.com/blog/continuous-code-reviews-are-the-way-to-go/" rel="noreferrer noopener"&gt;We have a lot of thoughts about best practices regarding code reviews&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We understand not all of them are consensual, though, so here’s the bare minimum you &lt;strong&gt;need to do&lt;/strong&gt; to implement an effective code review process with your team:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Establish &lt;strong&gt;what to look for&lt;/strong&gt;. Not all code reviews are born equal, and not all of them are looking for the same things. If you are making very minor changes to a function, for instance, you might not even need a review, even if it affects a significant number of files. Here are some things to look out for:&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Purpose&lt;/em&gt;: Does the code do &lt;strong&gt;what&lt;/strong&gt; it’s supposed to?&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Requirements&lt;/em&gt;: Does the code do &lt;strong&gt;everything&lt;/strong&gt; it should?&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Design&lt;/em&gt;: Is the code readable and elegant? &lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Functionality&lt;/em&gt;:  Does the code serve its &lt;strong&gt;users&lt;/strong&gt; adequately?&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Complexity&lt;/em&gt;: Could the code be &lt;strong&gt;simpler&lt;/strong&gt;?&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Figure out &lt;strong&gt;how you are going to assign&lt;/strong&gt; the reviews. Don’t just blast the whole team with a notification and have them randomly review things in their free time. Whether you’re assigning a senior and a junior developer or partnering developers in other ways, make sure reviews are assigned in a timely fashion to specific people.&lt;/li&gt;
&lt;li&gt;Make sure reviews are done in a &lt;strong&gt;humane&lt;/strong&gt; way. One of the major roadblocks teams face regarding code reviews is that people sometimes tend to not handle the emotional aspect of going over someone else’s work in the kindest way. Reviews need to be about &lt;strong&gt;collaboration, not competition&lt;/strong&gt;. &lt;a rel="noreferrer noopener" href="https://reviewpad.com/blog/are-code-reviews-hurting-your-team/"&gt;We were lucky enough to have a guest post on our blog about precisely this&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;If you are just getting started&lt;/h2&gt;

&lt;p&gt;We have made it our mission to improve code reviews, to make them more accessible and simpler for teams, and to truly make them an industry standard.&lt;/p&gt;

&lt;p&gt;Reviewpad was designed to do exactly that, and you can try it for free.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://reviewpad.com/get-started/"&gt;You can do it right now, in fact&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Let us know what you think.&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>pullrequest</category>
    </item>
    <item>
      <title>The book most of us don't need.</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Wed, 02 Jun 2021 14:46:16 +0000</pubDate>
      <link>https://dev.to/codereviewpad/the-book-most-of-us-don-t-need-44om</link>
      <guid>https://dev.to/codereviewpad/the-book-most-of-us-don-t-need-44om</guid>
      <description>&lt;p&gt;Let's face it, most developers don't need this book for Code Review, we are all experts on #LGTM&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R2PlJ_BW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e8jyej7xjwyrk4v9gmw6.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--R2PlJ_BW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e8jyej7xjwyrk4v9gmw6.jpeg" alt="Alt Text" width="800" height="400"&gt;&lt;/a&gt;&lt;br&gt;
( With &lt;a href="https://dev.to/rly"&gt;https://dev.to/rly&lt;/a&gt; )&lt;/p&gt;

</description>
      <category>lgtm</category>
      <category>codereview</category>
    </item>
    <item>
      <title>Why You Need To Be Doing Code Reviews</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Wed, 02 Jun 2021 14:42:51 +0000</pubDate>
      <link>https://dev.to/reviewpad/why-you-need-to-be-doing-code-reviews-cp5</link>
      <guid>https://dev.to/reviewpad/why-you-need-to-be-doing-code-reviews-cp5</guid>
      <description>&lt;p&gt;&lt;em&gt;Code review is one of the most underrated processes to increase code quality. There is still resistance to a process that is seen as unproven and associated with useless overhead. However, by understanding how code reviews can work, it becomes clear that the advantages far outweigh its costs. I am here to directly address the most common concerns and to share a vision for the future of code reviews.&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;Spoiler alert: it’s not a fancy AI tool that replaces developers.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now, any developer worth their salt is going to be checking and documenting the code over time. This is a given. There are many stages throughout development where bugs and mistakes are found. &lt;/p&gt;

&lt;p&gt;This is why you have specifications and run tests.&lt;/p&gt;

&lt;p&gt;So how do you arrive at the return on investment (ROI) of a code review?&lt;/p&gt;

&lt;h3&gt;
  
  
  Return on investment is hard to measure
&lt;/h3&gt;

&lt;p&gt;Full transparency: it’s not easy to define adequate metrics to find out a code review’s ROI.&lt;/p&gt;

&lt;p&gt;We do know some things. For instance: fixing a bug in the testing stage costs you on average &lt;a href="https://www.typemock.com/software-bugs-infographic"&gt;almost eight times as much as if you catch it before&lt;/a&gt;. And if it’s ever found after the product has shipped? Well, that’s about 15 times as much.&lt;/p&gt;

&lt;p&gt;The benefits of code reviews permeate the entire development process. It improves communication, the sustainability of products, the onboarding of new joiners, and a number of other issues.&lt;/p&gt;

&lt;p&gt;Of course, if you want to kid yourself, you can &lt;a href="https://smartbear.com/product/collaborator/roi-calculator/"&gt;try&lt;/a&gt; to put a number on it.&lt;/p&gt;

&lt;p&gt;At the end of the day, though, we need to be comfortable with the idea that a formula will never capture how important code reviews are as well as the people in your team. It’s all about &lt;strong&gt;continuous improvement&lt;/strong&gt; – and that’s an integral part of a team’s &lt;strong&gt;culture&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Understanding code reviews is simple
&lt;/h3&gt;

&lt;p&gt;Sometimes, the major roadblock for teams to engage in code reviews is that they don’t fully understand what it means. As a developer, that resonates a lot – code reviews are time consuming, are typically unstructured and it’s quite easy to get lost in the process because of their cognitive complexity and frequent context switching. &lt;/p&gt;

&lt;p&gt;So, how can we get more structure into it?&lt;/p&gt;

&lt;p&gt;Properly done, here’s what an experienced reviewer will be looking for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Design&lt;/strong&gt;: the code must fit the purpose for which it was created.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Functionality&lt;/strong&gt;: the code must behave in the intended way.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Complexity&lt;/strong&gt;: simpler is usually better. Both for functionality and for maintainability.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Tests&lt;/strong&gt;: there must be tests in place with sufficient coverage of the changes.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Naming&lt;/strong&gt;: variables, classes, methods names need to be clear and self-explanatory.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Style&lt;/strong&gt;: the code must respect the engineering guidelines of the company.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Documentation&lt;/strong&gt;: it must be updated, and it must be relevant.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This strategy is in many ways a methodical and rigorous process to improve code quality. However, in practice, valuable code reviews are not box ticking – the main goal is to collaborate and improve the codebase which is the common working environment for developers.&lt;/p&gt;

&lt;p&gt;Code review brings in different sets of eyes to look at your code. Think of it as a manuscript, and of the reviewer as a proofreader. It’s a brand new set of eyes, someone likely unfamiliar with the text, and someone that needs to understand it on its own merits.&lt;/p&gt;

&lt;p&gt;The author shouldn’t need to be at the reader’s shoulder, explaining what is happening in the story. In the same way, &lt;strong&gt;a code reviewer constructively should point out when your “narrative” doesn’t make sense&lt;/strong&gt;. This way, reviewers and the author collaborate on the best solution.&lt;/p&gt;

&lt;p&gt;This is a job for humans and adding automation helps but in the code reviews that matter, you ultimately need human interaction to reach the best outcome for the team.&lt;/p&gt;

&lt;h3&gt;
  
  
  Code review will help your team do its job
&lt;/h3&gt;

&lt;p&gt;By talking with hundreds of developers, we have learnt that teams with a strong culture on code reviews are able to &lt;strong&gt;communicate effectively.&lt;/strong&gt; Not just sporadically, &lt;strong&gt;consistently&lt;/strong&gt;. This is because code reviews don’t simply fix bugs, they also ensure that the codebase is clean and easily understandable for others to maintain.&lt;/p&gt;

&lt;p&gt;As developers get used to comprehensive code reviews, they will start changing how they code accordingly. This means code becomes easier to understand by others and a lot of time is saved going back and forth within your team.&lt;/p&gt;

&lt;h3&gt;
  
  
  (especially if your team is remote)
&lt;/h3&gt;

&lt;p&gt;Most of us are working remotely at the moment, due to… ahem… current events. What we are starting to come to grips with is that some kind of remote work environment is not going away. &lt;a href="https://internetretailing.net/covid-19/covid-19/-how-uk-consumer-shopping-habits-are-set-to-be-permanently-altered-by-lockdown--21245"&gt;Ecommerce&lt;/a&gt; in particular has been the canary in the coal mine regarding this issue. Consumers and companies alike have realised that there are a lot of advantages in working and buying from a distance, and in-office work will probably never revert to its pre-pandemic levels.&lt;/p&gt;

&lt;p&gt;That means &lt;strong&gt;effective communication is now at a premium&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;High quality code reviews help teams build codebases that facilitate communication, and that lets people get straight to work with very little synchronous guidance.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are code reviews a silver bullet?
&lt;/h3&gt;

&lt;p&gt;Simple answer: no.&lt;/p&gt;

&lt;p&gt;What if the original code is a huge incomprehensible mess? Won’t reviewers spend hours on end trying to figure out how to even begin to understand the changes? Probably.&lt;/p&gt;

&lt;p&gt;The complexity of the review itself increases exponentially with the number of changes, the maturity of the codebase and the lack of expertise of the reviewer. However, somehow this complexity feels artificial at times and we believe that has to do with the interface most reviewers are using right now. It is just a &lt;strong&gt;textual diff between files&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We started Reviewpad because we believe that it should be possible for developers to have the relevant information about code changes out of the box. Ultimately, we want to systematically help developers create an intuitive guide for reviewers to dramatically reduce the number of useless interactions required today.&lt;/p&gt;

&lt;p&gt;There’s also the issue of communication and documentation which I will write about in the future.&lt;/p&gt;

&lt;h3&gt;
  
  
  We are working to make code reviews better
&lt;/h3&gt;

&lt;p&gt;Reviewpad’s long-term goal is to make high quality code reviews easily accessible for teams of any size and working with codebases that might be recent or decades old. &lt;/p&gt;

&lt;p&gt;And we want to do it by protecting our most important resource: developers. For that reason, Reviewpad is being built with a &lt;em&gt;developers first&lt;/em&gt; mindset – it should &lt;strong&gt;make code reviews better&lt;/strong&gt; by making it easier for developers to extricate themselves from bad code.&lt;/p&gt;

&lt;p&gt;We are currently on private beta but if you want to hear more about Reviewpad, &lt;a href="https://reviewpad.com/book-a-demo"&gt;book a demo&lt;/a&gt; and we will show you how we are building the future of code reviews.&lt;/p&gt;

</description>
      <category>codereview</category>
    </item>
    <item>
      <title>The "C" in Software Quality stands for for "Code Review"</title>
      <dc:creator>Reviewpad</dc:creator>
      <pubDate>Wed, 02 Jun 2021 13:27:46 +0000</pubDate>
      <link>https://dev.to/codereviewpad/the-c-in-software-quality-stands-for-for-code-review-140o</link>
      <guid>https://dev.to/codereviewpad/the-c-in-software-quality-stands-for-for-code-review-140o</guid>
      <description></description>
    </item>
  </channel>
</rss>
