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

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

  • 1.
    SPACESHIPS, PULL REQUESTSAND 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
  • 6.
  • 7.
    Hint: Rocket Designremains largely the same.
  • 8.
  • 9.
  • 10.
    Stainless Steel Construction orLiquid Methane Propellent ? Centaur 1962
  • 11.
    Don’t just followthe 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)
  • 12.
  • 13.
  • 14.
    Goal : GetMankind to Mars
  • 15.
    Goal : MinimizeCost per Pound of Payload to Orbit
  • 16.
    Principle : Optimizefor the Whole
  • 17.
  • 18.
    Principle : Allowfor 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 “GOODINTENTIONED” PROCESS IS STALLING STARSHIP ? (last launch was March 21 2021)
  • 21.
  • 22.
    PULL REQUESTS (TheFAA Environmental Assessment of Software)
  • 23.
    PULL REQUESTS ▸ PositiveIntentions: ▸ 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
  • 25.
  • 26.
    FEATURE BRANCHES (LONGLIVED) ▸ 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 * * Fora 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 OFMANDATED 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 INTERNALCORPORATE 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 OFFEATURE 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
  • 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 CONSIDERMANDATED 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 SOFTWAREPRACTICES TO QUESTION ▸ Kubernetes and Containers ▸ 80% Unit Test Coverage ▸ Microservices ▸ Single Page Apps ▸ Functional Programming ▸ Non-Blocking Asynchronous Programming
  • 36.
    THINKING IN PRINCIPLES VictorSzoltysek victor_szoltysek@mac.com