SlideShare a Scribd company logo
Feature branches and toggles
in a post-GitHub world
Devoxx Poland 2017
Sam Newman
@samnewman@devoxxpl
Sam Newman &
Associates
@samnewman@devoxxpl
Sam Newman
Building
Microservices
DESIGNING FINE-GRAINED SYSTEMS
@samnewman@devoxxpl
2004
@samnewman@devoxxpl
@samnewman@devoxxpl
to
Banbury
Oxford
Reading
High Wycombe
London Marylebone
to
Luton
St Albans
London St Pancras
Rugby
Milton Keynes
Central
Watford Junction
London Euston
Bedford
Wolverton
Fenny Stratford
Bow Brickhill
Woburn Sands
Aspley Guise
Ridgmont
Lidlington
Watford North
Garston
Bricket Wood
How Wood
Park Street
St Albans Abbey
Millbrook
Stewartby
Kempston Hardwick
Bedford St Johns
Bletchley
Leighton Buzzard
Cheddington
Tring
Berkhamsted
Hemel Hempstead
Apsley
Kings Langley
Bushey
Harrow & Wealdstone
Wembley Central
wick
Coventry
Leamington
Spa
Northampton
Long Buckby
Coventry
Arena
@samnewman@devoxxpl
to
Banbury
Oxford
Reading
High Wycombe
London Marylebone
to
Luton
St Albans
London St Pancras
Rugby
Milton Keynes
Central
Watford Junction
London Euston
Bedford
Wolverton
Fenny Stratford
Bow Brickhill
Woburn Sands
Aspley Guise
Ridgmont
Lidlington
Watford North
Garston
Bricket Wood
How Wood
Park Street
St Albans Abbey
Millbrook
Stewartby
Kempston Hardwick
Bedford St Johns
Bletchley
Leighton Buzzard
Cheddington
Tring
Berkhamsted
Hemel Hempstead
Apsley
Kings Langley
Bushey
Harrow & Wealdstone
Wembley Central
wick
Coventry
Leamington
Spa
Northampton
Long Buckby
Coventry
Arena
@samnewman@devoxxpl
to
Banbury
Oxford
Reading
High Wycombe
London Marylebone
to
Luton
St Albans
London St Pancras
Rugby
Milton Keynes
Central
Watford Junction
London Euston
Bedford
Wolverton
Fenny Stratford
Bow Brickhill
Woburn Sands
Aspley Guise
Ridgmont
Lidlington
Watford North
Garston
Bricket Wood
How Wood
Park Street
St Albans Abbey
Millbrook
Stewartby
Kempston Hardwick
Bedford St Johns
Bletchley
Leighton Buzzard
Cheddington
Tring
Berkhamsted
Hemel Hempstead
Apsley
Kings Langley
Bushey
Harrow & Wealdstone
Wembley Central
wick
Coventry
Leamington
Spa
Northampton
Long Buckby
Coventry
Arena
@samnewman@devoxxpl
to
Banbury
Oxford
Reading
High Wycombe
London Marylebone
to
Luton
St Albans
London St Pancras
Rugby
Milton Keynes
Central
Watford Junction
London Euston
Bedford
Wolverton
Fenny Stratford
Bow Brickhill
Woburn Sands
Aspley Guise
Ridgmont
Lidlington
Watford North
Garston
Bricket Wood
How Wood
Park Street
St Albans Abbey
Millbrook
Stewartby
Kempston Hardwick
Bedford St Johns
Bletchley
Leighton Buzzard
Cheddington
Tring
Berkhamsted
Hemel Hempstead
Apsley
Kings Langley
Bushey
Harrow & Wealdstone
Wembley Central
wick
Coventry
Leamington
Spa
Northampton
Long Buckby
Coventry
Arena
@samnewman@devoxxpl
R3
@samnewman@devoxxpl
R3
@samnewman@devoxxpl
R3
R4
@samnewman@devoxxpl
R3
R4
@samnewman@devoxxpl
R3
R4
@samnewman@devoxxpl
R3
R4
@samnewman@devoxxpl
R3
R4
@samnewman@devoxxpl https://www.flickr.com/photos/jubilo/6965626176/
@samnewman@devoxxpl
R3-R4 Merge Bug Fix Team
@samnewman@devoxxpl
R3-R4 Merge Bug Fix Team
yay
@samnewman@devoxxpl
Continuous Integration
@samnewman@devoxxpl
@samnewman@devoxxpl
@samnewman@devoxxpl
CI Tool
@samnewman@devoxxpl
CI Tool
!
@samnewman@devoxxpl
CI Tool
! "
@samnewman@devoxxpl
@samnewman@devoxxpl
@samnewman@devoxxpl
!
@samnewman@devoxxpl
! !
@samnewman@devoxxpl
! !
1. Validate the integration
@samnewman@devoxxpl
! ! "
1. Validate the integration
@samnewman@devoxxpl
! ! "
2. When the build breaks, fix it!
1. Validate the integration
@samnewman@devoxxpl
! ! " !
2. When the build breaks, fix it!
1. Validate the integration
@samnewman@devoxxpl
! ! " !
2. When the build breaks, fix it!
1. Validate the integration
…
@samnewman@devoxxpl
! ! " !
2. When the build breaks, fix it!
1. Validate the integration
…
@samnewman@devoxxpl
! ! " !
2. When the build breaks, fix it!
1. Validate the integration
…
"
"
"
"
@samnewman@devoxxpl
! ! " !
2. When the build breaks, fix it!
3. Integrate daily
1. Validate the integration
…
"
"
"
"
@samnewman@devoxxpl
R3
R4
@samnewman@devoxxpl
R3
R4
! ! !
@samnewman@devoxxpl
R3
R4
! ! !
! ! !
@samnewman@devoxxpl
R3
R4
! ! !
! ! !
@samnewman@devoxxpl
Integrate Once A Day
@samnewman@devoxxpl
How can you deal with
half-finished work?
@samnewman@devoxxpl
Option 1:
@samnewman@devoxxpl
Option 1:
Wait to check in
@samnewman@devoxxpl
Option 2:
@samnewman@devoxxpl
Option 2:
Make a branch!
@samnewman@devoxxpl
Trunk
@samnewman@devoxxpl
Trunk
@samnewman@devoxxpl
Trunk
F1
@samnewman@devoxxpl
Trunk
F1
@samnewman@devoxxpl
Trunk
F1
@samnewman@devoxxpl
Trunk
F1
F2
@samnewman@devoxxpl
Trunk
F1
F2
@samnewman@devoxxpl
Trunk
F1
F2
@samnewman@devoxxpl
Trunk
F1
F2
@samnewman@devoxxpl
Trunk
F1
F2
@samnewman@devoxxpl
we are deferring integration!
Trunk
F1
F2
@samnewman@devoxxpl
Pain of merge = fn (
size_of_merge,
duration_since_last_merge)
@samnewman@devoxxpl
Big merges = commit race!
@samnewman@devoxxpl
Merging refactoring is
*really* hard
@samnewman@devoxxpl
Option 3:
@samnewman@devoxxpl
Option 3:
Check in anyway
@samnewman@devoxxpl
Option 3:
Check in anyway
err…wat?
@samnewman@devoxxpl
Trunk-based development
@samnewman@devoxxpl
Everyone integrates into trunk
@samnewman@devoxxpl
Trunk
@samnewman@devoxxpl
Trunk
@samnewman@devoxxpl
integrate often…
Trunk
@samnewman@devoxxpl
integrate often…
Trunk
…fast feedback…
@samnewman@devoxxpl
integrate often…
Trunk
…fast feedback…
…break up merge pain
@samnewman@devoxxpl
integrate often…
Trunk
…fast feedback…
…break up merge pain
err…but what about half-finished features?
@samnewman@devoxxpl
Feature Toggles
@samnewman@devoxxpl
Feature Toggles
Hide the partially
implemented feature in
the running system
@samnewman@devoxxpl
…
super_widget = off
…
@samnewman@devoxxpl
…
super_widget = off
…
…
super_widget = on
…
@samnewman@devoxxpl
…
super_widget = off
…
…
super_widget = on
…
super widget!
@samnewman@devoxxpl
…
super_widget = off
…
…
super_widget = on
…
$. run -Dsuper_widget=on
super widget!
@samnewman@devoxxpl
…
super_widget = off
…
…
super_widget = on
…
$. run -Dsuper_widget=on
super widget!
@samnewman@devoxxpl
But what about changes to existing
functionality?
@samnewman@devoxxpl
@samnewman@devoxxpl
iBatis
Persistence
@samnewman@devoxxpl
iBatis
Persistence
@samnewman@devoxxpl
iBatis
Persistence
shipping every two
weeks…
@samnewman@devoxxpl
iBatis
Persistence
Hibernate
shipping every two
weeks…
@samnewman@devoxxpl
iBatis
Persistence
Abstraction
Hibernate
shipping every two
weeks…
@samnewman@devoxxpl
iBatis
Persistence
Abstraction
Hibernate
shipping every two
weeks…
@samnewman@devoxxpl
iBatis
Persistence
Abstraction
Hibernate
shipping every two
weeks…
@samnewman@devoxxpl
iBatis
Persistence
Abstraction
Hibernate
shipping every two
weeks…
@samnewman@devoxxpl
iBatis
Persistence
Abstraction
Hibernate
shipping every two
weeks…
@samnewman@devoxxpl
Abstraction
Hibernate
shipping every two
weeks…
@samnewman@devoxxpl
Branch by abstraction
@samnewman@devoxxpl
Important Rules:
@samnewman@devoxxpl
Important Rules:
Use a flag in as few places as possible
@samnewman@devoxxpl
Important Rules:
Use a flag in as few places as possible
Remove them once you’re done
@samnewman@devoxxpl
Side Benefits:
@samnewman@devoxxpl
Side Benefits:
Can be used for A/B testing
@samnewman@devoxxpl
Side Benefits:
Can be used for A/B testing
And with some work, canary releasing
@samnewman@devoxxpl
split.io, launch darkly
@samnewman@devoxxpl
@samnewman@devoxxpl
@samnewman@devoxxpl
https://trunkbaseddevelopment.com
@samnewman@devoxxpl
Continuous Delivery Book…
@samnewman@devoxxpl
Published in 2011
@samnewman@devoxxpl
Treat every check-in as
a release candidate
@samnewman@devoxxpl
https://www.slideshare.net/jallspaw/ops-metametrics-the-currency-you-pay-for-change-4608108
@samnewman@devoxxpl
Ops Meta-Metrics - John Allspaw
@samnewman@devoxxpl
Ops Meta-Metrics - John Allspaw
@samnewman@devoxxpl
Keep batch size small
@samnewman@devoxxpl
Integrate often
Keep batch size small
@samnewman@devoxxpl
Integrate often
Keep batch size small
Ship often
@samnewman@devoxxpl
And there there was Git
@samnewman@devoxxpl
@samnewman@devoxxpl
Goal
@samnewman@devoxxpl
Goal
Merge a patch in less than 3 seconds
@samnewman@devoxxpl
Branches much more lightweight
@samnewman@devoxxpl
Merging of text is better but…
@samnewman@devoxxpl
https://www.semanticmerge.com
@samnewman@devoxxpl
And then there was GitHub…
@samnewman@devoxxpl
2008
@samnewman@devoxxpl
https://github.com/blog/3-oh-yeah-there-s-pull-requests-now
@samnewman@devoxxpl
https://vimeo.com/2979844
@samnewman@devoxxpl
https://vimeo.com/2979844
@samnewman@devoxxpl
http://readwrite.com/2011/06/02/github-has-passed-sourceforge/
@samnewman@devoxxpl
But PRs use branching!
@samnewman@devoxxpl
Open Source
@samnewman@devoxxpl
Open Source
“Untrusted” Committers
@samnewman@devoxxpl
And then there was gitflow…
@samnewman@devoxxpl
@samnewman@devoxxpl https://www.flickr.com/photos/hackny/8675049276/
@samnewman@devoxxpl
Ops Meta-Metrics - John Allspaw
@samnewman@devoxxpl
But if I merge in frequently,
why do I need GitFlow?
@samnewman@devoxxpl
@samnewman@devoxxpl
“Trunk-based development is likely the most controversial
practice discussed in this book
@samnewman@devoxxpl
“Trunk-based development is likely the most controversial
practice discussed in this book
- Gene Kim, Jez Humble, Patrick Debois & John Willis
[…]
However, the data from Puppet Labs’ 2015 State of DevOps
Report is clear: trunk-based development predicts higher
throughput and better stability, and even higher job
satisfaction and lower rates of burnout.“
@samnewman@devoxxpl
@samnewman@devoxxpl
“We found that having branches or forks with very short
lifetimes (less than a day) before being merged into trunk, and
less than three active branches in total, are important aspects
of continuous delivery, and all contribute to higher
performance. So does merging code into trunk or master on a
daily basis. “
- State Of Devops Report, 2016
@samnewman@devoxxpl
So are branches evil?
@samnewman@devoxxpl
Keep batch size small
@samnewman@devoxxpl
Integrate often
Keep batch size small
@samnewman@devoxxpl
Integrate often
Keep batch size small
Ship often
@samnewman@devoxxpl
http://samnewman.io
@samnewman
Thank You!
Also thanks to Don Clark for the people icons
https://commons.wikimedia.org/wiki/File:Gender_neutral.svg CC BY-SA 4.0

More Related Content

PDF
remote.itをDragino LoRaWANゲートウェイで利用する方法
PDF
LoRaWAN 対応温度・湿度センサ LHT65 ユーザーマニュアル
PDF
LoRaWANエアークオリティセンサLAQ4日本語マニュアル
PPTX
【配信!Veeam情報局】バックアップ容量の最適化、ストレージ節約や拡張方法を解説!
PDF
屋外向け 8chLoRaWANゲートウェイ DLOS8 日本語マニュアル
PPTX
Azure DataLake 大全
PDF
LoRaWAN Shield LA66日本語マニュアル
PDF
Cisco asa 5545 datasheet
remote.itをDragino LoRaWANゲートウェイで利用する方法
LoRaWAN 対応温度・湿度センサ LHT65 ユーザーマニュアル
LoRaWANエアークオリティセンサLAQ4日本語マニュアル
【配信!Veeam情報局】バックアップ容量の最適化、ストレージ節約や拡張方法を解説!
屋外向け 8chLoRaWANゲートウェイ DLOS8 日本語マニュアル
Azure DataLake 大全
LoRaWAN Shield LA66日本語マニュアル
Cisco asa 5545 datasheet

What's hot (11)

PDF
【ウェブセミナー】マネージドな 100% OSS アナリティクス プラットフォーム HDInsight の最新事情
PDF
ビルトインサーバー LoRaWANゲートウェイ LPS8 v2カタログ
PPTX
Disaster recovery center & ha
PDF
Jupyter notebook を用いた文芸的インフラ運用のススメ
PDF
Dragino USB LoRaWANアダプター LA66 日本語マニュアル
PDF
Oracle Database Applianceのご紹介(詳細)
PDF
SX1302屋外8ch.LoRaWAN ゲートウェイ DLOS8Nマニュアル
PDF
LoRaWANウェザーステーション カタログ
PDF
エルスピーナヴェインズ株式会社・会社概要
PPT
Cisco nexus 7009 overview
PDF
ビルトインサーバーLoRaWANゲートウェイ LPS8v2日本語ユーザーマニュアル
【ウェブセミナー】マネージドな 100% OSS アナリティクス プラットフォーム HDInsight の最新事情
ビルトインサーバー LoRaWANゲートウェイ LPS8 v2カタログ
Disaster recovery center & ha
Jupyter notebook を用いた文芸的インフラ運用のススメ
Dragino USB LoRaWANアダプター LA66 日本語マニュアル
Oracle Database Applianceのご紹介(詳細)
SX1302屋外8ch.LoRaWAN ゲートウェイ DLOS8Nマニュアル
LoRaWANウェザーステーション カタログ
エルスピーナヴェインズ株式会社・会社概要
Cisco nexus 7009 overview
ビルトインサーバーLoRaWANゲートウェイ LPS8v2日本語ユーザーマニュアル
Ad

Similar to Feature Branches And Toggles In A Post-GitHub World (20)

PDF
Software Mistakes and Tradeoffs 1st Edition Tomasz Lelek
PDF
SQL Server DevOps Jumpstart
PDF
Trunk based development
PPTX
Creating and Maintaining an Open Source Library
PPTX
Agility Requires Safety
PDF
How open source is driving DevOps innovation: CloudOpen NA 2015
PPTX
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
PPTX
DevOps Overview
PDF
Scaling a Serverless Developer Platform for Teams
PPTX
Openstack: An Open Source Cloud Framework
PDF
Introduction to DevOps
PDF
Dealing with large code bases. cd ams meetup
PDF
Open Developer Platform: What Is It and Why Should I Care? Maurizio Pillitu
PPTX
Crafting Better Git Commits
PPTX
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
PDF
How to improve the quality of your application
PDF
Getting Git Right
PPTX
Introduction to DevOps
PDF
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
PDF
Simplified DevOps Bliss -with OpenAI API
Software Mistakes and Tradeoffs 1st Edition Tomasz Lelek
SQL Server DevOps Jumpstart
Trunk based development
Creating and Maintaining an Open Source Library
Agility Requires Safety
How open source is driving DevOps innovation: CloudOpen NA 2015
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Overview
Scaling a Serverless Developer Platform for Teams
Openstack: An Open Source Cloud Framework
Introduction to DevOps
Dealing with large code bases. cd ams meetup
Open Developer Platform: What Is It and Why Should I Care? Maurizio Pillitu
Crafting Better Git Commits
Devoxx 2016 Using Jenkins, Gerrit and Spark for Continuous Delivery Analytics
How to improve the quality of your application
Getting Git Right
Introduction to DevOps
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
Simplified DevOps Bliss -with OpenAI API
Ad

More from Sam Newman (20)

PDF
Hiding The Lead: Coupling, cohesion and microservices
PDF
It's a trap!
PDF
Rip It Up - The Microservice Organisation
PDF
What Is This Cloud Native Thing Anyway?
PDF
Confusion In The Land Of The Serverless - 90min Version
PDF
AppSec and Microservices
PDF
Confusion In The Land Of The Serverless
PDF
AppSec & Microservices - Velocity 2016
PDF
AppSec And Microservices
PDF
Deploying and Scaling Microservices
PDF
BETA - Securing microservices
PDF
Principles of microservices ndc oslo
PDF
Principles of microservices velocity
PDF
QCon Sao Paulo Keynote - Microservices, an Unexpected Journey
PDF
Principles of microservices XP Days Ukraine
PDF
Testing & deploying microservices - XP Days Ukraine 2014
PDF
Principles of Microservices - NDC 2014
PDF
Practical microservices - NDC 2014
PDF
Practical microservices - javazone 2014
PDF
Testing & deploying Microservices GeeCon 2014
Hiding The Lead: Coupling, cohesion and microservices
It's a trap!
Rip It Up - The Microservice Organisation
What Is This Cloud Native Thing Anyway?
Confusion In The Land Of The Serverless - 90min Version
AppSec and Microservices
Confusion In The Land Of The Serverless
AppSec & Microservices - Velocity 2016
AppSec And Microservices
Deploying and Scaling Microservices
BETA - Securing microservices
Principles of microservices ndc oslo
Principles of microservices velocity
QCon Sao Paulo Keynote - Microservices, an Unexpected Journey
Principles of microservices XP Days Ukraine
Testing & deploying microservices - XP Days Ukraine 2014
Principles of Microservices - NDC 2014
Practical microservices - NDC 2014
Practical microservices - javazone 2014
Testing & deploying Microservices GeeCon 2014

Recently uploaded (20)

PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
Transform Your Business with a Software ERP System
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Cost to Outsource Software Development in 2025
PDF
System and Network Administraation Chapter 3
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Digital Strategies for Manufacturing Companies
PDF
System and Network Administration Chapter 2
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
medical staffing services at VALiNTRY
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
Introduction to Artificial Intelligence
Operating system designcfffgfgggggggvggggggggg
Design an Analysis of Algorithms I-SECS-1021-03
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Transform Your Business with a Software ERP System
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Cost to Outsource Software Development in 2025
System and Network Administraation Chapter 3
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PTS Company Brochure 2025 (1).pdf.......
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Understanding Forklifts - TECH EHS Solution
Digital Strategies for Manufacturing Companies
System and Network Administration Chapter 2
Odoo Companies in India – Driving Business Transformation.pdf
top salesforce developer skills in 2025.pdf
medical staffing services at VALiNTRY
CHAPTER 2 - PM Management and IT Context
Introduction to Artificial Intelligence

Feature Branches And Toggles In A Post-GitHub World