Some time ago our project was slowly but surely getting into trouble. At that time we had already spent the two previous weeks on fixing our tests. That weeks promised to be more of the same. We realized that if we would continue like that, we would miss all our deadlines and would be unable to implement and test new features.
What happened? I guess it's a classic problem. Developer A commits changes that break the build. Developer B commits some time later. By the time somebody looks at the problem to many changes have been committed to easily spot the problem. This is not true for all errors, but it is true for some.
Sure, we're using Subversion and continuous integration but these didn't help us very much. Not because they're somehow broken. Our way of working was broken.
So we decided to get a dog to solve our problems. Enter Murphy. Murphy is a cute little dog that we use as our token. Whenever someone wants to commit he or she has to get hold of the token. After committing the token can be passed to another developer.
If Murphy's new owner detects that the last build in CI has failed Murphy is returned to his previous owner, and all commits are off. When the developer corrects the problem and CI is green again we just continue as if nothing happened.[img_assist|nid=604|title=|desc=|link=none|align=right|width=320|height=240]
It may seem that this way of working is troublesome. First, you introduce a lock. Other developers have to wait until they get hold of the token before they can commit their changes. We have seven developers so its OK for us. And the concurrent commits is exactly what we wanted to avoid. I've seen a similar token being used on a project with 30 developers.
But they were all in the same room, so are we. We haven't tried our token system with a remote team. And obviously it wouldn't work. Then again, since Murphy started to help us out we've become much more productive. The build has been broken on several occasions since we use our token but was also immediately fixed.
We've turned off our automatic CI mails. Instead we're using a system tray icon that indicates the status of the latest build. Every developer in our team now gets a fair chance to fix the problems he or she creates. All developers share responsibility to keep the build working. And our progress is as we want it to be.
Thank you Murphy.