How To Be More Productive

At work recently, our team was asked what would make us more productive. I said drop ClearCase and embrace something, anything better. My manager asked what Git (my preferred tool) has to offer that would make us more productive. I replied with the normal things like generally faster and branching.

Today’s Lack of Productivity:

A coworker and I were working on something that had to be added to another group’s code. We had about 4 new files and 4 changed files. The procedure is to create a branch, check-in, have the other group review, and merge to main. Due to the painfulness of branches in ClearCase, we had been hijacking the files and emailing them between ourselves for a couple days. Today was the day to bite the bullet and create the branch.

The ClearCase Process:

We created the branch with the command:

cleartool mkbrtype -nc -pbranch my-shiny-new-branch

Then we updated our config specs to pull in files off the branch and to add files to the branch when checking out. Then we waited 30 minutes for our views to update. Then I tried to checkout a file I had changed to the new branch. The branch didn’t exist on the VOB. We had accidently created the branch on the wrong VOB. Time to run the command to create the branch again but in the correct VOB.  At this time, I checked out some files I had hijacked and check them in on the new branch.

Then I move on to the new files. I checked out a directory and tried to add one file to ClearCase. It sort of succeeded, except where it lost my file. Any time I tried asking ClearCase the status of the file or directory, it complained that the file is not specified in my config spec, so it can’t tell me anything. It lost my file! I couldn’t check-in, I couldn’t delete it, and try again (never try this with ClearCase, it does not like it). I pulled up my dynamic view, played around with the config spec for a bit, and still didn’t find the file. I went back to the snapshot view and checked in the folder. Now the dynamic view could find the file. It was not on the branch and it was empty. I updated the config spec so it I could check it out in the dynamic view onto the branch. I copied everything into the file, and checked it in. Updated the folder on the snapshot view, and viola, my file appeared.

I spend another 45 minutes fiddling away like this with the rest of the files. One by one, adding them through the slow as molasses dynamic view, updating a folder in the snapshot view.

The last thing I had to do was recompile everything and test to ensure I got the right versions of every file checked in. Then I sent an email to my manager telling her how this is much easier in Git.

The Git Process:

We started with some new files and some changed files. From there I could run following commands:

git branch my-shiny-new-branch
git checkout my-shiny-new-branch
git commit -a

And then celebrate the wonderfulness of Git!

The Ultimate Conclusion:

Branching is incredibly difficult in ClearCase. I had a mistake in my config spec; I was missing “element * /main/0″ at the bottom, and I lost over 2 hours because of it. If I had been using Git, I would not need a config spec, I could branch lightening fast, and be done in 5 minutes. Even if I ran into no problems in ClearCase, it was still an hour task! I doubt we will move off of ClearCase anytime soon, but it I can feel the rumble of a change coming. I just hope it is for the better.

Note: I prefer Git, but I have nothing against the other VCS; I just want to be done with ClearCase.

Tags: ,

4 Responses to “How To Be More Productive”

  1. KeHoeff Says:

    hey this is a very interesting article!

  2. Charles O'Farrell Says:

    I feel your pain John. I too have to suffer Clearcase at work.

    If its of any interest I’ve written a Git/Clearcase bridge which may alleviate (some) of the pain.

    http://blog.charleso.org/2008/10/clearcase-for-git.html

    The biggest problem I’m having now is convincing the person in charge of our SCM the benefits of using something like Git. His argument against things like speed is that: in the end it’s not going to change how fast you produce quality software. While I can’t fault that argument specifically, it doesn’t take into consideration an intangible thing like developer happiness. I think part of the problem is that he’s not a developer and so he doesn’t have to deal with Clearcase on a day-by-day, minute-by-minute basis. *sigh*

  3. toomyem Says:

    Don’t blame CC for your lack of knowledge. Missing /main/0 is your fault. CC can’t checkout element if it is not visible by any rule. I’m playing with CC for over 8 years and find the config-spec-idea very convenient and powerful.

  4. Emil Says:

    Just found this post when googling around for a way to emulate config specs in git.. and the reason for this being that git is completely useless when it comes to most tasks that involve more than one tiny team of developers. I’ve been using ClearCase at the last three work places, but here it’s git, and I waste pretty much the same amount of time you claim to have lost to CC’s “problems” just crying and banging my head against the wall trying to figure out just why git has to be so painfully inept.

    Anyway, to each his own I guess, but you should probably work on your argumentation if you really want to get rid of CC since what toomyem said holds true: the problems you had existed between the keyboard and the chair, not within CC :P