By Robbert van Os
Posted on 2023-10-07T00:00:00.000Z

Understanding Branching Strategies in Scaling Companies

Unveil the significance of branching strategies in software development with insights drawn from audits at scaling companies. The article sheds light on frequent challenges, offering a keen understanding of how to navigate a complex development environment.

In our experience of auditing scaling companies, we frequently encounter challenges related to software defects making their way into higher environments. The reasons we often hear during discussions with development teams include:

  • Testers lacking the skills to capture defects early.
  • Differences in development and production environments.
  • Lack of adequate test data.
  • Absence of automation.
  • Missing DevOps processes.

Uncovering Root Causes

While many of these reasons may seem plausible, what we often find is that the actual code sometimes never makes it to the higher environment or is overridden by other code. These mishaps are frequently deemed as tester issues, environmental discrepancies, or simply attributed to the software being a monolith, creating a myth of chaotic and poor-quality software.

The Importance of a Branching Strategy

We have found that the root of many of these issues could be as straightforward as implementing a consistent branching strategy for the codebase. Before companies rush to implement the latest buzzwords like Digital Products, Standalone Applications, or AI-driven bots, it's imperative to focus on the basics—namely, branching strategies.

Types of Branches and Their Pitfalls

Branching strategies in software development are methods for managing the parallel development of a codebase. Here are some types and the challenges we often observe:

Master or Main Branch

The Master or Main Branch is the backbone of any codebase, representing the production-ready version of the software. Any changes made to this branch must be thoroughly tested and reviewed.

Anecdote: The Neglected Master We've audited companies where the Master Branch was treated as an afterthought. This oversight led to several production issues, causing stress and requiring rollbacks.

Feature Branch

Feature Branches are created for the purpose of developing new features or fixing bugs.

Anecdote: The Never-Ending Feature In several audits, we've seen teams suffering from "feature creep" where Feature Branches get complicated due to the continuous addition of functionalities, making merging a nightmare.

Release Branch

Release Branches prepare a specific software version and are spun off from the Master Branch.

Anecdote: The Extended Release Cycle We've seen companies with Release Branches that extended beyond reasonable timelines, causing unplanned delays and bloating the release with untested features.

Hotfix Branch

Hotfix branches are created to urgently fix bugs that are critical to production operations.

Anecdote: The Hotfix Chaos In some companies, we've seen hotfixes rushed into production without adequate testing, creating a vicious cycle of new bugs.

Develop Branch

This branch represents the bleeding edge where all the new features and fixes are integrated for testing.

Anecdote: The Cluttered Develop Branch In numerous audits, we found that the Develop Branch becomes a dumping ground for all kinds of changes, destabilizing the entire codebase.

Concluding Thoughts

Automation and DevOps are not magic bullets that automatically improve software quality. They are powerful tools that require clear data and well-thought-out processes to produce meaningful results. A car, no matter how advanced, needs a skilled driver and a clear road map to reach the destination effectively. Similarly, Automation and DevOps tools are only as effective as the people and processes that guide them.

In our audits, we've found that companies with an effective branching strategy often have a more streamlined, quality-centric development process. The consistency it brings allows teams to focus on building new features and enhancing quality, rather than getting caught in the turmoil of merging conflicts and version chaos.

Moreover, an effective branching strategy serves as a backbone for other best practices in DevOps and Continuous Integration/Continuous Deployment (CI/CD). It acts as a catalyst that enables smoother transitions through development stages, quicker releases, and ultimately, more satisfied customers and stakeholders.

It's not uncommon for companies to overlook the basics in the pursuit of rapid innovation. However, foundational elements like branching strategies can't be ignored, as they form the very fabric of a reliable, scalable, and quality-driven software development lifecycle.