Software Craftsmanship Lille Meetup 201805 - Feature Branching is Evil

Software Craftsmanship Lille Meetup 201805 - Feature Branching is Evil

Pour ce meetup, on accueille Thierry de Pauw (@tdpauw) pour une présentation sur les problématiques associées aux "features branches".
Qui je pense concernent la plupart d'entre nous.

Voici la description de la présentation en anglais, langue dans laquelle celle-ci aura lieu :

Feature branching is again gaining in popularity due to the rise of Distributed Version Control Systems (DVCS). Although branch creation became very easy with DVCSs, it comes with a certain cost. Long living branches break the flow of the software delivery process impacting throughput and stability.

This session explores some of the reasons teams are using feature branches for, what problems are introduced by using feature branches and what techniques exist to avoid them all together. In conclusion it explores what exactly is evil about feature branching. Which is not necessarily the problems they introduce. But rather the real reasons teams are using them for.

The key takeaway is an appreciation of a different branching strategy and how it relates to Continuous Integration.

L'audience visée par cette présentation est toutes personnes utilisant un logiciel de gestion de version (git, mercurial, tfs, ...) dans un contexte de "Continuous Integration" ou "Continuous Delivery".


Thierry de Pauw

May 03, 2018


  1. @tdpauw @tdpauw Feature Branching is Evil Software Craftsmanship

    Lille - May 2018 Thierry de Pauw, @tdpauw
  2. @tdpauw A tale of 2 teams

  3. @tdpauw “Like all powerful tools, there are many ways

    you can use them (DVCS), and not all of them are good.” -- On DVCS, continuous integration, and feature branches, Jez Humble
  4. @tdpauw -- 2016 State of DevOps Report

  5. @tdpauw Some definitions ...

  6. @tdpauw Mainline is the line of development which is

    the reference from which the builds of your system are created that feed into your deployment pipeline. -- Jez Humble
  7. @tdpauw Feature Branching is a practice where people do

    not merge their code into mainline until the feature they are working on is "done" (but not “done done”). -- Jez Humble
  8. @tdpauw Continuous Integration is a practice to ensure always

    working software, and to get feedback within a few minutes as to whether any given change broke the application. -- Jez Humble
  9. @tdpauw The goal of an Organisation is to sustainably

    minimise the lead time to create positive business impact.
  10. @tdpauw Why long-running branches ?

  11. @tdpauw We can work in isolation which makes us

    more productive.
  12. @tdpauw "Developing in isolation can help an individual go

    faster but it does not help a team go faster. Merge time and rework cannot be estimated and will vary wildly, and the team can only go as fast as the slowest merge." -- Steve Smith
  13. @tdpauw If a refactoring goes nowhere we can just

    delete it.
  14. @tdpauw “A spike solution is a very simple program

    to explore potential solutions. Build the spike to only address the problem under examination and ignore all other concerns. Most spikes are not good enough to keep, so expect to throw it away.” --, Don Wells
  15. @tdpauw We can control the quality of what goes

    into production.
  16. @tdpauw "The objective is to eliminate unfit release candidates

    as early in the process as we can ... You are effectively prevented from releasing into production builds that are not thoroughly tested and found to be fit for their intended purpose." -- Continuous Delivery, Jez Humble and Dave Farley
  17. @tdpauw We can control which features get into production.

  18. @tdpauw "Feature Branching is a poor man's modular architecture,

    instead of building systems with the ability to easy swap in and out features at runtime/deploy-time they couple themselves to the source control providing this mechanism through manual merging." -- Dan Bodart
  19. @tdpauw Why is this a problem ?

  20. @tdpauw Feature Branching delays feedback. => Continuous Isolation

  21. @tdpauw Feature Branching hinders integration of features. Promiscuous Integration

  22. @tdpauw Feature Branching hides work for the rest of

    the team. frequently merging back to mainline = communicating with your team
  23. @tdpauw Feature Branching works against refactoring.

  24. @tdpauw Feature Branching creates inventory. inventory = money stuck

    in the system
  25. @tdpauw Feature Branching increases risk.

  26. @tdpauw Feature Branching creates all lot of overhead.

  27. @tdpauw How can we avoid this ?

  28. @tdpauw Continuous Integration Your application is always in a

    releasable state on main line. Trunk Based Development
  29. @tdpauw Break large changes into a set of small

    incremental changes. always commit on Green. decoupled code base. lots of fast tests.
  30. @tdpauw Hide unfinished new functionality.

  31. @tdpauw Use Branch by Abstraction when performing large refactorings.

  32. @tdpauw

  33. @tdpauw Feature Toggles to decouple feature release from code

  34. @tdpauw -- Feature Toggles, Pete Hodgson -

  35. @tdpauw Feature Toggles done badly are evil too !

  36. @tdpauw Questions I get asked

  37. @tdpauw How big should a User Story be ?

    Deliver business value in an as small increment as possible. Implemented by a set of commits.
  38. @tdpauw How to perform Code Reviews ? Pair Programming

    => pre-commit review post-commit review • pre-merge: short lived branches + Pull Request • post-merge: review all commits on mainline
  39. @tdpauw Benefit

  40. @tdpauw More frequent commits to mainline => more frequent

    builds => more frequent deployments => reduced Time to Market => more experiments
  41. @tdpauw Where is the evilness ?

  42. @tdpauw … and slow builds

  43. @tdpauw @tdpauw Hello, I am Thierry de Pauw

    Continuous Delivery coach XP and Lean Software Engineer with affinity for operations Founder of ThinkingLabs shy, introvert, imposter syndrome, opinionated likes dark chocolate and black coffee dark means > 50% cacao, prefers 70%
  44. @tdpauw Resources SCM Patterns (ch 4 Mainline; ch 5

    Active Development Line), Stephen Berczuk Continuous Delivery (ch 14 Advanced Version Control), Jez Humble and Dave Farley The Role of Continuous Delivery in IT and Organizational Performance, Nicole Forsgren and Jez Humble The State of DevOps Report 2016, Alanna Brown, Nicole Forsgren, Jez Humble, Nigel Kersten and Gene Kim DevOps Handbook (ch 11 Enable and Practice CI), Gene Kim, Jez Humble, Patrick Debois and John Willis ThoughtWorks Technology Radar on GitFlow Continuous Integration on a dollar a day, James Shore On DVCS and Continuous Delivery, Jez Humble Why software development methodologies suck, Jez Humble Don't Feature Branch, Dave Farley Feature Branch, Martin Fowler Version Control Stragies series, Steve Smith More Feature Branches means less Continuous Integration, InfoQ interview with Steve Smith The Death of Continuous Integration, Steve Smith
  45. @tdpauw More Resources Long-Running Branches Considered Harmfull, Jade Rubick

    An e-mail conversation with Steve Smith on Trunk Based Development Continuous Isolation, Paul Hammant What is Trunk Based Development ?, Paul Hammant Trunk Based Development, Jon Arild Tørresdal You Are What You Eat, Dave Hounslow Google's Scaled Trunk Based Development, Paul Hammant Legacy App Rejuvenation, Paul Hammant Why Google Stores Billions of Lines of Code in a Single Repository ?, Google Growing Object Oriented Software guided by Tests, p172 Keyhole Surgery for Software, Steve Freeman and Nat Pryce The history of “Taking Baby Steps”, Adrian Bolboaca Baby Steps TDD approach, David Völkel Introducing Branch by Abstraction, Paul Hammant Branch by Abstraction, Martin Fowler
  46. @tdpauw Even More Resources Make Large Scale Changes Incrementally

    with Branch by Abstraction, Jez Humble Feature Toggles, Pete Hodgson When Feature Flags go Wrong, Edith Harbaugh 4 Simple Tricks to avoid Merge Conflicts, Robert Mißbach From GitFlow to Trunk Based Development, Robert Mißbach Short-lived branches, Corey Haines Continuous Delivery and Code Review from the Continuous Delivery Google Group Theory X and Theory Y from Wikipedia Continuous Review, Paul Hammant Non-Continuous Review, Paul Hammant Code Review: Why are we doing it ?, Sandro Mancuso Code Reviews in Trunk Based Development, Robert Mißbach A conversation in the SoCraTes Slack #codereview channel on … Code Reviews and Trunk Based Development