<?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: Marco Patiño López</title>
    <description>The latest articles on DEV Community by Marco Patiño López (@marcopatino).</description>
    <link>https://dev.to/marcopatino</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%2F1210365%2F9e8b252a-9af0-4016-88a4-e009b51cfaaf.jpg</url>
      <title>DEV Community: Marco Patiño López</title>
      <link>https://dev.to/marcopatino</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marcopatino"/>
    <language>en</language>
    <item>
      <title>Stop Writing Confusing Code Review Comments!</title>
      <dc:creator>Marco Patiño López</dc:creator>
      <pubDate>Tue, 29 Apr 2025 10:09:52 +0000</pubDate>
      <link>https://dev.to/marcopatino/stop-writing-confusing-code-review-comments-eni</link>
      <guid>https://dev.to/marcopatino/stop-writing-confusing-code-review-comments-eni</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fogfcmwuhdeg6sdewmwi0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fogfcmwuhdeg6sdewmwi0.png" alt="code review meme" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We've all been there. Staring at a GitHub pull request comment like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Maybe change this?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"This looks wrong, fix it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;What does that &lt;em&gt;actually&lt;/em&gt; mean? Is it a minor suggestion or a requirement? Is it critical blocker, or just something the reviewer found confusing? &lt;br&gt;
Written feedback often loses crucial context, leading to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⏳ &lt;strong&gt;Wasted Time, slower reviews:&lt;/strong&gt; Back-and-forth clarification cycles.&lt;/li&gt;
&lt;li&gt;😠 &lt;strong&gt;Frustration:&lt;/strong&gt; For both the reviewer and the author.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This ambiguity isn't just annoying; it actively harms the code review process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bringing Clarity with Conventional Comments
&lt;/h2&gt;

&lt;p&gt;There's a better way! The &lt;a href="https://conventionalcomments.org/" rel="noopener noreferrer"&gt;Conventional Comments&lt;/a&gt; specification provides a simple structure to add explicit context to your review comments. It suggests prefixing comments with labels like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;praise:&lt;/code&gt; For highlighting good work.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;suggestion:&lt;/code&gt; For optional improvements.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;issue:&lt;/code&gt; For problems that likely need addressing.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;question:&lt;/code&gt; When seeking clarification.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;thought:&lt;/code&gt; For reflections or ideas not requiring action.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chore:&lt;/code&gt; For minor non-code tasks (like updating docs).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can even add &lt;strong&gt;decorators&lt;/strong&gt; for more nuance, like &lt;code&gt;issue(blocking):&lt;/code&gt; to signal something &lt;em&gt;must&lt;/em&gt; be fixed before merging.&lt;/p&gt;

&lt;p&gt;Suddenly, the guesswork disappears!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;issue(blocking): Add null check for 'user' before this line.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;suggestion: Consider renaming 'x' to 'userCount' for clarity.&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now &lt;em&gt;that's&lt;/em&gt; actionable feedback! Everyone understands the intent and severity instantly. It also opens the door for better tooling and tracking around code reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making Conventional Comments Effortless on GitHub ✨
&lt;/h2&gt;

&lt;p&gt;Okay, using Conventional Comments clearly leads to better reviews. But how do you easily integrate this standard into your daily GitHub workflow without adding friction or needing to memorize all the labels?&lt;/p&gt;

&lt;p&gt;That's exactly why we at &lt;a href="https://pullpo.io/" rel="noopener noreferrer"&gt;Pullpo&lt;/a&gt; built the &lt;a href="https://chromewebstore.google.com/detail/gelgbjildgbbfgfgpibgcnolcipinmlp" rel="noopener noreferrer"&gt;&lt;strong&gt;Conventional Comments Extension&lt;/strong&gt;&lt;/a&gt; - a free, open-source Chrome extension designed to make adopting this standard &lt;em&gt;effortless&lt;/em&gt; right within the GitHub UI.&lt;/p&gt;

&lt;p&gt;We wanted a tool that felt native, didn't get in the way, and made applying these helpful prefixes as simple as clicking a button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feeh018bttb1ww6go3mfv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feeh018bttb1ww6go3mfv.png" alt="toolbar in github comment box" width="800" height="441"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What it does:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Adds an intuitive toolbar&lt;/strong&gt; right above GitHub comment boxes (PRs, issues, commits).&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Provides clickable buttons&lt;/strong&gt; for all standard labels (&lt;code&gt;issue&lt;/code&gt;, &lt;code&gt;suggestion&lt;/code&gt;, &lt;code&gt;praise&lt;/code&gt;, etc.) and decorators (&lt;code&gt;blocking&lt;/code&gt;, &lt;code&gt;non-blocking&lt;/code&gt;, &lt;code&gt;if-minor&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Automatically formats&lt;/strong&gt; the comment prefix for you – just click and type!&lt;/li&gt;
&lt;li&gt;✅ Includes an optional &lt;strong&gt;"Prettify" mode&lt;/strong&gt; that displays prefixes as neat visual badges using Shields.io (linked to a simple explainer). Looks great in PR descriptions too!&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Adapts seamlessly&lt;/strong&gt; to GitHub's light and dark themes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No more typing &lt;code&gt;suggestion(non-blocking):&lt;/code&gt; – just click, click, type.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzvewqy3fgra7f4ift8h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnzvewqy3fgra7f4ift8h.png" alt="badge formatting example" width="800" height="463"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Give it a Try!
&lt;/h2&gt;

&lt;p&gt;We built this initially for our own team, but we think it can help anyone spending time reviewing code on GitHub. It's completely free and MIT licensed.&lt;/p&gt;

&lt;p&gt;Ready to ditch confusing comments and make your code reviews faster and clearer?&lt;/p&gt;

&lt;p&gt;🚀 &lt;strong&gt;Install from the Chrome Web Store:&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://chromewebstore.google.com/detail/gelgbjildgbbfgfgpibgcnolcipinmlp" rel="noopener noreferrer"&gt;https://chromewebstore.google.com/detail/gelgbjildgbbfgfgpibgcnolcipinmlp&lt;/a&gt;&lt;br&gt;
⭐ &lt;strong&gt;Check out the code (and star us!) on GitHub:&lt;/strong&gt; &lt;br&gt;
&lt;a href="https://github.com/pullpo-io/conventional-comments" rel="noopener noreferrer"&gt;https://github.com/pullpo-io/conventional-comments&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👀 &lt;strong&gt;Watch a quick demo video:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://youtu.be/jLzXlZ78rNE?si=KMzIH9Vb43glekEW" rel="noopener noreferrer"&gt;https://youtu.be/jLzXlZ78rNE?si=KMzIH9Vb43glekEW&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'd love to hear what you think! Does this solve a pain point for you? Any features you'd like to see? Let us know in the comments below!&lt;/p&gt;

&lt;p&gt;Happy coding, and happier reviewing!&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>github</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Linking Individual Engineering metrics to Business Metrics (But not the other way around)</title>
      <dc:creator>Marco Patiño López</dc:creator>
      <pubDate>Wed, 26 Feb 2025 12:26:52 +0000</pubDate>
      <link>https://dev.to/marcopatino/linking-individual-engineering-metrics-to-business-metrics-but-not-the-other-way-around-59k</link>
      <guid>https://dev.to/marcopatino/linking-individual-engineering-metrics-to-business-metrics-but-not-the-other-way-around-59k</guid>
      <description>&lt;p&gt;Every once in a while, new &lt;a href="https://pullpo.io" rel="noopener noreferrer"&gt;Pullpo&lt;/a&gt; users ask us to provide more individual metrics in the product. The thing is, what individual metrics? And why?&lt;/p&gt;

&lt;h2&gt;
  
  
  Input to Output to Outcome
&lt;/h2&gt;

&lt;p&gt;After having +100 conversations with managers and engineering leaders, we saw that it's useful to divide metrics into three sets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input metrics&lt;/strong&gt;, or, in the SPACE framework, activity metrics. This is what developers do and spend their time on. Number of PRs, commits, code review comments, time spent on meetings, code review turnaround time, PR size, amount of documentation written, number of LoCs… These are examples of activity metrics. They are the easy ones to measure at the individual level.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output metrics&lt;/strong&gt;. These start to be team-level metrics. Here we have things like the DORA metrics: MTTR, CFR, lead time, deployment frequency... and similar ones like uptime, number of incidents, support tickets, API performance…&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outcome metrics&lt;/strong&gt;. These are business metrics. The ones that really matter. Churn, ARR, CAC… This kind of metrics reflects business impact.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The metrics that actually matter are output metrics and especially outcome metrics. So the question is, can we tie individual metrics to outcome and output metrics?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6eeo0jg19vh71vbikgaz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6eeo0jg19vh71vbikgaz.png" alt="input, output and outcome metrics" width="800" height="134"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tying individual metrics to business metrics.
&lt;/h2&gt;

&lt;p&gt;Classical example: sales team.&lt;/p&gt;

&lt;p&gt;They have all kinds of metrics to measure individual productivity like # calls made, % call to demo, % demo to close... and they work great. Why? Because they can easily link individual metrics to outcome metrics, and most importantly, the other way around: they can easily know the contribution of each team member to outcome metrics like MRR.&lt;/p&gt;

&lt;p&gt;They can clearly measure the performance for each individual. Perfect.&lt;/p&gt;

&lt;p&gt;What happens in engineering? We can link input metrics to output metrics, and output metrics to outcome metrics. For example, we know that a good PR Size has an impact on Cycle time (small PRs lead to faster and better code reviews), and a short Cycle time allows the company to ship faster. This means more features to promote and easier to get new clients (less CAC, more ARR) and can also reduce churn.&lt;/p&gt;

&lt;p&gt;Ok, now try to do it the other way around. What’s the impact on CAC, ARR, and churn because a developer created a PR of the right size? Good luck.&lt;/p&gt;

&lt;p&gt;Here is an example of tying input metrics to output metrics to outcome metrics, also inspired by this &lt;a href="https://icchasethi.medium.com/tying-engineering-metrics-to-business-metrics-f4df7651e026" rel="noopener noreferrer"&gt;post&lt;/a&gt; by Iccha Sethi.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F424y5vhl7n5abeul7z7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F424y5vhl7n5abeul7z7v.png" alt="how input metrics impact output and output impact outcome" width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Comparing individual metrics.
&lt;/h2&gt;

&lt;p&gt;Ok, so we cannot clearly tie outcome metrics to input metrics. Can we at least compare between input metrics?&lt;/p&gt;

&lt;p&gt;Let's take the sales team example again. Imagine that we couldn't link outcome to input, at least we could compare input metrics between SDRs, right? The more calls they make (quantity) and the better close rate they have (quality), the better they are performing. Even if we couldn’t tie outcomes to inputs, even if we couldn’t know the contribution of each SDR to MRR, we could still clearly rank the performance of SDRs by only taking input metrics into account.&lt;/p&gt;

&lt;p&gt;Ok, let's try that with engineering. So... what are quantity and quality in this case?&lt;/p&gt;

&lt;p&gt;Quantity could be # PRs, # commits, # words of docs written, # code review comments... but how do we measure quality for those things?&lt;/p&gt;

&lt;p&gt;In code, there are different versions of what quality means. I really like the TRUCE framework for software quality. In a nutshell, this framework analyzes the quality of the code in five areas (with different priorities depending on the stage of the business):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Timely delivery of features.&lt;/li&gt;
&lt;li&gt;Robustness of code (reliable, tested, secure, scales, etc.).&lt;/li&gt;
&lt;li&gt;User needs are met (meets user, customer, stakeholder requirements/needs).&lt;/li&gt;
&lt;li&gt;Collaboration is enabled (readable, documented code to facilitate collaboration).&lt;/li&gt;
&lt;li&gt;Evolvable design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here comes the trick: those things depend on more than 1 person.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Timely delivery: also depends on reviewers (and many more people in bigger companies).&lt;/li&gt;
&lt;li&gt;Robustness, evolvable and readable code: on an existing irregular codebase, with tech debt in different files, created by many other developers.&lt;/li&gt;
&lt;li&gt;Meets user requirements: entire product team deciding what to build.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  So individual metrics are bad?
&lt;/h2&gt;

&lt;p&gt;No. They are just numbers. Data is data. It's not good or bad, it is what it is.&lt;/p&gt;

&lt;p&gt;If a manager exclusively uses activity metrics to compare individual developer productivity, then that is bad. But it's not the metrics' fault.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can individual metrics be useful?
&lt;/h2&gt;

&lt;p&gt;That's a better question. And the answer is yes, they are useful. Especially for detecting outliers in the team.&lt;/p&gt;

&lt;p&gt;Maybe you cannot compare individual productivity of developers comparing # PRs or # commits, but it's useful to know if someone didn't create a PR or commit in the last two weeks.&lt;/p&gt;

&lt;p&gt;In that case, your job as a leader would be to combine that info with the actual context on what's happening (maybe they are pairing, on vacation or temporarily working on another repo). And make decisions taking everything into account.&lt;/p&gt;

&lt;p&gt;This is why &lt;a href="https://pullpo.io" rel="noopener noreferrer"&gt;Pullpo&lt;/a&gt; detects activity outliers automatically so that managers are aware if something is happening on their team ;)&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts and summary.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;We can tie input to output and output to outcome.&lt;/li&gt;
&lt;li&gt;However, unlike other teams, we cannot measure how much an engineer contributed to outcome.&lt;/li&gt;
&lt;li&gt;Most of the time, it doesn't even make sense to compare developers based on input. But input metrics are useful for detecting outliers.&lt;/li&gt;
&lt;li&gt;I say most of the time because I think there may be some exceptions to this. For example, I think review turnaround time can be a better comparative metric, allowing managers to go a little further than only detecting outliers. But not too much, or Goodhart's law could apply.&lt;/li&gt;
&lt;li&gt;I also believe that, with AI, comparative metrics could perhaps be a solvable problem, but the solution has to be perfect. Otherwise, the "solution" would be a bigger problem than the initial problem.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>leadership</category>
      <category>softwaredevelopment</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The hidden cost of code reviews</title>
      <dc:creator>Marco Patiño López</dc:creator>
      <pubDate>Thu, 17 Oct 2024 15:50:53 +0000</pubDate>
      <link>https://dev.to/marcopatino/the-hidden-cost-of-code-reviews-315l</link>
      <guid>https://dev.to/marcopatino/the-hidden-cost-of-code-reviews-315l</guid>
      <description>&lt;p&gt;As DevOps engineers, developers, and tech leaders, there are only three things that should matter to us: Quality, Speed, and the ability to maintain both over the long term (LQT - Long-term Quality and Throughput).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdi57k997l2sylgretyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frdi57k997l2sylgretyv.png" alt="Image description" width="800" height="544"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Think about it—everything we do as a software development team is an investment in at least one of these categories:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quality&lt;/strong&gt; means building something that users want—something that works, solves the problem, and meets stakeholders’ requirements, including security and scalability.&lt;/p&gt;

&lt;p&gt;Well-structured, maintainable, and clean code doesn’t fall under “Quality” but fits into the category of “&lt;strong&gt;being able to maintain both for a long time&lt;/strong&gt;”, LQT.&lt;br&gt;
If you accumulate tech debt, lack testing or documentation, you’ll eventually have to sacrifice either quality (something will break) or speed (spend time refactoring and documenting old code). Documentation, linting, managing tech debt, and fostering a strong company culture all contribute to this category and indirectly support both quality and speed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed&lt;/strong&gt; means what it means. Ship fast. Short time to market. Design, code, review and deploy.&lt;/p&gt;

&lt;p&gt;The amount of investing into one or another aspect depends on the business stage and market situation. But you cannot ever leave one of them completely behind. Usually larger and older companies tend to focus more on quality and LQT while early stage companies prioritize quality and speed.&lt;/p&gt;

&lt;p&gt;Every metric and framework in the space (like DORA, DevEx, and Space) also falls into one of these categories: Cycle time (Speed), MTTR (Quality), CFR (Quality), Feedback loops (Speed), Cognitive load (LQT), Diffs per engineer (Speed), etc.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: I think it’s also useful to correlate financial metrics like ACV, or churn &amp;amp; LTV to measure quality.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Every tool we make or buy should work to improve one or more aspects of this equation: CI/CD (Speed), Load balancers (Stability of the system) (Quality), Documentation (LQT), Copilot (Speed), Linters (LQT).&lt;/p&gt;

&lt;p&gt;In essence, every tool and process in the software development lifecycle (SDLC) should contribute to Quality, Speed, or Long-term Quality and Throughput (LQT). &lt;/p&gt;

&lt;p&gt;While most tools and processes primarily focus on one or two of these aspects, there is one critical process that significantly impacts all three simultaneously: code reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code reviews: The single process of SDLC that impacts the three categories at the same time.
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Speed
&lt;/h3&gt;

&lt;p&gt;On average, every PR spends 39% of its time in the code review stage. So this is an example of what leaders might see when checking their team’s engineering metrics in &lt;a href="https://pullpo.io" rel="noopener noreferrer"&gt;Pullpo&lt;/a&gt;’s dashboard:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t83dg83r8sfkz0q9kth.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9t83dg83r8sfkz0q9kth.png" alt="Image description" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this doesn't mean that devs spend 2 days straight doing code reviews nonstop. But since it's an asynchronous process, it gets blocked while devs are doing other tasks.&lt;br&gt;
Sometimes there is no problem with that, but when the code review notification and collaboration system is bad, devs stop prioritizing teamwork and unblocking others over individual tasks. And that comes with a huge cost to our ability to ship things fast as a team.&lt;/p&gt;

&lt;p&gt;→ &lt;a href="https://pullpo.to/channels" rel="noopener noreferrer"&gt;How we created a solution for slow code reviews.&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Quality
&lt;/h3&gt;

&lt;p&gt;This is the first thing that comes to our mind when we think about code reviews. Does this meet the task requirements? Will this work for all our users in all different edge cases? Are there any bugs? Will it work at scale?&lt;/p&gt;

&lt;p&gt;In some cases, it is useful to involve non-technical people in the review process. For instance, some teams may open draft pull requests to make sure everything aligns with the UI design requirements. This is one reason why Pullpo’s &lt;a href="https://pullpo.to/channels" rel="noopener noreferrer"&gt;PR-Channels on Slack&lt;/a&gt; are useful, as it enables additional stakeholders to join the conversation.&lt;/p&gt;

&lt;h3&gt;
  
  
  LQT - Long term quality and throughput.
&lt;/h3&gt;

&lt;p&gt;There are two aspects related to LQT:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First, during code reviews, we ensure the code is well-organized, tested, documented, and stylistically correct. This contributes to LQT by guaranteeing speed and quality for the long term.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Second, the way feedback is given is crucial. Code reviews—whether async or pairing—are where most knowledge transfer happens between developers. It's also where the most feedback is given, greatly impacting engineering culture and LQT.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using conventional comments, asking questions instead of making accusations, resolving back-and-forths efficiently, and making a habit of praising colleagues for good work—all of these practices help improve LQT.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts.
&lt;/h2&gt;

&lt;p&gt;Code reviews are the single process that affects all three of the critical areas of any software development team.&lt;br&gt;
Measuring those areas can be tricky, but useful.&lt;br&gt;
Improving some parts of the process can have little cost but great return.&lt;/p&gt;

&lt;p&gt;If you want to meet the founders and chat about the product, &lt;a href="https://pullpo.to/marco" rel="noopener noreferrer"&gt;reach out!&lt;/a&gt; We love to do that :) &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>devops</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>PRs in Trunk Based Development.</title>
      <dc:creator>Marco Patiño López</dc:creator>
      <pubDate>Fri, 28 Jun 2024 13:23:15 +0000</pubDate>
      <link>https://dev.to/marcopatino/prs-in-trunk-based-development-8n8</link>
      <guid>https://dev.to/marcopatino/prs-in-trunk-based-development-8n8</guid>
      <description>&lt;p&gt;Wait, PRs in Trunk Based Development? Yes, PRs in Trunk Based Development.&lt;/p&gt;

&lt;p&gt;There is a common misunderstanding with TBD, which is that it always implies committing directly to main/trunk and pair programming. This is false.&lt;/p&gt;

&lt;p&gt;I talk a lot about code reviews, devex, branching models and everything around them, as I’m the cofounder at &lt;a href="http://pullpo.to/phunt" rel="noopener noreferrer"&gt;pullpo.to/phunt&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One common feedback that I’ve got many times is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Code reviews through pull requests were made for open source. In proprietary software, we should do trunk based development (implying pair programming and committing directly to trunk)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I don’t totally agree with this claim. I’m going to explain why. To give a little bit of context…&lt;/p&gt;

&lt;h2&gt;
  
  
  What is TBD (Trunk Based Development)?
&lt;/h2&gt;

&lt;p&gt;Basically, what TBD says is that we should avoid creating &lt;strong&gt;long-lived&lt;/strong&gt; branches other than the main branch (trunk). Developers should push new commits directly there or merge &lt;strong&gt;short-lived&lt;/strong&gt; feature branches (will come back to this later). The only rule for every new push or merge to trunk is to not break the build. The CI must pass. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F69oyvl6azqg2bxgg683b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F69oyvl6azqg2bxgg683b.png" alt="trunk based development" width="728" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main concept behind TBD, which I love, is that we should keep developers close to a production environment or its closest equivalent, the main branch. Compared to other obsolete branching methods like Git Flow, TBD increases ownership and responsibility among developers, which is good. It also allows us to be always ready to deploy, and as a consequence, it normally increases deployment frequency. Since we can reach production faster, it also substantially reduces cycle time and time to recover from failures.&lt;/p&gt;

&lt;p&gt;All of this is great, but keep reading please, the interesting part is about to come: &lt;/p&gt;

&lt;h2&gt;
  
  
  PRs and code reviews in TBD.
&lt;/h2&gt;

&lt;p&gt;If you are committing directly to trunk, the only way to do a code review before the code gets to trunk is by pair programming. There is no alternative. If you want to do a code review (and, &lt;a href="https://martinfowler.com/articles/ship-show-ask.html" rel="noopener noreferrer"&gt;most of the times&lt;/a&gt;, you want to do a code review) you need to do pair programming. &lt;/p&gt;

&lt;p&gt;But TBD is also compatible (and actually recommends) doing PRs and &lt;strong&gt;short-lived feature branches.&lt;/strong&gt; I know some people who wont believe this, so I’m attaching an screenshot from the official TBD website. &lt;a href="https://trunkbaseddevelopment.com/short-lived-feature-branches/" rel="noopener noreferrer"&gt;https://trunkbaseddevelopment.com/short-lived-feature-branches/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7qyu343pmj1oche0u2x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq7qyu343pmj1oche0u2x.png" alt="feature branches in trunk based development" width="800" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TBD also recommends pairing, as it has a lot of advantages: better communication, shorter feedback loops… The thing is, pair programming doesn’t work for everyone, all the time, for every task. &lt;/p&gt;

&lt;p&gt;In my case, I love pairing for problems that require creative solutions, or when debugging, or when onboarding a new developer. But I often feel much more productive when working alone. Many times I cannot achieve flow state while pairing. &lt;/p&gt;

&lt;p&gt;Other people are always super productive while pairing, for every type of task, and they love it. &lt;/p&gt;

&lt;p&gt;We are humans. Humans are different. &lt;/p&gt;

&lt;p&gt;If you create &lt;strong&gt;short-lived feature branches&lt;/strong&gt; now you have both options for code reviews: pair programming and conventional code reviews. You can detect good opportunities for pairing and go for it. In the other cases, go for conventional code reviews. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Other benefit of creating short-lived branches:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Before pushing a new commit to a branch, first you have to pull the latest version of that branch. Depending on different factors this command can take time. &lt;/p&gt;

&lt;p&gt;Now imagine 50 devs working on the same repo constantly pushing commits to trunk. It may be difficult to find a time window where no one pushes and you can pull the latest version and push your code. &lt;/p&gt;

&lt;p&gt;This problem is solved with PRs and merge queues. GitHub has its own merge queue feature.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  My take.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If everyone in your team is happy with always doing pair programming AND this is not a problem for hiring new devs AND you don’t have issues with the CI or with finding a long enough time window where you can pull and push with anyone changing trunk, then great! Pairing and committing to trunk is the best solution. If this condition is not met…&lt;/li&gt;
&lt;li&gt;Do short-lived feature branches, but they have to be &lt;strong&gt;short-lived&lt;/strong&gt;. Short-lived means max 2 days and only one committer (1 dev or 1 pair programming duo). &lt;a href="//pullpo.to/channels"&gt;Code review channels&lt;/a&gt; can help keep PRs fast. This is important. Otherwise, you are not doing TBD.&lt;/li&gt;
&lt;li&gt;Learn how to identify good opportunities for pairing in your team. This is a trial and error process. Every person is different. Know yourself.&lt;/li&gt;
&lt;li&gt;Set up you CI to run on PRs. Pair programming duos can have the option to directly merge (or send to merge queue) to trunk if the CI passes. Individual devs may need 1 or 2 approvals before merging.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8q30xhecfktyvciag4l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8q30xhecfktyvciag4l.png" alt="scaled trunk based development" width="726" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;.&lt;br&gt;
.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I’m offering code review workshops at companies.&lt;/strong&gt;&lt;br&gt;
If you liked this post and want to implement best practices around code reviews at your workplace, let me know! I’m offering workshops and consultancy services around code reviews. &lt;/p&gt;

&lt;p&gt;Send an email to marco @ pullpo.io&lt;/p&gt;

&lt;p&gt;If you didn’t like the post, let me know too! I love discussing about this topics. I’ll be paying attention to all the comments and emails.&lt;/p&gt;

</description>
      <category>code</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>I analyzed code review best practices for a year. This is what I learned.</title>
      <dc:creator>Marco Patiño López</dc:creator>
      <pubDate>Mon, 06 May 2024 09:19:38 +0000</pubDate>
      <link>https://dev.to/marcopatino/i-analyzed-code-review-best-practices-for-a-year-this-is-what-i-learned-ace</link>
      <guid>https://dev.to/marcopatino/i-analyzed-code-review-best-practices-for-a-year-this-is-what-i-learned-ace</guid>
      <description>&lt;p&gt;Over the past year, while building &lt;a href="https://pullpo.to/channels"&gt;Pullpo&lt;/a&gt;, I've been highly focused on one specific area: code reviews. I've analyzed and interviewed dozens of teams of varying sizes, industries, and countries to truly understand the best practices surrounding code reviews.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;Code reviews are important. &lt;/p&gt;

&lt;p&gt;Many people think that code reviews are only for improving the code, guaranteeing that the requirements for different stakeholders are met, it may be security, maintainability, performance or only functionality, depending on the environment. &lt;/p&gt;

&lt;p&gt;But code reviews is not only about improving the code, they are many times the best opportunity of improvements and new learnings for developers inside the team. &lt;/p&gt;

&lt;p&gt;Also, recent research (DORA 2023 report) has confirmed that improving code reviews can speed up software delivery performance up to 50%. Take a look at my summary of the report &lt;a href="https://www.marcopatino.dev/articles/2023-dora-metrics"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Code reviews should be FAST.
&lt;/h2&gt;

&lt;p&gt;This is crucial. Typically, unless you use something like &lt;a href="https://martinfowler.com/articles/ship-show-ask.html"&gt;SHIP, SHOW &amp;amp; ASK&lt;/a&gt; (which I recommend), all code reviews are blocking by default.&lt;/p&gt;

&lt;p&gt;This is, until the changes meet all the requirements and get the necessary approvals, the code is not going to production. &lt;/p&gt;

&lt;p&gt;This is something super important: &lt;strong&gt;We should optimize for the speed at which a team can ship product together, not for the speed at which a developer can write code.&lt;/strong&gt; In fact, this is the first phrase of Google’s engineering practices document. &lt;/p&gt;

&lt;p&gt;This translates to &lt;strong&gt;replying to code review messages as fast as possible&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code reviews shouldn’t break your FLOW.
&lt;/h2&gt;

&lt;p&gt;Being in the flow state is that time when you are super focused on a task: it can be designing, programming, whatever you are doing. Some DevEx frameworks (such as the one presented in the paper: &lt;a href="https://queue.acm.org/detail.cfm?id=3595878"&gt;Devex: &lt;strong&gt;What Actually Drives Productivity&lt;/strong&gt;&lt;/a&gt;) place the flow state as a top priority subject for developer productivity. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frqh97yv9edwjpmssqysf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frqh97yv9edwjpmssqysf.png" alt="The devex triangle from the paper DevEx: What actually drives productivity?" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The devex triangle from the paper DevEx: What actually drives productivity?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Flow state is very important for the efficiency of the group, so if you are a developer and you are in flow state, try to keep yourself in that state as long as you can, avoid switching tasks and as long as you can, avoid interruptions. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Being in flow state is the only reason to pospone replying fast to code review messages&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I love this image I found on reddit about the dilema between flow state and interruptions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyi8pvltay4r48wws945k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyi8pvltay4r48wws945k.png" alt="Credits to [nkukard](https://www.reddit.com/r/ProgrammerHumor/comments/pafo1v/understanding_developer_interruptions/).w" width="800" height="1131"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Credits to &lt;a href="https://www.reddit.com/r/ProgrammerHumor/comments/pafo1v/understanding_developer_interruptions/"&gt;nkukard&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Communication is IMPORTANT.
&lt;/h2&gt;

&lt;p&gt;Normally code reviews are made in a written format. Humans communicate much worse in written format. Your corporal movements are not there. Your voice tone is not there. So misunderstandings are much more common. &lt;/p&gt;

&lt;p&gt;This is why some new communication frameworks are raising such as &lt;a href="https://conventionalcomments.org"&gt;conventional comments&lt;/a&gt;. Similar to &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/"&gt;conventional commits&lt;/a&gt;, but applied to code review comments. Where you explicitly specify the intention behind your comments. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;question&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;(non-blocking):&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;At&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;point,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;does&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;it&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;matter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;thread&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;has&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;won?&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;Maybe&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;prevent&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;race&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;condition&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;we&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;should&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;keep&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;looping&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;until&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;they've&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;all&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;won?&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where non-blocking means that this comment is not blocking the PR from being accepted. &lt;/p&gt;

&lt;p&gt;Some other tips in this area are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ask questions instead of affirmations.&lt;/li&gt;
&lt;li&gt;Be kind.&lt;/li&gt;
&lt;li&gt;If you have more seniority, spend time on mentoring, this pays off exponentially.&lt;/li&gt;
&lt;li&gt;If you not agree on a specific topic with a teammate:

&lt;ul&gt;
&lt;li&gt;Don’t take it personally.&lt;/li&gt;
&lt;li&gt;Listen carefully to the other explanation.&lt;/li&gt;
&lt;li&gt;Discuss it in person or in a call, where effective communication is easier.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  PRs should be SMALL.
&lt;/h2&gt;

&lt;p&gt;PRs/MRs should be as small as possible. Only one change at a time. Only one purpose at a time. &lt;/p&gt;

&lt;p&gt;We’ve all seen the meme and know it’s true: &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ac4t3vxy4g4slxn5pff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ac4t3vxy4g4slxn5pff.png" alt="credits to [twitter.com/iamdevloper](http://twitter.com/iamdevloper)" width="590" height="323"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;credits to &lt;a href="http://twitter.com/iamdevloper"&gt;twitter.com/iamdevloper&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Large changes make async code reviews super slow if we want to keep quality, or super low quality if we want to keep speed. &lt;/p&gt;

&lt;p&gt;So what can we do when tasks are huge and we need to implement many changes to accomplish it and we can’t divide the tasks into functional small subtasks?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://www.michaelagreiler.com/stacked-pull-requests/"&gt;Stacked pull requests&lt;/a&gt;. This is a great alternative. Basically it means dividing the task into reviewable (&amp;lt;400 locs) PRs. The downside of this approach is that since these PRs depend on each other, a change on the first branch requires updating the depending branches too.&lt;/p&gt;

&lt;p&gt;This fact can make you lose some time synching the depending branches manually with ‘merge’ or ‘rebase’, this is why some tools where born such as &lt;a href="https://www.git-town.com/"&gt;git-town&lt;/a&gt;, &lt;a href="https://github.com/ezyang/ghstack"&gt;ghstack&lt;/a&gt; or &lt;a href="https://graphite.dev/features/cli"&gt;graphite&lt;/a&gt;. &lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7507hcn6t4kaba32dass.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7507hcn6t4kaba32dass.png" alt="Credits to [Dr. McKayla](https://www.michaelagreiler.com/stacked-pull-requests/)" width="790" height="399"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Credits to &lt;a href="https://www.michaelagreiler.com/stacked-pull-requests/"&gt;Dr. McKayla&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pair programming. Some companies use pair programming as the default way of developing. This also means that the code is already being reviewed by 2 people while being developed, so you don’t need to do a conventional async code review afterwards.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Notes on pairing.
&lt;/h2&gt;

&lt;p&gt;In the past, some recognized authors such as Dave Farley, author of Continuous Delivery, claimed a &lt;a href="https://youtu.be/ASOSEiJCyEM?si=acBveM4byADgftgN"&gt;controversial idea&lt;/a&gt; (read comments on video or &lt;a href="https://www.reddit.com/r/ExperiencedDevs/comments/tzq963/what_do_you_think_of_stop_using_pull_requests/"&gt;here&lt;/a&gt;) that code reviews through PRs are just a bad idea. &lt;/p&gt;

&lt;p&gt;In this video, Dave proposes pair programming as the best code review solution for every case, for every type of company, every type of developer and every type of task. &lt;/p&gt;

&lt;p&gt;I follow Dave, and I agree on most of the things he says but most of the time things are not just black or white, but somewhere in the middle depending on different factors. Pairing is one of those things. &lt;/p&gt;

&lt;p&gt;As a developer, you need to know yourself in order to understand in which scenarios you feel more productive pairing, with which type of people and on which type of problems.&lt;/p&gt;

&lt;p&gt;In my case, typically, I only feel productive while pairing in the following scenarios: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mentoring a new person on the team.&lt;/li&gt;
&lt;li&gt;Brainstorming creative solutions for a complex problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, it’s very hard for me to achieve flow state while pairing, and as we discuss earlier in this post, flow state is a key factor on development productivity. &lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts.
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Code reviews need to happen fast, this is replying fast to code review messages.&lt;/li&gt;
&lt;li&gt;Being in flow state must be the only reason to pospone code review messages.&lt;/li&gt;
&lt;li&gt;Communication is important. Be nice. Listen. Discuss in person/call if necessary.&lt;/li&gt;
&lt;li&gt;Only one purpose per PR. Small PRs. Stacked PRs if necessary.&lt;/li&gt;
&lt;li&gt;Try pair programming with different people and tasks. Discover when pairing is useful for you (and your team).&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>code</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
