Branches are for Trees. How to develop software without them.

787 views

Published on

Chris Bushell, ThoughtWorks, September 2010

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
787
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Branches are for Trees. How to develop software without them.

  1. 1. Branches  are  for  trees.  How  to  develop  so4ware  without  them.   Chris  Bushell.  September  2010.  
  2. 2. Feature  branching   Merge   Commit   F1   Release   F2   F3  
  3. 3. What’s  the  problem?  
  4. 4. Trunk  development   Commit   Release  
  5. 5. Breaking  changes  
  6. 6. Branch  by  abstracIon   1  –  Introduce  an  abstracIon  over  area  of  the  system  you  want  to  change   2  –  Update  all  code  to  rely  on  the  abstracIon   3  –  Make  a  new  implementaIon  of  the  abstracIon   4  –  Remove  the  old  implementaIon   5  –  Remove  the  abstracIon  if  it’s  inelegant  
  7. 7. Cherry  picking  
  8. 8. Toggles/flippers/flags/bits  
  9. 9. Advantages   •   Decouples  code  deployment  from  feature   •   No  need  to  roll  back  a  release,  just  disable  problemaIc  feature   •   A/B  tesIng   •   Private  betas  e.g.  turn  on  a  feature  for  5%  of  users   •   Dark  launches   •   ConInuous  deployment/delivery    
  10. 10. Things  to  keep  in  mind…..   •   Complexity  and  overhead  explosion  if  toggles  aren’t  acIvely  decommissioned   •   Don’t  overload  toggles  e.g.  enItlements  (totally  different  life  spans)   •   Just  because  a  feature  is  dormant  doesn’t  mean  quality  is  not  as  important   •   Avoid  coupling  features  e.g.  feature  b  can  only  be  enabled  if  feature  a  is  enabled      
  11. 11. Conclusion   •   Branching  in  VCS  isn’t  bad     •   Long  lived  branches  in  VCS  are  bad   •   Working  in  isolaIon  for  prolonged  periods  of  Ime  is  bad     •   There’s  always  another  way,  it  just  might  require  some  careful  thought  and  design      
  12. 12. References   •   hap://marInfowler.com/bliki/FeatureBranch.html     •   hap://paulhammant.com/blog/branch_by_abstracIon.html     •   hap://www.se-­‐radio.net/2008/09/episode-­‐109-­‐ebays-­‐architecture-­‐principles-­‐with-­‐ randy-­‐shoup/     •   hap://velocityconference.blip.tv/file/2284377  (Flickr,  10+  releases  per  day)     •   hap://www.infoq.com/presentaIons/Feature-­‐Bits   •   ImplemenIng  Lean  So4ware  Development:  From  Concept  To  Cash,  Mary   Poppendieck,  Tom  Poppendieck    

×