<?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: Adriano Martins</title>
    <description>The latest articles on DEV Community by Adriano Martins (@adrianomartins).</description>
    <link>https://dev.to/adrianomartins</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%2F642938%2Fea3b80be-9f68-44b3-9f5d-ff0ae2e80c51.jpg</url>
      <title>DEV Community: Adriano Martins</title>
      <link>https://dev.to/adrianomartins</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adrianomartins"/>
    <language>en</language>
    <item>
      <title>Why Developers Should Care About Knowledge Sharing</title>
      <dc:creator>Adriano Martins</dc:creator>
      <pubDate>Mon, 18 Oct 2021 09:18:44 +0000</pubDate>
      <link>https://dev.to/reviewpad/why-developers-should-care-about-knowledge-sharing-3ilg</link>
      <guid>https://dev.to/reviewpad/why-developers-should-care-about-knowledge-sharing-3ilg</guid>
      <description>&lt;p&gt;&lt;em&gt;Sharing knowledge usually comes as the last step of a process, or even worse, as something optional, that can be passed on if need be. This makes it easy to skip on this step if you feel you’re tired, or your team is busy. Developers are almost always creating new technologies and figuring out new solutions. Odds are, whatever knowledge you acquire won’t be available anywhere else. The time has come to remind everyone of the fundamental benefits of making whatever knowledge you’ve acquired available to your colleagues.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it helps you
&lt;/h2&gt;

&lt;p&gt;Knowledge sharing is &lt;a href="https://codingsans.com/state-of-software-development-2020"&gt;the second biggest problem software companies face&lt;/a&gt;. It affects everyone, so it also affects anyone. With the advent of remote work, this issue may become even more important. First of all, let’s appeal to our own self-interest. Sharing knowledge doesn’t only help our team, it actually helps those who are imparting the knowledge in more ways than one.&lt;/p&gt;

&lt;p&gt;Let’s see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  You are &lt;strong&gt;advancing your own knowledge&lt;/strong&gt;. By explaining what you’ve learnt to someone else, you are consolidating what you’ve learnt. You will retain it better, systematise it better, and, frankly, you’ll probably advance it by seeing it through others’ eyes. You will have to consider what you’re sharing and think twice about it. That reflection will bring with it valuable learning.&lt;/li&gt;
&lt;li&gt;  You will be &lt;strong&gt;receiving feedback&lt;/strong&gt;. No developer is an island. We learn from others. By sharing what you’ve learnt, you will be receiving other people’s thoughts on the subject, which will surely advance your own understanding. Maybe they will even correct some aspect of it that you misunderstood.&lt;/li&gt;
&lt;li&gt;  You will &lt;strong&gt;help future you&lt;/strong&gt;. If you learn something and just file it away in the caverns of a closed pull request, odds are you may not remember it fully whenever you bump into the same problem again. If you write it down, though, and teach it to others, it will be right there for you when you need it. It’s the easiest way to &lt;strong&gt;only solve problems once&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  You will be &lt;strong&gt;advancing your career&lt;/strong&gt;. Sharing knowledge and contributing to the team’s success does not go unnoticed. If when people are in trouble and seek solutions your name pops up all the time, everyone will take notice. This is how promotions happen.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why it helps your team
&lt;/h2&gt;

&lt;p&gt;But sharing isn’t just about oneself, now is it? There must be advantages for the whole team. Let’s see what they are.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  It helps &lt;strong&gt;build team spirit&lt;/strong&gt;. This may sound like a meaningless phrase, but it isn’t. What goes around comes around, and a team that is accustomed to helping each other will resort to helping each other naturally. Giving everyone a hand shouldn’t be contingent on someone being in trouble.&lt;/li&gt;
&lt;li&gt;  You will be &lt;strong&gt;saving everyone A LOT of time&lt;/strong&gt;. How long did it take you to solve the problem? An hour? Two? A whole day? Whenever someone on your team runs into the exact same issue, they will (depending on skill level or just sheer instinct) take roughly the same amount of time. If there’s an explanation available, though, that everyone has knowledge of… Not so much.&lt;/li&gt;
&lt;li&gt;  You will be &lt;strong&gt;building a knowledge base&lt;/strong&gt;. It may seem like just a small addition, but small additions build up. If your team develops a culture of sharing knowledge, they will inevitably create a repository that will become a cornerstone of success.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to do it
&lt;/h2&gt;

&lt;p&gt;So, are there any best practices, aside from simply gathering the team and telling them, or writing stuff down somewhere public, such as an internal Wiki?&lt;/p&gt;

&lt;p&gt;We do have some ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  If you’re using &lt;strong&gt;Reviewpad&lt;/strong&gt;, which you should, the &lt;em&gt;Comments from the Past&lt;/em&gt; feature makes it so whenever someone touches code with comments, they’ll be able to see what was shared when that code was made. Forget about re-working the same problems, or going down avenues that somebody else already found out that don’t work.&lt;/li&gt;
&lt;li&gt;  Whenever a team member explains something to you, &lt;strong&gt;encourage them to document it&lt;/strong&gt;. If it was useful to you, it will likely be useful to others.&lt;/li&gt;
&lt;li&gt;  Much in the same way, whenever someone asks you for help, &lt;strong&gt;document it&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;  Whenever you are the one who needs an explanation, avoid asking in private. &lt;strong&gt;Ask on a public forum&lt;/strong&gt;, so everyone can read the discussion and take advantage of it.&lt;/li&gt;
&lt;li&gt;  Make it &lt;strong&gt;easily accessible&lt;/strong&gt;. Your knowledge base needs to be freely and easily accessible to everyone, at all times. Developers don’t particularly like over complicated wikis, so it’s up to you to create this space.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the reasons why we are building Reviewpad is making knowledge sharing easier and more convenient to everyone involved.&lt;/p&gt;

&lt;p&gt;Reviewpad is about communication as much as it is about reviews.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.reviewpad.com/get-started"&gt;Are you ready to give it a go?&lt;/a&gt;&lt;/p&gt;

</description>
      <category>knowledgesharing</category>
      <category>teamwork</category>
      <category>culture</category>
    </item>
    <item>
      <title>Pull Requests for Dummies</title>
      <dc:creator>Adriano Martins</dc:creator>
      <pubDate>Mon, 30 Aug 2021 09:48:50 +0000</pubDate>
      <link>https://dev.to/reviewpad/pull-requests-for-dummies-2baj</link>
      <guid>https://dev.to/reviewpad/pull-requests-for-dummies-2baj</guid>
      <description>&lt;p&gt;&lt;em&gt;Debate about code reviews is often dominated by debate about pull requests. The confusion between the two is so common we have made it a point to clarify that they are not the same quite often. So what are pull requests? And why are they called that way?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Imagine you're writing a book.&lt;/p&gt;

&lt;p&gt;(&lt;a href="https://reviewpad.com/blog/series-for-dummies/"&gt;You knew that was coming&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;In this case, you're writing collaboratively. Let's say it's a non-fiction book, or a technical manual. Something that requires a certain degree of responsibility and accuracy.&lt;/p&gt;

&lt;p&gt;You will need to figure out a strategy to make sure there are as few mistakes as possible.&lt;/p&gt;

&lt;h2&gt;
  
  
  How about… version control?
&lt;/h2&gt;

&lt;p&gt;If this is a collaborative work, then it stands to reason that you will want to keep your file (let's say a Word document) somewhere everyone can easily find it and work on it. Let's say you keep your manuscript on Dropbox.&lt;/p&gt;

&lt;p&gt;You (or any one of the other authors) are working on a specific chapter, so you download the manuscript that the team is keeping online. You would never edit the manuscript directly, that would be way too risky. You create a temporary version, and label it as such.&lt;/p&gt;

&lt;p&gt;You do your work, write your lines, make sure everything is to your liking, and then what do you do?&lt;/p&gt;

&lt;p&gt;You upload it to the Dropbox, always making sure that it's labeled correctly as a temporary version. Why? Because you would like feedback from your colleagues before &lt;strong&gt;pulling&lt;/strong&gt; everything together (notice our word choice there 🧐).&lt;/p&gt;

&lt;h2&gt;
  
  
  What's a simple word for asking for feedback?
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;review&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Dictionaries are interesting.&lt;/p&gt;

&lt;p&gt;Anyway, your colleagues will then look at your brand new text and they will carefully look over it. They will correct mistakes, leave notes and suggestions, make recommendations, and, of course, if all is well, simply accept it.&lt;/p&gt;

&lt;p&gt;When this is done, and the author of the new chapter is confident he's answered all the queries and fixed all the problems, they can then &lt;strong&gt;request&lt;/strong&gt; whoever is responsible for the manuscript to &lt;strong&gt;pull&lt;/strong&gt; his changed text into the main document.&lt;/p&gt;

&lt;p&gt;And that is what a &lt;strong&gt;pull request&lt;/strong&gt; is.&lt;/p&gt;

&lt;p&gt;When a developer finishes a task, they will start a process to &lt;strong&gt;join the new code to the project&lt;/strong&gt;. For that purpose, they will ask whoever's in charge of the project to &lt;strong&gt;pull&lt;/strong&gt; the changes from their working branch to the main branch. Voilá, a request to pull changes: a pull-request.&lt;/p&gt;

&lt;h2&gt;
  
  
  So it's not a review, but it implies a review?
&lt;/h2&gt;

&lt;p&gt;Most of the time, yes.&lt;/p&gt;

&lt;p&gt;Unless the changes are very trivial, it would be irresponsible to pull changes into the main branch without performing a code review.&lt;/p&gt;

&lt;p&gt;What happens frequently is the opposite: code reviews happen all the time without the need for a pull request.&lt;/p&gt;

&lt;p&gt;A developer might want to review the changes between different states of a project for many different purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Auditing the source code is always important;&lt;/li&gt;
&lt;li&gt;Reviewing code without making it visible to everyone else in the project (pull-requests are always visible), for whatever reason;&lt;/li&gt;
&lt;li&gt;Reviewing the code when the project is scattered across many repositories;&lt;/li&gt;
&lt;li&gt;There are even some software development methodologies that don't use pull requests at all! And they still review code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We hope this helped clear up what pull requests are, and why they are often wrongly mistaken for code reviews. Are there any topics you'd like us to cover next on this series?&lt;/p&gt;

&lt;p&gt;If so, you know where to find us on Twitter (&lt;a href="http://twitter.com/codereviewpad/"&gt;@reviewpad&lt;/a&gt;)!&lt;/p&gt;

</description>
      <category>pullrequest</category>
      <category>git</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Git For Dummies</title>
      <dc:creator>Adriano Martins</dc:creator>
      <pubDate>Thu, 01 Jul 2021 16:27:24 +0000</pubDate>
      <link>https://dev.to/reviewpad/git-for-dummies-10ed</link>
      <guid>https://dev.to/reviewpad/git-for-dummies-10ed</guid>
      <description>&lt;p&gt;&lt;em&gt;We started &lt;a href="https://reviewpad.com/blog/category/for-dummies/"&gt;this series&lt;/a&gt; with&lt;/em&gt; &lt;a href="https://reviewpad.com/blog/code-reviews-for-dummies/"&gt;&lt;em&gt;a quick introduction to code reviews&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, and now we are extending the analogy and applying it to one of the most important tools of our trade: Git. It’s a revolutionary technology that entirely changed the field when it came to be in 2005, and we are going to explain how it works.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Think of &lt;strong&gt;a book&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;How many authors does a book have? One, you say? Not necessarily. Every kind of book, from &lt;a href="https://www.bookdepository.com/Sleeping-Beauties/9781473681286"&gt;fiction&lt;/a&gt; to &lt;a href="https://www.bookdepository.com/Freakonomics/9780061956270"&gt;non-fiction&lt;/a&gt;, from &lt;a href="https://www.bookdepository.com/The-Dead-Are-Arising/9781631491665"&gt;serious journalistic inquiries&lt;/a&gt; to &lt;a href="https://www.bookdepository.com/Good-Omens-Neil-Gaiman/9781473200852?ref=grid-view&amp;amp;qid=1625100862402&amp;amp;sr=1-1"&gt;the most commercial of novels&lt;/a&gt;, can have several authors.&lt;/p&gt;

&lt;p&gt;Let us tell you how collaborating on a book usually happens, and you will understand how Git works.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. You are writing as a team
&lt;/h3&gt;

&lt;p&gt;Let’s say you are writing a book and you have a co-author. Now, in the before-times, when the Internet wasn’t a key part of everything we do, you would probably write down your bit, they would write down theirs, and you would need to either meet physically or exchange documents somehow (mail, a delivery man, etc.) to be able to compare and contrast versions.&lt;/p&gt;

&lt;p&gt;This has a number of problems.&lt;/p&gt;

&lt;p&gt;You can’t work on the same section at the same time, for one. If you want to both work on the same section, one of the writers will have to combine the different documents.&lt;/p&gt;

&lt;p&gt;What happens if an author wants to make a change to a chapter that is already written? What happens if an author makes a lot of changes, and the others dislike it and want to go back to the old text?&lt;/p&gt;

&lt;p&gt;Writing code as a team had many of the same challenges before Git came along. Git is a VCS, or Version Control System.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. A good VCS changes everything
&lt;/h3&gt;

&lt;p&gt;Contemporary writers have Dropbox, Google Docs, and other tools that allow for synchronous work. No one really exchanges paper manuscripts anymore because computers and the Internet make life significantly easier.&lt;/p&gt;

&lt;p&gt;These tools use one form or another of a VCS much like Git.&lt;/p&gt;

&lt;p&gt;If a team of writers is writing their manuscript on, say, Google Docs, they can do a number of things that were impossible in the past, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  All writers can collaborate on the same document at the same time;&lt;/li&gt;
&lt;li&gt;  The main version of the book will always be up-to-date, regardless of changes;&lt;/li&gt;
&lt;li&gt;  Past versions can be accessed easily;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There are plenty of VCSs out there that facilitate development, but Git is definitely the most popular, and it allows developers to do all of these exact same things. The most popular Code Hosting companies using Git are GitHub, GitLab, and BitBucket. Yes, &lt;strong&gt;Git and GitHub are not the same thing&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Keeping track of every line written
&lt;/h3&gt;

&lt;p&gt;When you’re an author working on a book, you are going to take great care with the wording and every choice made. This is every bit as true even if you have co-authors.&lt;/p&gt;

&lt;p&gt;This is why modern VCSs such as Google Docs (which is more than a little bit inspired by VCSs) have a number of features that allow you to keep track of what’s happening while you and everyone else works.&lt;/p&gt;

&lt;p&gt;You can, for instance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Download and upload up-to-date versions of the book;&lt;/li&gt;
&lt;li&gt;  Create alternate/temporary versions of the book which you can share with the other authors;&lt;/li&gt;
&lt;li&gt;  Join temporary versions with the main one;&lt;/li&gt;
&lt;li&gt;  Easily deal with new chapters added while other writers worked on other parts of the book;&lt;/li&gt;
&lt;li&gt;  Go back to older versions in case something was deleted or lost;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But what if a writer particularly likes or dislikes a specific line, section, or chapter, and wants to know who wrote it?&lt;/p&gt;

&lt;p&gt;You can &lt;strong&gt;do that too&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When VCSs came up with the ability to identify the author of every single line of code, this changed things. Now it’s normal.&lt;/p&gt;

&lt;p&gt;Most of the things we’ve listed are taken for granted. They seem like the basic features of any online text editor. Every single one of these features was introduced or made mainstream by Git, though, and every single one was hailed as the key innovation they truly were.&lt;/p&gt;

&lt;p&gt;So now, as a way to break this little analogy we’ve built, here’s some Git terminology and what it compares to:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Writing a book in a team with a VCS&lt;/th&gt;
&lt;th&gt;Writing code in a team with Git&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Book&lt;/td&gt;
&lt;td&gt;Code Project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Book Section or Chapter&lt;/td&gt;
&lt;td&gt;Project Folder or File&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Main version of the book&lt;/td&gt;
&lt;td&gt;&lt;a href="https://git-scm.com/book/en/v2/Git-Branching-Branch-Management"&gt;&lt;code&gt;Main&lt;/code&gt; branch, or &lt;code&gt;Head&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Download the book for the first time&lt;/td&gt;
&lt;td&gt;Check out the project – &lt;a href="https://git-scm.com/docs/git-checkout"&gt;&lt;code&gt;git checkout&lt;/code&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Update the book to the latest version&lt;/td&gt;
&lt;td&gt;Pull changes, or Fetch changes – &lt;a href="https://git-scm.com/docs/git-pull"&gt;&lt;code&gt;git pull&lt;/code&gt;&lt;/a&gt; / &lt;a href="https://git-scm.com/docs/git-fetch"&gt;&lt;code&gt;git fetch&lt;/code&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Temporary version to try new ideas&lt;/td&gt;
&lt;td&gt;Branch – &lt;a href="https://git-scm.com/docs/git-branch"&gt;&lt;code&gt;git branch&lt;/code&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Request to join temporary version to the main&lt;/td&gt;
&lt;td&gt;Pull request, or Merge request – &lt;a href="https://git-scm.com/docs/git-request-pull"&gt;&lt;code&gt;git request-pull&lt;/code&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Join temporary version to the main&lt;/td&gt;
&lt;td&gt;Merge branches, or pull changes to Main branch – &lt;a href="https://git-scm.com/docs/git-merge"&gt;&lt;code&gt;git merge&lt;/code&gt;&lt;/a&gt; / &lt;a href="https://git-scm.com/docs/git-pull"&gt;&lt;code&gt;git pull&lt;/code&gt;&lt;/a&gt; / &lt;a href="https://git-scm.com/docs/git-fetch"&gt;&lt;code&gt;git fetch&lt;/code&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Save changes on the computer&lt;/td&gt;
&lt;td&gt;Commit changes – &lt;a href="https://git-scm.com/docs/git-commit"&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Upload changes to the team server&lt;/td&gt;
&lt;td&gt;Push changes – &lt;a href="https://git-scm.com/docs/git-push"&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Find who wrote a line of text&lt;/td&gt;
&lt;td&gt;&lt;a href="https://git-scm.com/docs/git-blame"&gt;&lt;code&gt;git blame&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
Git terminology






&lt;p&gt;We hope you enjoyed this little foray into Git, and please let us know what topics we can explain next in this &lt;a href="https://reviewpad.com/blog/category/for-dummies/"&gt;“For Dummies” series&lt;/a&gt; in the comments or on Twitter (&lt;a href="https://twitter.com/codereviewpad"&gt;@reviewpad&lt;/a&gt;)!&lt;/p&gt;

</description>
      <category>git</category>
      <category>vcs</category>
    </item>
    <item>
      <title>Git(Hub) Flow, Trunk Based Development, And Code Reviews</title>
      <dc:creator>Adriano Martins</dc:creator>
      <pubDate>Fri, 18 Jun 2021 09:07:01 +0000</pubDate>
      <link>https://dev.to/reviewpad/git-hub-flow-trunk-based-development-and-code-reviews-58ng</link>
      <guid>https://dev.to/reviewpad/git-hub-flow-trunk-based-development-and-code-reviews-58ng</guid>
      <description>&lt;p&gt;&lt;em&gt;The right branching model will improve any team’s collaboration, quality, and speed. The wrong model will do exactly the opposite. These are the 3 most used branching models.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Name a company that develops software, there’s a very high chance they’re are using Git to source control their codebase. Actually, there’s a 77% chance, according to &lt;a href="https://smartbear.com/resources/ebooks/the-state-of-code-review-2020-report" rel="noopener noreferrer"&gt;Smartbear’s State of Code Review 2020 Report&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There’s also a very high chance this company has a code review process in place. An 84% chance according to &lt;a href="https://www.codegrip.tech/code-review-trends-2020/" rel="noopener noreferrer"&gt;Codegrip’s Code Review Trends in 2020 report&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, there isn’t a single standardized methodology to develop software using Git and Code Reviews because it’s highly dependent on the team and the project characteristics. It’s entirely up to the team to choose which methodology better suits their software development needs and goals.&lt;/p&gt;

&lt;p&gt;We’ll go over the 3 main methodologies (also called branching models or branching strategies):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Git Flow&lt;/li&gt;
&lt;li&gt;  GitHub Flow&lt;/li&gt;
&lt;li&gt;  Trunk Based Development&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The original: Git Flow
&lt;/h3&gt;

&lt;p&gt;Rarely a blog post has such an impact in the industry as the one Vincent Driessen published on January 05, 2010, named &lt;a href="https://nvie.com/posts/a-successful-git-branching-model/" rel="noopener noreferrer"&gt;A successful Git branching model&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In his post, Driessen laid out Git Flow, a robust and strict branching model that became the industry standard for software development for years.&lt;/p&gt;

&lt;p&gt;It brought parallel development to the masses, created the perfect conditions for collaborative programming, and it scaled easily.&lt;/p&gt;

&lt;p&gt;With it, many companies managed to grow large and efficient teams and to deploy very complex software.&lt;/p&gt;

&lt;p&gt;With Git Flow, the repository is centered on the &lt;code&gt;main&lt;/code&gt; and &lt;code&gt;develop&lt;/code&gt; branches, and it is supported by &lt;code&gt;feature-n&lt;/code&gt;, &lt;code&gt;release&lt;/code&gt;, and &lt;code&gt;hotfix&lt;/code&gt; branches, as described in this diagram:&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%2Ffs3q763bq555zh9u7faq.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%2Ffs3q763bq555zh9u7faq.png" alt="Git Flow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Code Reviews play an essential part in ensuring the code is up to standard and bug-free when merging &lt;code&gt;feature&lt;/code&gt; branches to the &lt;code&gt;develop&lt;/code&gt; branch.&lt;/p&gt;

&lt;p&gt;Git Flow allows for a very methodic and orchestrated software development but comes at a very high cost:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  the sheer volume of branches and its overhead is a nightmare to maintain&lt;/li&gt;
&lt;li&gt;  teams have to be extremely disciplined otherwise they will end up with long-lived branches impossible to merge&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  The successor: GitHub Flow
&lt;/h3&gt;

&lt;p&gt;With the advent of web apps and continuous delivery, a lighter and faster branching model gained traction: &lt;a href="https://guides.github.com/introduction/flow/" rel="noopener noreferrer"&gt;GitHub Flow&lt;/a&gt;. As you might’ve guessed, it was created and popularized by the very own GitHub.&lt;/p&gt;

&lt;p&gt;It’s centered on the &lt;code&gt;main&lt;/code&gt; and &lt;code&gt;feature&lt;/code&gt; branches. &lt;code&gt;Main&lt;/code&gt; is always releasable. Developers create a new &lt;code&gt;feature&lt;/code&gt; branch to make changes. After reviewing these changes for bugs and code quality they will be deployed to production. If they cause problems, a rollback from &lt;code&gt;main&lt;/code&gt; will take place, otherwise, the &lt;code&gt;feature&lt;/code&gt; branch is merged to the &lt;code&gt;main&lt;/code&gt; branch.&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%2Fuhq3wdkpups6brmuq2ub.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%2Fuhq3wdkpups6brmuq2ub.png" alt="GitHub Flow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Compared to Git Flow, GitHub Flow is much lighter. Maintenance is very low because the only long-lived branch is &lt;code&gt;Main&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;However, GitHub Flow inherits other drawbacks from Git Flow. Undisciplined teams that keep &lt;code&gt;feature&lt;/code&gt; branches open for weeks risk serious problems when trying to merge. Ultimately, a failed merge can leave &lt;code&gt;main&lt;/code&gt; undeployable, and that’s a big red flag for continuous delivery.&lt;/p&gt;

&lt;h3&gt;
  
  
  The shift: Trunk-Based Development
&lt;/h3&gt;

&lt;p&gt;Also going by TBD, Trunk-Based Development is somewhat famously documented at &lt;a href="https://trunkbaseddevelopment.com/" rel="noopener noreferrer"&gt;trunkbaseddevelopment.com&lt;/a&gt;. In this branching model, developers make changes directly in a single branch called &lt;code&gt;trunk&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Trunk&lt;/code&gt; is deployable at all times. Changes should be summited daily. Unfinished features should be unexposed with the help of &lt;a href="https://martinfowler.com/articles/feature-toggles.html" rel="noopener noreferrer"&gt;feature flags&lt;/a&gt;.&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%2Fc7dn60kv59ne02oddsya.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%2Fc7dn60kv59ne02oddsya.png" alt="Trunk-Based Development For Smaller Teams"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Yes, you read it right. It sounds like Yolo Software Development. There are is no code review in TBD, either.&lt;br&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%2Ffdvs83gr5f96nd6559cy.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%2Ffdvs83gr5f96nd6559cy.png" alt="YOLO merge"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The catch is that this method can only work in small teams, with seasoned developers, and pair-programming is highly recommended. The pace is very fast because there is very little, if any, overhead. The team must be very skilled and cautious because everything goes directly to the &lt;code&gt;trunk&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This TBD model is actually officially called &lt;strong&gt;Trunk-Based Development For Smaller Teams&lt;/strong&gt;. Despite its shortcomings, TBD for Smaller Teams is highly regarded by the software development community for its extremely lightweight workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  The seasoned: Scaled Trunk-Based Development
&lt;/h3&gt;

&lt;p&gt;Luckily TBD has another trick up its sleeve: Scaled Trunk-Based Development. In order to operate at scale, this branching model uses short-lived &lt;code&gt;feature&lt;/code&gt; branches with a life span of a few days (maximum) before merging to the &lt;code&gt;trunk&lt;/code&gt;, which is deployable at all times.&lt;/p&gt;

&lt;p&gt;Work in progress should be kept to a minimum, not only to avoid merging problems with long-lived &lt;code&gt;feature&lt;/code&gt; branches, but also to make up for easier and faster code reviews.&lt;/p&gt;

&lt;p&gt;Code reviews will guarantee only quality code is merged to the &lt;code&gt;trunk&lt;/code&gt; and will allow for very early defect detection.&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%2Fse4d7qaizitd1xs3pn6x.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%2Fse4d7qaizitd1xs3pn6x.png" alt="Scaled Trunk-Based Development"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Scale TBD, continuous integration is guaranteed, parallel development is supported, and quality is ensured with simple code reviews. It allows for quicker iterations with fewer errors, and it’s always deployable with very little branch management.&lt;/p&gt;

&lt;h3&gt;
  
  
  Own it!
&lt;/h3&gt;

&lt;p&gt;It goes without saying that each team and/or product might warrant different needs in a branching model. Teams should take extra care choosing one.&lt;/p&gt;

&lt;p&gt;Whichever branching model is chosen, it is very (!) important that it’s crystal clear to every team member what are the rules and steps in the workflow. Without it, any model will fail to bring out the best of the team and the product.&lt;/p&gt;

</description>
      <category>git</category>
      <category>branching</category>
      <category>trunkbaseddevelopment</category>
      <category>codereview</category>
    </item>
    <item>
      <title>Code reviews for dummies</title>
      <dc:creator>Adriano Martins</dc:creator>
      <pubDate>Thu, 03 Jun 2021 16:37:15 +0000</pubDate>
      <link>https://dev.to/reviewpad/code-reviews-for-dummies-5h</link>
      <guid>https://dev.to/reviewpad/code-reviews-for-dummies-5h</guid>
      <description>&lt;p&gt;&lt;em&gt;This blog has dedicated itself to the intricacies of code reviews. We’ve written about best practices, our review-centric philosophy for development, the case for simpler code reviews, and a few more topics of interest. We haven’t, however, taken the time to explain what code reviews are to the non-developers. Now is that time.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Think of &lt;strong&gt;a book&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Do you have one next to you? Do you know how it was made? Let us tell you about editing a book. When we’re done, you’ll know exactly what a code review is.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The author creates a draft
&lt;/h3&gt;

&lt;p&gt;You can’t have a book without a writer, much in the same way that you can’t have code without a developer. The book can be of any kind. It can be a novel, it can be a collection of short stories, or even non-fiction and essays.&lt;/p&gt;

&lt;p&gt;No matter how gifted the author, they can always use the help of a publisher to print and sell the book, but also &lt;strong&gt;an editor&lt;/strong&gt; to work on the text.&lt;/p&gt;

&lt;p&gt;Regardless, it’s up to the writer to produce a draft before they come in. It doesn’t need to be a finished book, by the way. For many publishers, the editor (sometimes two or more) will work right alongside the author throughout the writing process.&lt;/p&gt;

&lt;p&gt;Developing code is similar. The developer creates the code and the reviewer looks it over for inconsistencies, problems, mistakes… Anything, really.&lt;/p&gt;

&lt;p&gt;This is how we see things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Author – Developer;&lt;/li&gt;
&lt;li&gt;  Book – Feature/task the developer is writing code for;&lt;/li&gt;
&lt;li&gt;  Editor – Reviewer assigned to this feature/task;&lt;/li&gt;
&lt;li&gt;  Publisher – The company or team.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. The author edits their own work
&lt;/h3&gt;

&lt;p&gt;“Editing is writing” is an old creative writing slogan that rings quite true. Any author worth their salt will never dump their uncorrected first draft on an editor. They will always go back to work, retrace their footsteps and improve what they’ve done. Ideally, the author will be able to answer any questions the editor asks about their work, and the choices they made.&lt;/p&gt;

&lt;p&gt;In code reviews, every developer should be their own first reviewer, always checking their code while the decisions made are still fresh, so the reviewer will have as easy a task as possible.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The author will hand off the draft
&lt;/h3&gt;

&lt;p&gt;When the author is happy with their work, they will then send it off into the wild. The wild, in this case, is an editor. This is a relationship that is sometimes described as adversarial, with both authors and editors feeling like they should have the last word over the text, because they are, in their own ways, specialists. This is, of course, &lt;strong&gt;pure nonsense&lt;/strong&gt;. It’s in fact an exercise of co-ownership, where both parties profit from the text being of the highest quality.&lt;/p&gt;

&lt;p&gt;One of the hangups people have about code reviews is quite similar to this. Developers, like authors, are fearful of the critiques and suggestions that reviewers and editors send their way, and they feel exposed when their work is in the hands of others.&lt;/p&gt;

&lt;p&gt;There’s no need for this. Reviewing, much like editing, should be about collaboration, not confrontation.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The editor will fix mistakes, but, above all, they will make suggestions
&lt;/h3&gt;

&lt;p&gt;The editor is a second pair of eyes. The author is living inside the world of their writing, which many times is a little too close to see the bigger picture. Someone else that comes in fresh, and is encountering the text for the first time, will be able to see elements that are missing and things that aren’t doing their job properly.&lt;/p&gt;

&lt;p&gt;A reviewer will do the same thing for a codebase. They will find mistakes, of course, but the most important part of the job is to look at the code and try to understand it. To ask questions and make suggestions. The goal is to elevate the work.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. The draft goes right back to the author
&lt;/h3&gt;

&lt;p&gt;This is a moment of great anxiety. The work you put so much into is coming back with &lt;em&gt;gasp&lt;/em&gt; criticism. Comments. Suggestions. It’s wrong, it’s all wrong. It’s terrible. You are a fraud.&lt;/p&gt;

&lt;p&gt;No.&lt;/p&gt;

&lt;p&gt;Of course not. If the editor is good at their job, and sensitive to the idea that the author is another human being who’s doing their best, the comments and suggestions should be light-weight, thoughtful, and humane. Whenever there’s an issue that is a little more complicated to follow, authors are encouraged to get in touch with their editors to discuss them and come up with a joint solution.&lt;/p&gt;

&lt;p&gt;There is no difference for code reviews here. The reviewer and the developer will ideally engage in creative dialogues that will produce solutions that neither of the two could’ve come up with alone.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Time to make changes
&lt;/h3&gt;

&lt;p&gt;Sometimes changes are small, and the first draft only gets slightly altered. Sometimes the editor will find a serious problem that needs a complete rewrite. Most of the time, the result is somewhere in between. The author will select which comments and suggestions to disregard and which to pursue. Some text will be rewritten, some mistakes will simply be fixed.&lt;/p&gt;

&lt;p&gt;In code reviews, the developer will go through the same process. Not all suggestions need to be handled right away (or ever), and the reviewer isn’t the final authority. The suggestions and comments will bring forth new ideas and, ideally, result in a better code.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Do it again
&lt;/h3&gt;

&lt;p&gt;The editing process only culminates when the book is ready to be printed. &lt;strong&gt;Until that printing press starts whirring, changes can and will be made&lt;/strong&gt;. Other people will be proofreading the book as well, not just the original two. Most books will be read by assistant editors and proofreaders as well somewhere along the process, to ensure that as many issues as possible are ironed out.&lt;/p&gt;

&lt;p&gt;Code reviews should be a continuous process as well. As long as the developers are making significant changes to the code, it should be getting reviewed as well. Other reviewers should definitely come in as well, allowing for collective ownership of the codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Never be satisfied
&lt;/h3&gt;

&lt;p&gt;What if the book is printed and you find a mistake? What if you want to update the book with more recent findings? What if you decide the story needs to be expanded? That’s what second, third, etc. printings are for. As long as the book is on the market, edits can and will happen. Expanded editions will be published. Revised editions as well.&lt;/p&gt;

&lt;p&gt;That is the life of software development too. Software needs to be maintained and updated. Much more so than books.&lt;/p&gt;

&lt;p&gt;And where there’s development, there should be reviews.&lt;/p&gt;




&lt;p&gt;Let us know what software development topic you would like to see “for dummies” next!&lt;/p&gt;

</description>
      <category>codereview</category>
    </item>
  </channel>
</rss>
