Pragmatic Version Control with Subversion

Pragmatic Version Control Using SubversionLast week I received my copy of Pragmatic Version Control Using Subversion, which I had preordered from Amazon.com.

As I’ve written before, I’ve been a big fan of the Pragmatic Programmer series of books for a while and when Pragmatic Version Control Using CVS came out a while back I was hoping that it was just a matter of time before a version of the book focused on Subversion would be released.

This is a good practical reference book for people just starting out with version control and Subversion. Chapter 2 is where the fun really starts, with an explanation of version control and it’s basic concepts, from the repository, through working copies, tags, branching and merging. There is also a very good explanation of locking models present in different tools and when and why you would use them. The use of scenarios to illustrate the point makes the concepts easy to understand, even for a beginner.

Chapter 3 is the ‘Getting Started’ chapter. This chapter covers installation and all the basics needed to get started including creating your first project, committing to the repository, resolving conflict — at a high level. The installation section basically covers checking your machine to see if you already have the tool installed. If it doesn’t there is a whole Appendix on installation, securing the server and administration that you are referred to.

Chapters 4-10 gets into the nitty gritty of using Subversion and covers everything from the basic commands to repository organization, vendor branches, tagging and branching. These chapters are very good for the beginner.

In the beginning of Chapter 4, the author articulates the philosophy of the book. An excerpt follows:

We think version control is one of the three essential technical practices; every team needs to be proficient in all three (the others are Pragmatic Unit Testing and Pragmatic Project Automation). Every team should be using version control — all the time, and for everything they produce. So we have to make it simple, obvious, and lightweight (because if we don’t people will eventually stop doing it).

The book I have in front of me definitely holds to the philosophy. It is a very well written book that, as all books in the Pragmatic series do, gives extremely practical advice on using version control, and making it simple enough that it looks like it is something you can sustain.

I would recommend this book for those who are just starting out and want to get something up and running quickly. One of the most important things in implementing version control, from my experience, is not learning the tool but absorbing the concepts. If you do not understand the basic concepts, the process can be quite difficult. Pragmatic Version Control Using Subversion does a really good job of explaining the base concepts in a simple to understand manner while also giving you the step by step of how to perform tasks that you will use in every day life.

If you are looking for really advanced topics such as development with the Subversion libraries, this is not the book to pick up. This is strictly for those who want to use version control for their projects and want to get it going quickly.

For the more advanced, I would highly recommend Version Control with Subversion, written by the Subversion development team, or Practical Subversion by Garrett Rooney (also a Subversion contributor).

Reflections on Real Illusions

Well, I’ve spent almost two weeks listening to Real Illusions: Reflections and its time to sit down and write a review.

I’ve written before that most times that Steve Vai comes out with an album there is a lot to absorb. You usually have to listen to it quite a few time to get the nuances of what is going on. This is especially the case with the last two Vai albums. I spent a lot of time listening to Ultra Zone before I finally decided I liked it. This album was no exception. But the final verdict is its a hell of an album.

So here’s a track by track review of the album for those who are looking for it:

Vocal Tracks
I started out skipping through the vocal tracks, with the thought of listening to them later. This is just normally what I do. Eventually I get around to them and wind up liking them. I’ve listened to all of them quite a few times now.

“Dying for your Love” is one of those songs that I’m sure I’ll like at some point, but right now I’m not “feeling the love” with it. For some reason it feels too “chaotic” for me. I’m not sure how to explain it, but it seems very choppy and disjointed.

“Firewall” initially annoyed me, but I’m really starting to like it. As my daughter would say, it “Rocks Out”. There’s a lot of energy in this one.

“I’m Your Secrets” – I actually like this one a lot, though it reminds me a lot of “Good Times” off of the “Skyscraper” album. There are differences, but the main guitar track sounds almost just like it, at least to me.

“Under It All” – don’t like it. Don’t know why, but just don’t like it. I’m going to have to focus on this one at some point because there are a lot of times that I listen to a song and hate it and it winds up one of my favorites. I just have to pinpoint what I don’t like about it. The interesting thing about this one is in other reviews I’ve read, people really seem to like this one – so it’s pretty obvious I’m missing something.

Instrumental Tracks
There is not one instrumental track on this album that I don’t absolutely love. This is probably some of Vai’s best work, in that the feeling and sometimes just the complexity of them keeps you on your toes. I’m really impressed with all of them.

“Building The Church” is the song that opens the album, and rightly so. This is a rockin’ song perfect for an opening for an album that took so long to create. The rhythm guitars are tuned down to what sound like ‘D’, giving you that deep rhythm that hits you right in the gut. I spent a lot of time rewinding this song and playing it over and over again.

“Glorious” is ok, but I haven’t really gotten into it — yet. Sounds too “synthy” or “whiney” to me. Most likely at some point that will change.

“K’m-Pee-Du-Wee” sounds like Vai from the Flex-Able years. Really sweet sounding. There is something about the sound that Vai had on his earlier albums that just made you feel emotions that you couldn’t explain. This is one of those songs. It’s a sweet, melodic song. This is another one I listened to over and over again. If “Lotus Feet” didn’t exist, I would nominate this one for the seventh track of the album (for the significance of the seventh track, see “Lotus Feet”).

The next instrumental on the album is “Freak Show Excess” and this one is nothing short of amazing. In the April 2005 issue of Guitarworld Magazine Vai has the first of a series of articles showing you how to play this song and how he put it together. If your lucky enough to get a copy of the magazine with the CD, there is a video lesson with him as well. This song is amazing and excessive and shows what an incredible player Vai is from a technical perspective. This is another one I listened to OVER AND OVER again.

“Lotus Feet” is the anticipated “seventh song” on the album. Each time Vai puts out an album, the seventh track is the one he feels is the most “spiritual and uplifting” song on the album. Some of these songs have included “Touching Tongues”, “For the Love of God”, “Windows to the Soul” and the grammy nominated “Whispering a Prayer”. There was one point years ago where I created a CD with the seventh song from each album because I liked them so much. Months later walking through Best Buy and doing my mandatory flip through the Vai albums — “just in case something was released and I didn’t know about it” — I found that Steve had already done all the work for everyone with Seventh Song, a compilation of all of these songs. Lotus Feet is right up there with all of these songs, only this time it was recorded live with a full orchestra for The Aching Hunger radio program. It’s a very uplifting and beautiful song.

“Yai Yai” – A little weird and according to Kelsi, not a song to “rock out” to. However, it’s interesting to listen to none the less.

“Midway Creatures” is the final instrumental track on the album at track 9. This is a really cool song, but out of all of them on the album (aside from maybe Yai Yai) it is my least favorite. A lot of cool guitar stuff in it, but a little too chaotic for me.

Final Words
It’s no secret that I’m a hard core Vai fan. I love almost everything the guy does musically. He is, in my opinion, probably one of the most inspired musicians alive today. Overall, this is a hell of an album, but its a little hard to get into right away. This album is very conceptual in nature – and therefore can be kind of hard to grasp until you let go of the conceptual part and just listen to the music, which is why you are sitting in the car with the CD in the first place.

Bottom line is, Reflections is a lot different than any Vai album you’ve heard. But if we wanted the same thing with every album, we wouldn’t be Vai fans. Steve is out on another plane, and trying to bring us out there with him. Each album has that little something that makes it “Vai” that goes beyond the insanely great guitar playing. I’m not really sure how to explain it, but this album has a certain quality that I haven’t heard on any other of his albums.

Buy it, listen to it a few times, and see if you can see what I mean.

The absolute gems on the album are Building the Church, K’m-Pee-Du-Wee, Freak Show Excess, and Lotus Feet (not necessarily in that order).

Update 4-13-2005
Pictures from the Chicago Real Illusions Evo Experience are available here.

CNN.com – Blog-linked firings prompt calls for better policies – Mar 6, 2005

Through slashdot, I found an article on CNN.com this morning called Blog-linked firings prompt calls for better policies.

It’s an interesting read about the conflict that can occur between blogging and your job, covering people who get fired for things they’ve written because of inadvertantly “violating security” or just plain saying the wrong thing. It also explains that the first amendment does not mean you can just say anything you want, nor protect you from being fired for something you say. The main point of the amendment is to prevent government from restricting speech.

Agile and Iterative Development: A Manager’s Guide by Craig Larman

Agile and Iterative Development: A Manager's GuideI just finished reading Agile and Iterative Development: A Manager’s Guide by Craig Larson. I am extremely impressed with the amount of meat in the book on Agile methods and how succinctly this information is expressed.

Normally when you look for books on these kinds of subjects for managers, you find a lot of fluff and no real information. Not true with this one. The book starts out with a chapter talking about how software development over the years has been treated much like a factory production line, where everything can be predictably planned, rather than being treated as it should be — as new product development. New product development differs in that you are creating something brand new and do not quite have all the answers yet, so you plan differently than you do making a widget. The process isn’t predictable, because it hasn’t been done before. Now, this is a no brainer to anyone who has actually played a design or development role on a project, but it is traditionally very hard to explain why you can’t quite tell someone how long a feature will take to code because we haven’t done it before. The first chapter of the book covers this subject very well.

Chapter 2 explains a lot of detail on what iterative and evolutionary development are, in ways that a manager can udnerstand it and see the financial benefits (and the people benefits if he is looking for it!). It talks about the evolutionary requirements gathering, evolutionary and adaptive planning, and gives an overview of the few agile methods explained in the book.

Chapter 2 ends with Craigs opinion of what the most common mistake is in application of agile methods to software development, which is one I’m sure we’ve all seen. Changing the names of the waterfall approach to your favorite “agile” name and doing the same thing we’ve always done, with a full blown project plan that details each iteration and everything. . He talks briefly about it here but covers it quite a bit later in the book. If you have tried to implement the UP in organizations before this will bring a smile to your face, as you will have seen Inception turn into requirements gathering, elaboration turn into design, construction turn into, well, constructions (development), and transition turn into deployment to a production environment. Its something most people who try to implement agile methodologies have seen at least once in an organization.

Chapter 3 explains the values built into most agile processes and gives an overview of the methods he will be covering through the rest of the book. The methods covered include:

  • Scrum
  • Extreme Programming
  • The Unified Process
  • Evo

Chapters 4, 5 and 6 cover the motivations and evidence for why agile methods exist and why they work better than the traditional waterfall method. Some of the most interesting things in these chapters are the references to government standards that originally started out supporting the waterfall method that later were revised to agile type methods. There is also some history in this section on the waterfall method and it’s “accidental” endorsement as the “right way to do things”. The interesting part about this one is that the definitive paper that describes the waterfall method was actually written to describe an iterative method that had only one iteration. From one misphrasing, the whole software development industry was thrown on it’s ear for decades!

The evidence chapter is also quite interesting, using project failures as the main driving measurement for why agile methods work and predictive methods do not. The chapter goes into a lot of detail here from a measurement perspective and when you are done reading it you never want to plan a 15 month project in detail in the first two weeks again.

Chapters 7-10 cover, in detail, the four agile methods listed above. These chapters are really good explanations of each method, the values that each methods hold, how they mesh with other methods, and the history of their development. These chapters are really interesting reading. For each method, the author goes through value differences with other methods and how each method may clash or be merged with others.

Finally, we get to Chapter 11, Practice Tips. The book goes through some implementation tips in the area of Project Management, Environment, Requirements Gathering, and Testing. The chapter takes common misconceptions and tries to give advice as to how to deael with them.

This book is an invaluable resource for those who need to explain why a move to an agile method of development is needed in an organization. The Evidence chapter in and of itself is worth the price of the book. The added benefit of having the definitions and practices of the individual methods in one book is also great. I highly recommend grabbing this book if you are trying to move your organization to agile development.

Along with being a great resource for helping you explain your position, there are things that are just funny. A lot of us have dealt with many of the arguments outlined in this book, and I know that I have thought that some of the conversations I’ve had could never happen anywhere else. It’s really affirming to know that they do and that the conversations you have about agile development are the same ones had all over the development world. The same goofy mistakes are made and the same misconceptions about what the process should or shouldn’t be are common across this industry.

If you get nothing else out of the book, you will get a sense of comfort knowing that you are not alone. All of the problems you are experiencing right now explaining why agile development is valid, and all of the problems you are having in the way it is applied happens everywhere.

Now you have a reference to help with those conversations that put it in terms even your manager can understand.

One more AuthImage fix …

The final problem I was having with the AuthImage plugin is now fixed.

I was having problems when a code was not entered, or was mistyped. When this situation occured you would get an error message. Upon hitting the back button, the page would rerender with the old image, even though internally the new code would be updated. You would then enter the old code again and validation would fail.

Apparently this happened in FireFox only. I found this article that showed a way to fix it.

I think everything is finally working as it should. This is the last known issue I had that I know of.

Of course, now that all of the issues are resolved, I find this site referred to by the author of the AuthImage plugin. This guy has apparently figured out how to break these kinds of authorization images (called CAPTCHA‘s). He hasn’t released any code into “the wild” yet, but if his web site is accurate in the progress he has made, this whole sense of security we are getting from the reverse turing approach could be short lived.

WordPress: Recognizing That A Plugin Is Activated

As I upgraded the site to WordPress 1.5, I had some problems with plugins. Namely for the AuthImage plugin I had half the changes in (with the plugin deactivated) and noticed that no matter whether the plugin was activated or deactivated, the site attempted to validate the authorization code anyway.

This also meant that I couldn’t, at a future date, deactivate the plugin without going back and removing the custom code I had to insert per the installation instructions to the wp-comments-post.php and the wp-comments.php file in my current theme in order to remove the error that subsequently happened when the call to checkAICode happened.

So, I worked up a solution to recognize the plugin. I added the following function to my my-hacks.php:

# Function to find out whether the authimage plugin is actually
# activated.
                                                                                                                             
function isAuthImageActive() {
    $returnValue = false;
                                                                                                                             
    $plugin_list = get_settings('active_plugins');
                                                                                                                             
    if (array_search('authimage.php', $plugin_list) !== false) {
        $returnValue = true;
    }
                                                                                                                             
    return($returnValue);
}

This allows me to query the system with a function that is available all of the time in order to find out whether the AuthImage plugin was actually activated or not.

I then wrapped all of the code that the installation instructions for the plugin told me to add to the code with the following block:

if (isAuthImageActive()) {
     custom code here
}

Now when I deactivate the plugin through the admin interface, the whole thing goes away.

Now, I know this isn’t rocket science and there is definitely a more general way to do this, but until I need to generalize it more I’m going with this solution. Remember, for this to work you have to enable my-hacks.php support.

How To Become A Hacker by Eric Raymond

As I was browsing around today I came across the article How To Become A Hacker by Eric Raymond. I had forgotten how much I really enjoyed this article and thought I would post it up here so others could read it. I’ve loved programming since I was a kid and consequently always felt like kind of a nerd.

Seeing this stuff documented was really self affirming for me, as it showed me there were others out there who shared the same sense of fun and excitement about programming that I did. If you love programming, you’ll absolutely love this FAQ.

Ruby on Rails Tutorial

Browsing Slashdot this morning, I came across a really cool two part tutorial on Ruby on Rails written by Curt Hibbs.

Ruby on Rails is a web application framework for the Ruby programming language.

I’ve read the first half of the two part tutorial and have to say this looks pretty cool. I attended a one day workshop on the Ruby programming language a couple of years ago led by Dave Thomas and Andy Hunt (of Pragmatic Programmer fame) and while I really liked the language, I felt that at the time it was a little too immature to use as compared to a PERL or Python.

I have to say though, after reading the first half of this tutorial, I’m seriously considering looking at Ruby again. You really can get a load of work done in a short time with the language and frameworks like this will really help give a developer that feeling of “immediate gratification” that we all love to feel. I also noticed that Ruby now has a package manager as well called RubyGems. I’ll have to grab that as well.

Here are some quick links to the two parts of the tutorial:

When it comes to general programming, I would pick a good scripting language over something like C or Java any day. I’m a huge Python fan, but only because I didn’t see Ruby as something that was mature enough at the time I looked at it to really warrant my attention, no matter how quickly I could get things done. That seems to be changing. I’ll have to keep a better watch over the Ruby community this year. The language seems have some people building a few really good tools around it.

Base-Art / Bringing RSS to SVN

For a while I have wanted to be able to build RSS feeds off of the commit activity in a Subversion repository in order to publish the latest commits to an internal intranet site. I found a blog article called Base-Art / Bringing RSS to SVN this morning that makes this possible.

This is yet another note to myself to check it out and see if it fits what was in my head. It may also be an indirect note to Keith to check it out for me. 😉

From what the site says, this allows you to build the RSS feed in a post commit hook, in addition to building a separate HTML file for browsing independently from RSS, and does it all incrementally.

Online Code Reviews with CodeStriker

One of the most difficult processes to implement in a development environment is the code review process. That’s not to say that code reviews aren’t done, but they are often done informally and there is no documentation that a review existed. In order to get this documentation often a paper based solution has to be devised, causing more manual work and less time to cut code.

Codestriker is an application originally written by David Sitsky that allows web based code reviews. The tool can talk to both Subversion and CVS repositories and will produce a diff based display in which you can enter comments on a line by line basis and track their progress through the review process.

There are two ways to get a diff file into the system. The first allows you to talk directly to a Subversion or CVS server in order to grab a range of revisions from the repository. For repositories that CodeStriker cannot talk to natively, you can produce a diff file to upload to the server. This functionality allows the tool to work with source control systems such as RCS, Clearcase, or Perforce.

A few of my collegues and I have been using Codestriker to do code reviews amongst ourselves for quite a few months now and the tool makes the process much more manageable (and visible!). Having the tool online allows an author to receive immediate feedback via email when a comment is added to a review topic. This allows you to implement (or reject) review input as it comes in rather than getting a ton of work at one time that you have to finish before release time.

The Codestriker tool is written in PERL and runs as a CGI script over a MySQL database. The installation process is pretty straightforward and a full user manual exists on their web site.

Some of the features of the application that I really like consist of the following:

  • All review comments are in a centralized place that is accessible via a browser
  • Reviews (or topics) can be generated from a live CVS or Subversion repository
  • If the review was generated from a live repository, you have “parallel view”, which shows you the full file differences so that you can see all of the changes in context
  • Comments are added per line
  • When a comment is added to a particular line, the person who initiated the review is notified via email
  • and finally, all review comments are in a centralized place that is accessible via a browser!

The best way to get an idea of what CodeStriker can do for you is to take a look at some screen shots. If you like what you see, download and install it for a test drive.