How To Be More Productive

Posted in Uncategorized on May 12th, 2009 by varikin

At work recently, our team was asked what would make us more productive, then I thought I probably need to start doing more stuff at home like remodeling my house, by the way if you are planning to remodel your house too check this. 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.

Now that I finished all this work, I might try a new SEO technique, yes those techniques are really good for your business. I want to improve the traffic on my blog.

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: ,

Subversion, git, and ignoring files

Posted in Uncategorized on May 3rd, 2008 by varikin

So I have been an SVN user for about 3 years and loved it. I had used CVS before that for a couple years. I never had an issue with it, but all the hype was SVN, so I tried it and liked it. But, there was one thing that always bothered me. How to ignore files. I don’t want to see all my .o files and everything under my build directory when I run svn status. Well to do that you need to specifiy the svn:ignore property on each directory using the propset command and the propget command. It seemed tedious, and painful. I longed for the ignore file from CVS.

Today, I was looking at Git and lo and behold, it has a .gitignore file that I can add files, folders and typeglobs too. It is recursive too! No more setting some property that I have to lookup every time I add a new directory. Today I am switching to git!

Tags: ,