@randomsort
Simulating Git Workflows
Make informed decisions
@randomsort
Johan Abildskov @RandomSort
● Trainer
● Continuous Delivery Consultant
● Git, Jenkins, Gradle, Artifactory ...
@randomsort
● Continuous Delivery
● We’ve migrated a lot of companies to a Git toolchain
● Try to help people become better at delivering software
● Also by teaching the next generation
@randomsort
What brought me here?
@randomsort
Music on Cuba
@randomsort
@randomsort
@randomsort
Continuous Delivery Consultant
I help (primarily embedded) software companies get
better at delivering software.
This includes teaching, consulting, tool development
and a whole lot of arguing.
@randomsort
● We can’t do this here
● NIH-syndrome
● Why should I learn Git? I’m just a software developer
The consultants challenges
@randomsort
● Seeing diverse environments
● Helping people get many “Oh” or “That’s clever”
● Providing people with the opportunity to shine
The consultants rewards
@randomsort
@randomsort
● Taught Git on two continents
● Open-sourced the Git katas
● I do consulting, so I spent a lot of time discussing Git
But I try..
@randomsort
So you are on Git..
@randomsort
● Git flow
● Github Flow
● Pull Requests?
● Automation?
● Simplified Git Workflow
● The Git Development Git flow?!?
Research online
@randomsort
The reality
SVN WAS
BETTER!
@randomsort
ClearCase is very different from Git
Git allows you to work in new ways, to not force you to work a specific way
Own it!
We’re used to working this way
This is our workflow. Now
make it run in Git!
@randomsort
Centralized workflow
● Commit to master
● Push to master
● Pros: Simple few commands
● Cons: Easy to interfere with other developers
● Hard to protect the integrity of the master branch
● “You broke my build!” Or even worse “Who broke my build?”
@randomsort
The Git Flow
@randomsort
Pull request
@randomsort
Git Phlow
Master
ready/iss53
Master
@randomsort
The Git Core Development Git Flow
@randomsort
Git Workflow Dichotomy
@randomsort
I like Numbers
@randomsort
@randomsortSource: https://www.atlassian.com/git/articles/10-years-of-git
@randomsort
DORA says trunk based development
https://puppet.com/resources/whitepaper/state-of-devops-report
@randomsort
@randomsort
Scientific Method(?)
● A
● B
@randomsort
Graph of stuff over time
VALUE
TIME
@randomsort
• Continuous Delivery
• DevOps
• Agile
• Scrum
The buzzwords that drive us
@randomsort
● 1 developer
● No commits
● No deliveries
● How does that look like
Scenario 0:
@randomsort
@randomsort
@randomsort
Overview of Game of Developer Life
@randomsort
Diagrams and stuff ...
@randomsort
This is Diagram
Game Over?
Game Start
Actors Act State updates
@randomsort
● Developers develop
● Game state is reported
● We evaluate if our game should end
Overview of a turn
@randomsort
● Developers
● Future could include robots
○ CI/CD server, etc.
● Strategies for:
○ Working
○ (Unintentionally) Introducing Bugs
○ Committing
○ Delivering
○ Fixing bugs
Actors
@randomsort
● Holds work/value
● Can have a push strategy
Repositories
@randomsort
This is not the real world, but ...
@randomsort
● 1 developer
● Commits value at some frequency
● Never delivers
Scenario 1
@randomsort
@randomsort
Building Inventory
@randomsort
● We have 1 developer
● The developer commits and delivers value at some frequency
● What effect has altering those frequencies
Scenario 3
@randomsort
@randomsort
@randomsort
@randomsort
● Having something in production is better than not having something in
production
So let’s look at the cumulative value
@randomsort
@randomsort
● We have N developers
● The cost of a merge conflict is x
● The probability of a merge conflict is somehow connected to the
amount of work being merge
● What happens if we vary these parameters
Scenario 4
@randomsort
@randomsort
@randomsort
Thank you @figaw
@randomsort
● It’s not about the workflow
● It’s how you work with the workflow
● The right workflow will not fix your broken culture
Conclusions
@randomsort
● Represent tasks?
● Represent automation?
● Context switching?
Future work
@randomsort
• https://github.com/randomsort/gameofdevlife
• Gather weights from your own organization and try stuff out
Do your own experiments
@randomsort
http://opinionatedgit.com
● Twitter/GitHub: RandomSort
● github.com/praqma-training/gitkatas
● github.com/randomsort/gameofdevlife
Please tell me why I’m wrong
@randomsort
● Slides and code will be available on Twitter #gitmerge
Questions?

Simulating Git workflows