Sometimes, You Just Need to Slow Down

    • number and length of sub-branches and unsynchronized work/changes (see Lean branching)

In the context of simple codelines, branching can still make sense. For example, developers can back their workspaces with Private Branches [SCMPatterns] so that they can checkpoint small tasks. The key for the developer branches to be successful is that they are easy to execute, and that they are isolated from the main development stream for as brief a time as possible.

To maintain a simple codeline, you need to do more than to simpy decree that new work must not break existing code. You need a mechanism to validate that the code is still functional, and you need a plan for incrementally "merging" the new functionality into the application. Automated testing is the best and simplest tool for verifing the stability of the code in the face of change.

Testing and SCM
Some challenge whether testing has a role in SCM. Steve gave a talk at a conference recently, and he saw on the feedback forms more than once a comment to he effect that an attendee was disappointed that the talk covered more on testing and build time integration than on branching. It turns out that testing is a central part of SCM.  Consider the definition of CM:

    • Configuration identification
      • Configuration control
        • Configuration status accounting
        • Configuration audit and review

        Automated tests provide the ability to quickly verify that the code performs its desired functionality.  Failing tests provide a clue that something has changed and thus a hint that a configuration item may be incorrect.  More pedantically you can write tests that validate packaging and version constraints. Automated testing, especially that which runs as part of a continuous integration build, can move you towards these functions by helping you verify that the application's functions are as specified and that any change meets some minimal set of criteria around maintaining existing functionality.

        Being able to make changes in an incremental manner requires work on the part of the engineering and architecture teams too, but those who think about SCM can enable this change by providing the infrastructure such and Continuous Integration Environments, testing support, and tools to tie code changes to small stories or requirements that move the project along the way to the new approach incrementally.

        Motivating Example
        Consider a development team that needs to develop a new valuable piece of functionality that requires a potentially disruptive change to the code (for example, an API change). After looking at the work to be done, and doing some preliminary design work, the team estimates that the work will need more than one person and more than a single iteration to complete.  While this functionality is being implemented, other team members will still be working on the active code line.

        The team is familiar with Software Configuration Management Patterns [SCMPatterns] and is considering two options (somewhat related) for this team:

          • Create a task branch for the project. The team would work in a separate development stream, and when everything is working and they're ready to roll out the new feature, the team would integrate with the main development line.
          • Work off the main development line and develop the new features in an incremental manner so that no existing functionaility breaks.

        Let's explore the options in turn.

        Branching: the good, the bad, and the ugly
        A task branch is a traditional SCM solution to handing potentially disruptive change: "Have part of your team perform a disruptive task without forcing the rest of the team to work around them, using a Task Branch."[SCMPatterns] When the work on the task branch is complete,

        About the author

        Brad Appleton's picture
        Brad Appleton

        Brad Appleton is a software CM/ALM solution architect and lean/agile development champion at a large telecommunications company. Currently he helps projects and teams adopt and apply lean/agile development and CM/ALM practices and tools. He is coauthor of the bookSoftware Configuration Management Patterns, a columnist in The CM Journal and The Agile Journal at CMCrossroads.com, and a former section editor for The C++ Report. You can read Brad's blog at blog.bradapp.net.

        About the author

        Steve Berczuk's picture
        Steve Berczuk

        Steve Berczuk is an engineer and ScrumMaster at Humedica where he's helping to build next-generation SaaS-based clinical informatics applications. The author of Software Configuration Management Patterns: Effective Teamwork, Practical Integration, he is a recognized expert in software configuration management and agile software development. Steve is passionate about helping teams work effectively to produce quality software. He has an M.S. in operations research from Stanford University and an S.B. in Electrical Engineering from MIT, and is a certified, practicing ScrumMaster. Contact Steve at steve@berczuk.com or visit berczuk.com and follow his blog at blog.berczuk.com.

        About the author

        Robert Cowham's picture
        Robert Cowham

        Robert Cowham has long been interested in software configuration management while retaining the attitude of a generalist with experience and skills in many aspects of software development. A regular presenter at conferences, he authored the Agile SCM column within the CM Journal together with Brad Appleton and Steve Berczuk. His day job is as Services Director for Square Mile Systems whose main focus is on skills and techniques for infrastructure configuration management and DCIM (Data Center Infrastructure Management) - applying configuration management principles to hardware documentation and implementation as well as mapping ITIL services to the underlying layers.