Thoughts on technology and innovation
Ted Husted, Release Engineer
"Pour new wine into new wineskins so both can grow together."
The recent generation of version control systems, like Git and Mercurial, have elevated merging to a new level. Systems like Subversion taught us that merging was powerful enough to make "Optimistic Locking a Good Thing". Now, merging has become powerful enough to make "Feature Branches a Good Thing".
A feature branch allows a developer to parallelize the mainline of development, and make a coherent set of changes, while continuously merging with the mainline of development.
On at least a daily basis, the developer can pull in changes from the mainline, to assure that the feature branch does not diverge wildly from the original branch ("origin"). Then, when the feature branch meets the definition of done, it can be merged back into the mainline as a single entity.
Advantages of feature branches
Increase both stability and the freedom to innovate.
Working against the trunk and other alternatives
Consider alternatives proposed by well-meaning critics.
There are folks who recommend that we avoid feature branches and instead work against the trunk, while
Having it all with feature branches
Do it all and often. Feature branches are cheap, easy, and play well with others.
Happily, all of the excellent techniques suggested as feature branch alternatives work even better when used with feature branches. The best idea is to reap all the benefits of feature branches, while, at the same time, hide new features, employ a component architecture, and abstract features behind a pluggable interface. For example, even with feature branches in play, it is a great idea make new features "opt-in" whenever you can, so that each customer can choose when to make it available to its own organization.
At NimbleUser, feature branches have helped us increase quality and velocity while eliminating SNAFUs. Today, I doubt that any of us would want to develop a large product any other way.
For more about Enterprise Development on Force.com, visit DreamOps.org.
Ted Husted is a release engineer for Nimble AMS. "It's my job to make sure that we ship everything that's done, but not before its ready."