David R. Heffelfinger
Thoughts on Distributed Version Control
Some frequently mentioned advantages of distributed version control are that it is not necessary to be connected to the network to commit your changes, and that all repositories are "equal".
Now that I've been using Mercurial for a while, I don't care that much about these advantages, however, there is one thing in Mercurial that I really, really like and that I miss very much when using other, centralized version control systems. What I love about Mercurial is that branching and merging is very simple and trivial (other distributed version control systems like Git and Bazaar probably share this advantage, however I don't have any experience with them).
When using traditional, centralized version control systems such as Subversion or CVS (or, $DEITY forbid, Harvest), many times I have found myself making some changes that will potentially introduce major breakage to the project. In cases like this I am "forced" to work without version control until all the kinks are ironed out, since committing my changes would prevent my coworkers from having a buildable source tree to work from.
The ideal solution for these cases is to create a branch in which I would make my changes safely, without affecting other developers, then when my changes are done merge my branch into the trunk. The problem with this is that for some reason branching and merging are not something "mere mortals" can do with centralized version control system. In order to do this, I would have to talk to a "CM" person to create the branch for me, which would probably take at least a few hours (if not days), then when I'm done the procedure to merge my changes would be just as painful.
When using Mercurial (and, I assume, other distributed version control systems as well), I can create a branch with ease, in Mercurial, all I have to do is use the
hg clone command, passing the path of the repository to clone as a parameter. After doing this I would have my own, private branch that I can work with, without fear of breaking the build and preventing anyone else from making progress.
When I am done, all I have to do is an
hg push to merge my changes back into the "trunk" (or my main branch).
If it turns out that I don't want to make the changes after all, all I need to do is delete my cloned repository using standard operating system commands (
rm -rf in Linux/Unix), and the branch "never existed". This capability of easily making branches for experimental features and simply "nuking" them if it turns out to be a bad idea is what really makes Mercurial great for me. It is a very liberating feeling that I don't think can be expressed in words, you need to experience it to know what I mean.
Posted at 02:03PM Feb 28, 2009 by David R. Heffelfinger in Software Development |
Yet another "My Favorite Firefox Extensions" Post
It seems like every other day there is a link on DZone about someone listing their own favorite Firefox extensions.
Well, I didn't want to be left out, so here are mine:
- Web Developer, provides a lot of functionality useful when developing web applications. One of my favorite features is the ability to outline elements on the page, very useful.
- iMacros, when developing web applications, we often have to go through tedious, repetitive steps to get to the page we are developing. iMacro allows us to record macros to go through the repetitive boring stuff for us, a real time saver and sanity preserver.
Posted at 11:24AM Feb 22, 2009 by David R. Heffelfinger in Software Development |
PDF Unlock Utility
A while back I purchased an ebook in PDF format. When I tried to open it under my Linux laptop I got an unpleasant surprise, the ebook's author had used a font that wasn't available on my Linux box, therefore the ebook was unreadable.
I figured I can simply copy the text and paste it into a text editor or word processor, but to my dismay I found out it wasn't possible to copy text from the PDF.
I had heard about iText, a Java library used to create and manipulate PDF's. I studied the iText API and found out how to make a copy of the PDF with the copy/paste restrictions removed. I wrote some code to try it out, and lo and behold, I was able to copy and paste from my custom copy of the ebook.
I figured that just like I needed to remove those restrictions, many others out there probably had the same problem. I turned my home grown utility into a web application and posted it on my site: http://www.ensode.net/pdf-crack.jsf. It has been helping people remove those annoying restrictions for a while now.,