Slide 1

Slide 1 text

Trunk Based Development David Tiago Conceição Involves Android Dev BR @davidtiagocon

Slide 2

Slide 2 text

Opinionated Branches & Processes Trunk Based Development Heads Up

Slide 3

Slide 3 text

SVN As origens

Slide 4

Slide 4 text

SVN

Slide 5

Slide 5 text

SVN

Slide 6

Slide 6 text

Centralized Version Control System Long lived branches No planning Merge hell Inconsistencies SVN

Slide 7

Slide 7 text

git

Slide 8

Slide 8 text

Distributed Version Control System Lightweight branches Branches A lot of branches git

Slide 9

Slide 9 text

Long lived branches Waiting Branch from Branch Absence of planning Branches

Slide 10

Slide 10 text

Branches

Slide 11

Slide 11 text

Branches

Slide 12

Slide 12 text

Branches https://twitter.com/HenryHoffman/status/694184106440200192

Slide 13

Slide 13 text

Branches

Slide 14

Slide 14 text

Branches trunk/master

Slide 15

Slide 15 text

Branches /feature/a

Slide 16

Slide 16 text

Branches /feature/a

Slide 17

Slide 17 text

Branches /feature/a

Slide 18

Slide 18 text

Branches /feature/b Cool refactor

Slide 19

Slide 19 text

Branches ??? /feature/c

Slide 20

Slide 20 text

Branches Latest Release

Slide 21

Slide 21 text

Branches /hotfix/1

Slide 22

Slide 22 text

Branches

Slide 23

Slide 23 text

Branches

Slide 24

Slide 24 text

A successful Git branching model

Slide 25

Slide 25 text

A successful Git branching model

Slide 26

Slide 26 text

The great epiphany https://www.youtube.com/watch?v=ZmRwralIW74

Slide 27

Slide 27 text

The great epiphany Photo by Hugo Rocha on Unsplash ==

Slide 28

Slide 28 text

The great epiphany Photo by Hugo Rocha on Unsplash

Slide 29

Slide 29 text

Trunk Based Development Master Based Development TBD TBD Roots

Slide 30

Slide 30 text

Trunk and only trunk No feature branches No Pull Requests No manual blockers TBD Roots

Slide 31

Slide 31 text

https://trunkbaseddevelopment.com TBD Roots

Slide 32

Slide 32 text

Tools and Techniques TBD Roots

Slide 33

Slide 33 text

Small tasks Pair/Mob programming TDD Tools and Techniques

Slide 34

Slide 34 text

Automation Continuous Integration Continuous Deploy Staged Releases Tools and Techniques

Slide 35

Slide 35 text

Modules Microservices Branch by abstraction Feature flags Tools and Techniques

Slide 36

Slide 36 text

Mono repo Tools and Techniques

Slide 37

Slide 37 text

1. Small tasks 2. Pair/Mob programming 3. TDD 4. Automation 5. Continuous Integration 6. Continuous Deploy 7. Staged Releases 8. Modules 9. Microservices 10. Branch by abstraction 11. Feature flags 12. Mono repo 13. ... Tools and Techniques

Slide 38

Slide 38 text

Consequences TBD Roots

Slide 39

Slide 39 text

Organization and planning Controlled WIP Increased Throughput Consequences

Slide 40

Slide 40 text

Constant Feedback Autonomy Consequences

Slide 41

Slide 41 text

Minimal conflicts Refactor Scale Consequences

Slide 42

Slide 42 text

Evolving to TBD roots Short Lived Branches Really short Organization and Planning Real Life TBD

Slide 43

Slide 43 text

Support tools 1. Small tasks 2. Pair/Mob programming 3. TDD 4. Automation 5. Continuous Integration 6. Continuous Deploy 7. Staged Releases 8. Modules 9. Microservices 10. Branch by abstraction 11. Feature flags 12. Mono repo 13. ... Real Life TBD

Slide 44

Slide 44 text

Support tools 1. Small tasks 2. Pair/Mob programming 3. TDD 4. Automation 5. Continuous Integration 6. Continuous Deploy 7. Staged Releases 8. Modules 9. Microservices 10. Branch by abstraction 11. Feature flags 12. Mono repo 13. ... Real Life TBD

Slide 45

Slide 45 text

Many Questions Real Life TBD

Slide 46

Slide 46 text

Can I merge? How to split a task? How to merge fast(er) ? How to test? How to gather feedbacks? Many Questions

Slide 47

Slide 47 text

Ideal WIP? Overhead? Merge blockers? Many Questions

Slide 48

Slide 48 text

More automation? Does it scale? Many Questions

Slide 49

Slide 49 text

Consequences Real Life TBD

Slide 50

Slide 50 text

Organization and planning Controlled WIP Increased Throughput Constant Feedback Autonomy Minimal conflicts Refactor Scale Consequences

Slide 51

Slide 51 text

Samples Real Life TBD

Slide 52

Slide 52 text

New Sync Rebranding Update Android SDK Samples

Slide 53

Slide 53 text

App Updater Logstash Samples

Slide 54

Slide 54 text

Samples

Slide 55

Slide 55 text

Samples

Slide 56

Slide 56 text

Questions and Comments

Slide 57

Slide 57 text

How to know more? 1. Tech Talk: Linus Torvalds on git: https://www.youtube.com/watch?v=4XpnKHJAok8 2. A successful Git branching model: https://nvie.com/posts/a-successful-git-branching-model/ 3. A Branching Strategy Simpler than GitFlow: Three-Flow: https://www.nomachetejuggling.com/2017/04/09/a-different-branching-strategy/ 4. How Chromium Works: https://medium.com/@aboodman/in-march-2011-i-drafted-an-article-explaining-how-the-te am-responsible-for-google-chrome-ships-c479ba623a1b 5. Trunk Based Development: https://trunkbaseddevelopment.com/ 6. Game Changers: https://trunkbaseddevelopment.com/game-changers/ 7. GitFlow considered harmful: https://www.endoflineblog.com/gitflow-considered-harmful 8. Remote feature flags do not always come for free: https://proandroiddev.com/remote-feature-flags-do-not-always-come-for-free-a372f1768a7 0 9. BranchByAbstraction: https://martinfowler.com/bliki/BranchByAbstraction.html

Slide 58

Slide 58 text

slack.AndroidDevBR.org Android Dev BR

Slide 59

Slide 59 text

Thank you! David Tiago Conceição [email protected] Android Dev BR @davidtiagoconceicao twitter.com/@davidtiagocon speakerdeck.com/davidtcdeveloper