My Other Sites

Friends

Dynamic Views Waste Time August 4th, 2009

At my current job, we use ClearCase. I must say, for a distributed version control system, it is a pain to use. Mecurial and Git seem far easier to use and are far, far cheaper (free). Not only is the company I’m at spending way too much money for their version control system, they are also using it inefficiently. There have been days wasted where all that was done was mess with the merging and integrating of other people’s check-ins just so that I could get my build to run. And it’s not entirely ClearCase’s fault! Well, I’ll go as far as to say that ClearCase is an enabler. The reason there is always a mess is because of our use of dynamic views.

So let’s say you have two people working on a project. Your partner checks in to a particular branch, and all of a sudden your view on that branch gets instantly updated. Sounds good, you don’t have to constantly update or make sure you’re working with the correct code base as it is automatically updated. Now put yourself in a team of 7-9 people. Say one person checks in but forgets to check in a file or two. 6-8 people now have broken builds and cannot run the program. After some investigation, we find out that someone forgot to check in a few files, and that broke the build. Not too significant of a time-waster.

Now let’s imagine two people check in simultaneously, and the build breaks. Now let’s say that both checked in all of the appropriate files. You now have a situation where no one can run the build, and on top of that, you have to wait for both people who checked in their code to reconcile it and figure out what went wrong. This is particularly bad if say, one of them is ever sick on the next day after checking in code later in the evening. This is not something that has happened to me, although something similar did occur, and it took days for my build to get back up to speed.

If you have your own private branch with ClearCase, steer clear of dynamic views. Honestly, they are far more often a time-waster than anything else. Besides, why would you want to continuously integrate your private development branch? That makes no sense to me. Rather, create another view on the public development branch (or the main branch, whichever you prefer), and then use that to see what changes have been made to the code base. The worst case scenario is that you’ll have to update your private branch, which is OK. At the very least you get to control whether or not you want your build to break.

There was a Community Wiki on Stack Overflow that talks about the strengths and weaknesses of ClearCase. If you want a more in-depth look at what ClearCase does and does not do well, I’d certainly take a look.