SlideShare a Scribd company logo
1 of 36
Download to read offline
SPACESHIPS, PULL REQUESTS AND FEATURE BRANCHING
A Principles-Based approach to Software Development
Victor Szoltysek
PULL REQUESTS - BAD *


FEATURE BRANCHING - BAD *
ORIGINAL TITLE:
* More often then we think
HOW IS SPACEX
ACHIEVING THIS ?
Hint: Rocket Design remains largely the same.
Reusable Rockets ?
Space Shuttle


1981
Vertically Landing Rockets ?
DC-X


1993
Stainless Steel Construction
or Liquid Methane Propellent
?
Centaur


1962
Don’t just follow the trend. You may have heard me say that it’s
good to think in terms of the physics approach of first principles.
Which is, rather than reasoning by analogy, you boil things down
to the most fundamental truths you can imagine and you reason
up from there.
Elon Musk (SpaceX)
GOAL
PRINCIPLES
RULES / PRACTICES
SpaceX Starship
Goal : Get Mankind to Mars
Goal : Minimize Cost per Pound of Payload to Orbit
Principle : Optimize for the Whole
Principle : Tight Feedback
Principle : Allow for Failure
STARSHIP DESIGN GOAL
▸ Get Man to the Moon


▸ Minimize Cost per Pound of Payload to Orbit
DRIVING PRINCIPLES (instead of Rules / Practices)
▸ Optimize for the Whole


▸ Tight Feedback


▸ Allow for Failure
WHAT CURRENT “GOOD INTENTIONED”
PROCESS IS STALLING STARSHIP ?


(last launch was March 21 2021)
FAA Environmental Assessment Approval
PULL REQUESTS (The FAA Environmental Assessment of Software)
PULL REQUESTS
▸ Positive Intentions:


▸ Ensure Code Quality


▸ Often Net Negative (as a whole) Outcomes:


▸ “Biked Shedded” Code Reviews


▸ Including Ivory Tower CTO’s that need to nitpick and feel important


▸ Slower Integration Feedback


▸ Refactoring (Code Quality) is Harder


▸ Alternatives Exists !!


▸ If truly required — then I would argue it’s a symptom of a larger problem
FEATURE BRANCHES (LONG LIVED)
FEATURE BRANCHES (LONG LIVED)
▸ Positive Intentions:


▸ Features are fully isolated until ready


▸ Often Net Negative Outcomes:


▸ Slower Integration Feedback


▸ CI often isn’t being run for non-trunk


▸ Increase in Merge Hell


▸ Refactoring (Code Quality) is Harder


▸ Alternatives Exists !!
ALTERNATIVE
WORKFLOW *
* For a typical Agile Team starting from scratch (Green
fi
eld)
SOFTWARE PROJECT GOAL
▸ Make Great Products


▸ Increasing Value ($$), decrease Cost and decrease Risk
DRIVING PRINCIPLES (instead of Rules / Practices)
▸ Optimize for the Whole (think trade-offs)


▸ Tight Feedback (Continuous Integration)


▸ Allow for Failure (but catch issues quicker - MMTD / MTTR)
IN LIEU OF MANDATED PULL REQUESTS
▸ Skip Pull Requests for Trivial Changes


▸ Allow Non-Dev’s / Non-Technical People to Commit


▸ For Trivial Code Review Stuff (Syntax etc) :


▸ Static Code Analysis (local and CI + alerting)


▸ Established “Team Charter” of Best Practices with Team Buy-In


▸ No Code Ownership / “Leave Campsite Cleaner then you Found It”


▸ Refactoring is Signi
fi
cantly easier when you don’t have long lived branches !


▸ Asynchronous Code Reviews ™ after Merge (~weekly) or upon creation of a Release


▸ Optional and Targeted Pull Requests for Review by SMEs


▸ Pair Programming / Mob Code Reviews for Education + Junior Developers
DEALING WITH INTERNAL CORPORATE MANDATES
▸ Do the Pull Request at the Release Branch and NOT Trunk


▸ Add name of second “pair” in commit message when Pair Programming (in lieu
of pull request)
IN LIEU OF FEATURE BRANCHING
▸ Follow Trunk-Based Development


▸ Commit Frequently, including un
fi
nished code


▸ Tag with Story Number - include WIP tag


▸ Code Clean Up / Refactoring is separate


▸ Need to Drop Mandated Pull Requests for this to work


▸ Prefer “Implicit” Feature Flags (should be most of the time)


▸ Focus on detecting and resolving issues quicker (MTTR, MTTR) instead of Perfection


▸ Perfect is the Enemy of Good
STREAMLINING EXISTING PROJECTS
▸ Have a Culture of Psychological Safety and Experimentation


▸ Allow the Questioning of Established Rules / Practices


▸ Run Ef
fi
cient Retrospectives


▸ Try and Measure Process Improvements


▸ Start Small


▸ Make Pull Request Optional for Trivial Changes


▸ Mitigate “Bike Shedding”


▸ Allow PR approvals with no comments


▸ Use Static Code Analysis for Nitpicking


▸ Have a coding standards team charter (with team buy in)


▸ Have purpose to PRs — leverage SME’s and point them in the right direction


▸ Prefer Alternative Code Reviews methods


▸ Pair Programming - Create Psychological Safety for This (leave ego at the door)


▸ Post Merge Code Reviews (asynchronous)


▸ Static Code Analysis


▸ Mob Code Reviews
WHEN TO CONSIDER MANDATED PULL REQUESTS / FEATURE BRANCHING
▸ Open Source Code


▸ Very large teams


▸ Large percentage of Junior Developers (especially offshore)


▸ Consider alternatives (like splitting the code base!)


▸ For Feature Branching — Large Scale Refactoring


▸ Remember to regularly pull from master
OTHER COMMON SOFTWARE PRACTICES TO QUESTION
▸ Kubernetes and Containers


▸ 80% Unit Test Coverage


▸ Microservices


▸ Single Page Apps


▸ Functional Programming


▸ Non-Blocking Asynchronous Programming
THINKING IN PRINCIPLES
Victor Szoltysek


victor_szoltysek@mac.com

More Related Content

More from VictorSzoltysek

Victor's Awesome Retro Deck
Victor's Awesome Retro DeckVictor's Awesome Retro Deck
Victor's Awesome Retro DeckVictorSzoltysek
 
Software Development in Internet Memes
Software Development in Internet MemesSoftware Development in Internet Memes
Software Development in Internet MemesVictorSzoltysek
 
Big Bangs, Monorails and Microservices - Feb 2020
Big Bangs, Monorails and Microservices - Feb 2020Big Bangs, Monorails and Microservices - Feb 2020
Big Bangs, Monorails and Microservices - Feb 2020VictorSzoltysek
 
Making your RDBMS fast!
Making your RDBMS fast! Making your RDBMS fast!
Making your RDBMS fast! VictorSzoltysek
 
SQL Tips + Tricks for Developers
SQL Tips + Tricks for DevelopersSQL Tips + Tricks for Developers
SQL Tips + Tricks for DevelopersVictorSzoltysek
 
Less is more the 7 wastes of lean software development
Less is more   the 7 wastes of lean software developmentLess is more   the 7 wastes of lean software development
Less is more the 7 wastes of lean software developmentVictorSzoltysek
 
Modern day jvm controversies
Modern day jvm controversiesModern day jvm controversies
Modern day jvm controversiesVictorSzoltysek
 
The Future of Java - and a look at the evolution of programming languages
The Future of Java - and a look at the evolution of programming languagesThe Future of Java - and a look at the evolution of programming languages
The Future of Java - and a look at the evolution of programming languagesVictorSzoltysek
 
Client Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future ReplacementClient Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future ReplacementVictorSzoltysek
 
Improving velocity through abstraction
Improving velocity through abstractionImproving velocity through abstraction
Improving velocity through abstractionVictorSzoltysek
 

More from VictorSzoltysek (10)

Victor's Awesome Retro Deck
Victor's Awesome Retro DeckVictor's Awesome Retro Deck
Victor's Awesome Retro Deck
 
Software Development in Internet Memes
Software Development in Internet MemesSoftware Development in Internet Memes
Software Development in Internet Memes
 
Big Bangs, Monorails and Microservices - Feb 2020
Big Bangs, Monorails and Microservices - Feb 2020Big Bangs, Monorails and Microservices - Feb 2020
Big Bangs, Monorails and Microservices - Feb 2020
 
Making your RDBMS fast!
Making your RDBMS fast! Making your RDBMS fast!
Making your RDBMS fast!
 
SQL Tips + Tricks for Developers
SQL Tips + Tricks for DevelopersSQL Tips + Tricks for Developers
SQL Tips + Tricks for Developers
 
Less is more the 7 wastes of lean software development
Less is more   the 7 wastes of lean software developmentLess is more   the 7 wastes of lean software development
Less is more the 7 wastes of lean software development
 
Modern day jvm controversies
Modern day jvm controversiesModern day jvm controversies
Modern day jvm controversies
 
The Future of Java - and a look at the evolution of programming languages
The Future of Java - and a look at the evolution of programming languagesThe Future of Java - and a look at the evolution of programming languages
The Future of Java - and a look at the evolution of programming languages
 
Client Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future ReplacementClient Technical Analysis of Legacy Software and Future Replacement
Client Technical Analysis of Legacy Software and Future Replacement
 
Improving velocity through abstraction
Improving velocity through abstractionImproving velocity through abstraction
Improving velocity through abstraction
 

Spaceships, Pull Requests and Feature Branching - A Principles-Based approach to Software Development

  • 1. SPACESHIPS, PULL REQUESTS AND FEATURE BRANCHING A Principles-Based approach to Software Development Victor Szoltysek
  • 2. PULL REQUESTS - BAD * FEATURE BRANCHING - BAD * ORIGINAL TITLE: * More often then we think
  • 3.
  • 4.
  • 5.
  • 7. Hint: Rocket Design remains largely the same.
  • 10. Stainless Steel Construction or Liquid Methane Propellent ? Centaur 1962
  • 11. Don’t just follow the trend. You may have heard me say that it’s good to think in terms of the physics approach of first principles. Which is, rather than reasoning by analogy, you boil things down to the most fundamental truths you can imagine and you reason up from there. Elon Musk (SpaceX)
  • 14. Goal : Get Mankind to Mars
  • 15. Goal : Minimize Cost per Pound of Payload to Orbit
  • 16. Principle : Optimize for the Whole
  • 17. Principle : Tight Feedback
  • 18. Principle : Allow for Failure
  • 19. STARSHIP DESIGN GOAL ▸ Get Man to the Moon ▸ Minimize Cost per Pound of Payload to Orbit DRIVING PRINCIPLES (instead of Rules / Practices) ▸ Optimize for the Whole ▸ Tight Feedback ▸ Allow for Failure
  • 20. WHAT CURRENT “GOOD INTENTIONED” PROCESS IS STALLING STARSHIP ? (last launch was March 21 2021)
  • 22. PULL REQUESTS (The FAA Environmental Assessment of Software)
  • 23. PULL REQUESTS ▸ Positive Intentions: ▸ Ensure Code Quality ▸ Often Net Negative (as a whole) Outcomes: ▸ “Biked Shedded” Code Reviews ▸ Including Ivory Tower CTO’s that need to nitpick and feel important ▸ Slower Integration Feedback ▸ Refactoring (Code Quality) is Harder ▸ Alternatives Exists !! ▸ If truly required — then I would argue it’s a symptom of a larger problem
  • 24.
  • 26. FEATURE BRANCHES (LONG LIVED) ▸ Positive Intentions: ▸ Features are fully isolated until ready ▸ Often Net Negative Outcomes: ▸ Slower Integration Feedback ▸ CI often isn’t being run for non-trunk ▸ Increase in Merge Hell ▸ Refactoring (Code Quality) is Harder ▸ Alternatives Exists !!
  • 27. ALTERNATIVE WORKFLOW * * For a typical Agile Team starting from scratch (Green fi eld)
  • 28. SOFTWARE PROJECT GOAL ▸ Make Great Products ▸ Increasing Value ($$), decrease Cost and decrease Risk DRIVING PRINCIPLES (instead of Rules / Practices) ▸ Optimize for the Whole (think trade-offs) ▸ Tight Feedback (Continuous Integration) ▸ Allow for Failure (but catch issues quicker - MMTD / MTTR)
  • 29. IN LIEU OF MANDATED PULL REQUESTS ▸ Skip Pull Requests for Trivial Changes ▸ Allow Non-Dev’s / Non-Technical People to Commit ▸ For Trivial Code Review Stuff (Syntax etc) : ▸ Static Code Analysis (local and CI + alerting) ▸ Established “Team Charter” of Best Practices with Team Buy-In ▸ No Code Ownership / “Leave Campsite Cleaner then you Found It” ▸ Refactoring is Signi fi cantly easier when you don’t have long lived branches ! ▸ Asynchronous Code Reviews ™ after Merge (~weekly) or upon creation of a Release ▸ Optional and Targeted Pull Requests for Review by SMEs ▸ Pair Programming / Mob Code Reviews for Education + Junior Developers
  • 30. DEALING WITH INTERNAL CORPORATE MANDATES ▸ Do the Pull Request at the Release Branch and NOT Trunk ▸ Add name of second “pair” in commit message when Pair Programming (in lieu of pull request)
  • 31. IN LIEU OF FEATURE BRANCHING ▸ Follow Trunk-Based Development ▸ Commit Frequently, including un fi nished code ▸ Tag with Story Number - include WIP tag ▸ Code Clean Up / Refactoring is separate ▸ Need to Drop Mandated Pull Requests for this to work ▸ Prefer “Implicit” Feature Flags (should be most of the time) ▸ Focus on detecting and resolving issues quicker (MTTR, MTTR) instead of Perfection ▸ Perfect is the Enemy of Good
  • 32.
  • 33. STREAMLINING EXISTING PROJECTS ▸ Have a Culture of Psychological Safety and Experimentation ▸ Allow the Questioning of Established Rules / Practices ▸ Run Ef fi cient Retrospectives ▸ Try and Measure Process Improvements ▸ Start Small ▸ Make Pull Request Optional for Trivial Changes ▸ Mitigate “Bike Shedding” ▸ Allow PR approvals with no comments ▸ Use Static Code Analysis for Nitpicking ▸ Have a coding standards team charter (with team buy in) ▸ Have purpose to PRs — leverage SME’s and point them in the right direction ▸ Prefer Alternative Code Reviews methods ▸ Pair Programming - Create Psychological Safety for This (leave ego at the door) ▸ Post Merge Code Reviews (asynchronous) ▸ Static Code Analysis ▸ Mob Code Reviews
  • 34. WHEN TO CONSIDER MANDATED PULL REQUESTS / FEATURE BRANCHING ▸ Open Source Code ▸ Very large teams ▸ Large percentage of Junior Developers (especially offshore) ▸ Consider alternatives (like splitting the code base!) ▸ For Feature Branching — Large Scale Refactoring ▸ Remember to regularly pull from master
  • 35. OTHER COMMON SOFTWARE PRACTICES TO QUESTION ▸ Kubernetes and Containers ▸ 80% Unit Test Coverage ▸ Microservices ▸ Single Page Apps ▸ Functional Programming ▸ Non-Blocking Asynchronous Programming
  • 36. THINKING IN PRINCIPLES Victor Szoltysek victor_szoltysek@mac.com