Book Review – Pragmatic Version Control Using Git

Review published at DZone: http://books.dzone.com/reviews/book-review-pragmatic-version

I believe one must have a reasonable acquaintance with at least the three big guns in version control for open source, Subversion, known as SVN (non distributed), Mercurial and GIT.
Pragmatic Version Control Using Git The Pragmatic Starter Kit-Volume 1 By: Travis Swicegood ©2008 ISBN-10: 1-934356-15-8 Publisher: The pragmatic Bookshelf Raleigh, North Carolina, Dallas Texas. $34.95. note that this is version 1.0 of the book, version 2.0 just came out. We are still trying to determine from the publisher if version 2 is out, they say no but the web site says yes?

Git is rapidly becoming the major opensource distributed version control system (DVCS) of choice for many major projects. Competitors such as Mercurial and Bazzar (both DVCS) are important and SVN remains as a major centralized VCS. It has become quite necessary to have at least a basic understanding of each of these systems if you are active in the Open source world. Of these systems arguably the most complex is and comprehensive is git.

Git was originated by Linus Torvalds to help manage the distributed development and merge processes involved with the maintenance of the Linux kernel. It is something of a rite of passage for open source developers to become sufficiently fluent with its use.

The basic documentation on the net and even Linus’s famous talk (available on you tube) got me started but I still have been feeling a bit lost.

While this book is targeted at rank beginners there is plenty here for the advanced user. It succeeds admirably in providing information for all levels of users.

As someone quite new to Git, I found this book to be very well laid out and it has a huge virtue of making no assumptions! I believe that much of the other material I attempted to learn from made big assumptions either about Version Control knowledge from other systems or just plain skipped over concepts and presented raw commands, leaving it to the reader to determine how and when to use what command.

The book gently starts out describing the general case of version control and rapidly introduces clear cogent explanations of how git differs from centralized systems. At the same time the introductory portions of the book use basic examples to introduce versions of various concepts along with the related commands.

I found myself saying often as I read, oh! that’s the way it works!

I also found myself trying to understand more about some of the actual mechanics. This is where another great feature of the book came to the rescue for me. Each chapter has a Git hub repository which you can access to try out each concept or command that is being discussed. That filled in a few holes for me, specifically, for instance, what state is the working directory in and how does a command affect the working directory.

For me the book rates about a 8.5 out of 10, the only thing that might have improved it for me would have been some Tortoise Git explanation. I could also use more on setting up your own repository on various services. This criticism is unfair since Tortoise Git really only became viable after the book was put to bed and there is simply too many variables between hosting providers to cover that point adequately. The material presented is a definite help getting started with the task and I’ll have the book open as I start to work on that for myself. The book also has a web site which has errata, and other comments which may prove helpful http://www.pragprog.com/titles/tsgit/pragmatic-version-control-using-git

Eclipse/App Engine/Bloog Part 4, The hard part

Well I had a long and frustrating week/week-end, all sort of run together. I discovered that my new site would not take even moderately long articles. This is apparently a “known problem” and it relates to exploding indexes, as somewhat explained here.

I finally got to corresponding with one of the Bloog Maintainers who had it turned out created a modified site search capability using Google Site Search. According to him  it still does not provide for longer article without some code mods that I have not yet started. But is a prerequisite. I got a copy from Git-hub, where Bloog is hosted. This required that I get and install GIT version control system. I chose to start with Windows based  Git Extensions. It still required that you install the basic GIT. It is only available in Tar format you will need 7zip to unpack although after a posting the developer has now provided a “full” option for Git extensions.

I then tried to apply the new code to my existing Bloog version as I had modified it. That required a differential editor,which I did not have Kdiff3 turned out to be a great choice. It compares entire directory structures and than lets you click through the files and selectively choose to apply a, b to your revised file. Very cool.

I then tried to fire things up, FAIL. I then went back to the Version I had just obtained and I could not get it to fire up either. I then started to look for “real” debug information. Not much available.

Eventually I downloaded PYdev for Eclipse, and that was a major improvement  my entire development environment. In fact I would go so far to say Do not attempt development for APP-Engine without Pydev!! It provides a much better editor, code outlining and a runtime environment. There are several tutorials on setting up Eclipse for app-engine. Use them!!! Supposedly it also provides breakpoints, but I have not been able to get that working yet, but the other improvements are a major joy. The Debug environment did give me better log messages. Through which I was eventually able to make some headway. I found out that the two versions had changed the DB schema slightly so I had to delete a few older records You can see and modify the local datastore using http://localhost:8080/_ah/admin/datastore and bang it all started to work. It actually took a long time to go through each step, and I still have to go back and learn each of the new tools much better.

A Survey of Free Software

One of the most vibrant areas of software development world is the free/open source software movement. A big reason to learn and use Freeware and Web 2.0 software is most of it is available free.

Most people think primarily of Linux when using this term but there is a much larger eco system. You have to do some research and trial and error since you won’t see a bunch of ads around (it’s free remember) Actually the “free” part is the biggest Ad.!

The movement covers most “normal” functional areas of software, from

Web 2.0 services,

  • E-mail, MSN, Gmail, Other Google services,
  • Web hosting, Blogs: WordPress.com, Blogger, others,
  • Regular web hosting, Microsoft Live. Microsoft live does not get much respect but is a very rich offering , now up to 25 GB of space and web site, automatic file backup/synchronization, blogs, picture storage, collaborative workspace and more.
  • Google app engine is so big and multifaceted I have not yet started to use it, and it’s free.

It is a bit hard to find the good and distinguish from the bad, many Google search results are pretty confusing. I generally have to poke around a bit in a regular Google search to find the host site as opposed to some fly-by-night site. You really want to “know” what you are looking for, find reviews and make sure that you are getting the “original” product. I am including links in this paper to most of the key products which I mention.

For instance I wanted to use Eclipse a major free Software development platform,. I figured I would need the Linux operating system. I downloaded and installed the Ubuntu version of Linux and configured it to “dual boot on my machine. One of it’s features is an automatic software installer, which is very cool, just click what you want and the operating system downloads and installs the software. Unfortunately, it did not work for Eclipse, I later found out that the version that Ubuntu had in it’s repositories was out of data. A direct download from the Eclipse site rand fine, in the process I also discovered that almost all of the freeware I was interested in was available in Windows, it was not just a Linux phenomenon! In fact most freeware is pretty platform independent, this is because the developers are very conscious of wanting to appeal to all audiences and since most of the software is built using freeware tools themselves which incorporated “cross-platform” libraries.

Some of the software and systems fall into the category of, “some assembly required”. While if you get everything from Microsoft, you can generally expect it all to work together right out of the box. Well, sometimes not quite that easy. In the free software arena you may very well be getting numerous pieces from separate vendors to work nicely together. In my case Mysql, JDBC driver, Birt report writer, query browser, Eclipse, Subversion, and Heidi SQL. In general the process is not too painful, and the online support community is very responsive, more so that the “Normal” vendors. You may often hear directly from the developer. Learning each products support methods is a bit of a chore but the more you do the more they all begin to feel very similar.

Sometimes documentation can be an issue a project called Floss manuals is a relatively new attempt to address the issue, check out the site free manuals for freeware.

I started to document my journey to the brave new software world. Wait! you say, its not new, and well you may be right! But it is new to me and from poking around in the process of learning it it seems that it is new to a lot of other people also.

I began by setting up a web site on Microsoft Live. Located at Http://TomBrander.com which hosts information about my real estate statistical consulting services. While Microsoft is not normally associated with great web stuff, this product is a wonderful exception. I got it when they were still handing out free domain registration, which sadly they have discontinued, now its something like $14.95 per year. However, the hosting remains free. You can get a free subdomain (like http://myname.live.com) and still get completely operational for free. Since, as some have pointed out, search is the most common way to find information now on the web. I don’t think the lack of a full domain registration is the handicap it once was, Google does index top level domains better, I hear, though.

I also incorporated a Blog hosted here at WordPress, a free service, http://tbrander.wordpress.com and incorporated into the main site via Iframes. I also maintain a Tech blog which will have this posted on it as well at https://tombrander.wordpress.com.

I’m now exploring Linux (Ubuntu), MySql, Eclipse, Open Office. I’ve got them loaded but I have a ways to go to get fully operational. I’m Using a dual boot Dell Win XP pro Machine with the newest Ubuntu Hardy. I’ll pick up some of that next time. I’m striving to create a solid free software development replacement to my entire Windows experience. I need a replacement for MS Access and eventually Photoshop CS3, although If I could get that in Wine I’d probably be ok with it.

Other neat tools/ services I’ve picked up are: Many Items in Google such as my new favorite: Google “reader” the Shared items page, Base, Mail, Docs, adsense, to do lists, portfolio, finance and a bunch of others, something new almost every day.

Metadot: A free hosted Wiki. My experimental site is here.

Mindtouch Wiki a hosted free service. My site is here.

PB wiki Is a hosted free service. My site is here.

Del.icio.us; A great way to keep bookmarks organized so I can get to them via any computer and not use my browser which keeps them stuck on one machine.

In fact one of my main goals is to move as much as I can into the “cloud” so that depending on a particular machine or location is no longer necessary. So this means giving up on Microsoft Outlook. So far no problem.

One last item for today is getting Firefox instead of Explorer, It has been a great improvement. I happen to be in Explorer at the moment, for no particular reason but I find myself most of the time in Firefox, which seems noticeably faster and much less crash prone, when running exactly the same stuff!

Version Control?

I’ve been looking into if and how I ought to set some sort of version control up and if so what is my easiest method that will allow for growth? I found a good comparison of version control systems here, at smashing mag. But I don’t feel up to speed enough to fully evaluate the alternatives presented, or for that matter am I ready to undertake this complexity, now? I found a good intro to SVN at Peter Gecko Here. But even that article gave me pause, and I posted a similar question there.

I’m a lone and very basic developer with no current experience with version control systems. A friend recommended SVN but I’ve barely gotten my hands around Eclipse and Mysql. which are the current backbone of my development environment. I am using the Brit, Eclipse based, report writer against MySql databases.(I’m on windows, XP and vista with Freeware only) I’ve looked at the Svn documentation, but am very wary of adding that complexity into the environment I barely understand. I’d like to continue to set up an environment that can grow, (languages and tools) as I do. I only have so much bandwidth for learning!

What advice does this much smarter crowd have to offer???