Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Multiple projects, different goals, one thing in common: the codebase! at AgileDC 2014

631 views

Published on

Trunk-based development talk given at AgileDC 2014 in Washington, DC.

Published in: Software
  • Be the first to comment

Multiple projects, different goals, one thing in common: the codebase! at AgileDC 2014

  1. 1. Multiple projects, different goals, one thing in common: the codebase! Carlos Lopes @carlosaml
  2. 2. why?
  3. 3. blog.crisp.se
  4. 4. Jon Wolter
  5. 5. ok
  6. 6. a little story
  7. 7. an online store (of whatever)
  8. 8. 10
  9. 9. 11
  10. 10. 12
  11. 11. 13
  12. 12. 14
  13. 13. 15
  14. 14. 16
  15. 15. 17
  16. 16. 18
  17. 17. 19
  18. 18. 21
  19. 19. 22
  20. 20. 23
  21. 21. 24
  22. 22. what’s next?
  23. 23. 26
  24. 24. 27
  25. 25. 28
  26. 26. 29
  27. 27. 30
  28. 28. now what?
  29. 29. 32
  30. 30. 34
  31. 31. HOWEVER
  32. 32. 38
  33. 33. 43
  34. 34. merge hell
  35. 35. a LOT going on for at least months... 45
  36. 36. 46
  37. 37. 47 big scary merge before a big scary release
  38. 38. syntactic conflict class BlaBlaBla { <<<<<<< HEAD public void bla(Bla oldBla, New newBla) { oldBla.bla(); newBla.newBla(); ======= public void bla(Bla oldBla, Other otherBla) { oldBla.bla(); otherBla.otherBla(); >>>>>>> other commit } }
  39. 39. semantic conflict class BlaBlaBla { public void something(Bla bla) { <<<<<<< HEAD bla = bla.plus(14); ======= bla = bla.minus(7); >>>>>>> change //other stuff } }
  40. 40. integration conflicts main.jsp: <%@include file="hello.jspf" %> trunk: new-file.jsp: <%@include file="hello.jspf" %> agivenbranch: hello.jspf => hey.jspf main.jsp: <%@include file="hey.jspf" %>
  41. 41. and so forth
  42. 42. regressions
  43. 43. however...
  44. 44. the loyalty program team learnt something...
  45. 45. merge monkey
  46. 46. 59
  47. 47. 60
  48. 48. continuous integration?
  49. 49. 62
  50. 50. how many pipelines for this? 63
  51. 51. and how effective would they even be?
  52. 52. 65
  53. 53. still need to “integrate” 66
  54. 54. 67 big scary merge
  55. 55. promiscuous integration martinfowler.com/bliki/FeatureBranch.html
  56. 56. 69
  57. 57. how about refactoring?
  58. 58. undeployable code
  59. 59. only trunk was releasable at any given time 72
  60. 60. $$$$$
  61. 61. ok, so what do we do?
  62. 62. “Feature branching is a poor man's modular architecture, instead of building systems with the ability to easy swap in and out features at runtime/ deploytime they couple themselves to the source control providing this mechanism through manual merging.” Dan Bodart
  63. 63. “The bigger the apparent reason to branch, the more you shouldn’t branch.” Jez Humble / David Farley
  64. 64. “Don't separate differing concerns by using a VCS, use an abstraction instead.” Stacy Curl
  65. 65. solutions?
  66. 66. branch by source control abstraction paulhammant.com/blog/branch_by_abstraction.html
  67. 67. trunk-based development
  68. 68. trunk-based development shopping cart?
  69. 69. trunk-based development shopping cart? loyalty program?
  70. 70. if (myFeatureIsOn) { doSomething(); } martinfowler.com/bliki/FeatureToggle.html
  71. 71. feature toggles/flags/bits
  72. 72. martinfowler.com/bliki/BranchByAbstraction.html
  73. 73. Paul Hammant iterative
  74. 74. Paul Hammant big bang
  75. 75. enables refactoring gowebbaby.com/magento-responsive-design/
  76. 76. 91
  77. 77. 93
  78. 78. always releasable
  79. 79. 95
  80. 80. test coverage
  81. 81. branching patterns
  82. 82. 98
  83. 83. 99
  84. 84. 100
  85. 85. 101
  86. 86. 102
  87. 87. paulhammant.com/2013/03/13/facebook-tbd-take-2/
  88. 88. “Feature branching is a poor man's modular architecture, instead of building systems with the ability to easy swap in and out features at runtime/ deploytime they couple themselves to the source control providing this mechanism through manual merging.” Dan Bodart
  89. 89. questions?

×