Featured Whitepapers
- Forrester Research: Optimizing Globally Distributed Software Development Using Subversion
- An Integrated Approach to Requirements and Quality Management
- Continuous Testing With ElectricCommander
- Agile CMMI at a Large Investment Bank
- Realize Effective Distributed Development Via a Virtual Software Factory
- Build & Deployment Automation for the Lean Economy
Upcoming & Recent Webcasts
- A New Kind of Engineering
- Managing Change in Rugged COTS Systems Development
- Keeping Control of Costs and Schedules When Requirements Change
- Three Simple Things that Will Help You Adopt Agile in Your Enterprise
- Customer speak: Teams, Insights, Results with Quality Driven Software
- Build & Deployment Automation for the Lean Economy
Lean Branching |
| Print | |
| Written by Robert Cowham, Brad Appleton and Steve Berczuk |
| Wednesday, 18 July 2007 10:18 |
|
In our most recent article we looked at the history of Agile SCM and worked towards some revised guidelines and a definition of what it is. This month we want to get a bit more detailed and practical, and because we are not (yet!) writing a book, we are going to restrict ourselves to considering: Applying Lean Principles to Branching and Merging We have reworked Lean Principles for the branching and merging arena.
Metrics for Waste and Whole Process Optimization Principles such as Eliminate Waste, Deliver Fast and Optimize the Whole all benefit from the use of appropriate metrics to measure and track what is happening and allow feedback on the process (Amplify Learning) to be implemented. Useful metrics (this is usually easier in those tools which track such information centrally) include:
Some people use automated scripts and yet with a configuration file which indicates perhaps the current set of active branches to be processed (mined for data). Consider if an appropriate repository structure, or branch naming convention can be used which is sufficiently regular to allow scripts to automatically deduce the presence of new branches by their location in the repository. For example, in tools such as Subversion, Perforce or Team Foundation Server, branches exist in the path space of the repository - make sure their location and the naming standard used is regular enough to be automatable. Task Branches - Help or Hindrance? Task branches are aimed at allowing changes to be made independently from a mainline and merged back as one complete unit. They permit frequent check-ins which may contain value, yet which are perhaps not fully tested and thus risk breaking the mainline. There are many organizations, particularly agile development shops, which do not like to use Task Branches at all due to the perceived overhead of merging changes, and the dangers of delaying changes. They prefer to make all changes on the mainline and to deal with conflicts within the workspace. As we mentioned in our original Branching article [1], there is in fact no difference between resolving a conflict which results from a Private Workspace Update, and the conflict which results from merging between two branches. In the same article we suggested the possibility of branching on conflict (the equivalent of the Private Checkpoint pattern) to ensure that the original workspace version is saved in the repository. This was specifically to address the requirements of an agile project. Automated Merging Between Branches This may seem rather dangerous to many people, and yet it is well worth considering. To be able to do it at all will require good development practices and tools:
The more you keep your change sets small and consistent, and merge each one individually, not in one big lump, the more likely it is that automated merge will be of benefit. In addition, the cleaner the code under development, the easier life will be too! In the worst case scenario a subtle bug might be introduced. Some organizations are so fearful of this that they ban it outright, but bugs happen often enough with ordinary developer changes anyway, so the overall increase in productivity or automated merging (inspite of occasional introduced issues) is likely to be significant (consider appropriate metrics to track this). Chris Berarducci describes the use of automated particularly in maintaining localized versions of a product. While the original article was written in 2003, it is still in use within Palm and of major benefit.
Critical to the "Merge as you go" success are:
There is some similarity with this situation and the centralized code review system which has been implemented by Guido van Rossum at Google [3]. Conclusion Branching and merging are a key practice in Software Configuration Management, and many organizations do not get the best value out of these practices. Applying Lean Principles can make a significant difference to your effectiveness. The principles, and indeed the mindset, are key factors - if you are aware and looking for possibilities to improve your process you will find them (and most of the time they will not be difficult to implement). If you don't look and just rely on your tools support, or individual developers or teams to address this area, you are missing out big time. We are keen to learn of more examples of good practice - let us know and continue to share. References
Set as favorite
Bookmark
Email this
Hits: 5037 Trackback(0)Comments (0)
|
| Last Updated on Tuesday, 01 April 2008 12:54 |


