multiple projects, different goals, one thing in common: the codebase!

Post on 30-Oct-2014

1.394 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Trunk-based development talk given at Agile India 2014 in Bangalore.

TRANSCRIPT

Multiple projects, different goals, one thing in

common: the codebase!

Carlos Lopes@carlosaml

why?

blog.crisp.se

Jon Wolter

ok

a little story

an online store(of whatever)

10

11

12

13

14

15

16

17

18

19

21

22

23

24

what’s next?

26

27

28

29

30

now what?

32

34

HOWEVER

38

43

merge hell

45

a LOT going on for at least months...

46

47

big scary merge before a big scary release

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! }

}

semantic conflict

class BlaBlaBla {

! public void something(Bla bla) {<<<<<<< HEAD! ! bla = bla.plus(14);=======! ! bla = bla.minus(7);>>>>>>> change! ! //other stuff! }

}

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" %>

and so forth

regressions

however...

the loyalty program team learnt something...

merge monkey

59

60

continuous integration?

62

63

how many pipelines for this?

and how effective would they even be?

65

66still need to “integrate”

67

big scary merge

promiscuous integration

martinfowler.com/bliki/FeatureBranch.html

69

how about refactoring?

undeployable code

72

only trunk was releasableat any given time

$$$$$

ok, so what do we do?

“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

“The bigger the apparent reason to branch, the more you

shouldn’t branch.”

Jez Humble / David Farley

“Don't separate differing concerns by using a VCS, use an

abstraction instead.”

Stacy Curl

solutions?

branch bysource controlabstraction

paulhammant.com/blog/branch_by_abstraction.html

trunk-based development

trunk-based development

shopping cart?

trunk-based development

shopping cart?

loyalty program?

if (myFeatureIsOn) {doSomething();}

martinfowler.com/bliki/FeatureToggle.html

featuretoggles/flags/bits

Paul Hammant

iterative

Paul Hammant

big bang

enables refactoringgowebbaby.com/magento-responsive-design/

91

93

always releasable

95

testcoverage

branching patterns

98

99

100

101

102

“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

questions?

top related