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.

IBM Backs PHP Programming Language

I found an article hidden away on slashdot talking about how IBM has entered into a partnership with Zend Technologies, a leading provider of PHP development tools, in order to "help make PHP work better with corporate databases and web service technologies".

I have used PHP quite a bit over the years both on the work and home fronts. Almost every incarnation of this web site has been written in PHP, including this one (WordPress is written entirely in PHP). At work, I’ve used PHP to help manage data related to development and deployment processes that has been running for over three years with very little modification over the time its been in production. It’s very easy to write pretty solid code in an abbreviated amount of time using PHP.

PHP is a very powerful language, and it is very easy to get a highly interactive web site up very quickly. While I’ve never used the Zend development tools in order to perform any of this development, I’ve had very good experiences with the tool in general and I’m glad to see that it is finally going to get some backing from a pretty large corporate entity.

For one, it does something to validate the tool as valid corporate tool. Secondly, and probably more important to me, it validates the technology choice I made three years ago in order to get solid results as quickly as possible.

This should be a very interesting time for the PHP community. While they’ve had huge support from the Open Source community over the years, I’m interested to see how many companies start finding the PHP language a valid technology due to IBM’s backing.

Related Articles:

100% Pure Java Subversion Client Libraries

As a note to myself, I have to look at JavaSVN when I get a chance. Its a pure Java implementation of a Subversion client.

Some things I have to research:

  • What would it take to integrate this into CruiseControl to eliminate the need for the Subversion client being installed on the box?
  • What would it take to integrate this into Apache Ant for the reason listed above.
  • Finally, has anyone actually already done the above two things?

I’ll post the answers back here when I find out.

Site upgraded to WordPress 1.5

The site has been upgraded to WordPress 1.5. Everything seems to work fine, except the WP-Amazon Plugin.

When I get some time, I might debug it, but until then, I guess I’ll have to do my Amazon links manually.

The upgrade was completely painless. The main thing that slowed me down was keeping my new vendor branch up to date and merging it in with the main codebase. It also took some time to figure out where to put the customizations I’ve done to the site like the FireFox button, and Google Ads. Otherwise, it was a breeze. What a great product!

Some things I really like about the new version, after playing with it or a few minutes:

  • The templating system – not only is Kubrick built in now, causing less customization, but you can switch through themes seamlessly. Absolutely beautiful.
  • The dashboard – All wordpress news and site statistics on one screen. Very cool.
  • The ability to manage “non-blog” pages.
  • New spamming features – I haven’t gotten into these yet, but those online poker people are in for some trouble!

I’m really looking forward to sitting down at some point and going through the details of the codebase. I have a feeling I’m really going to miss the Amazon plugin though, so I hope I can either find time to debug it, or that there is an update coming out soon!

I still have to take some time to integrate the AuthImage plugin into the site. This is one plugin that should have become a part of the overall product.

Update: February 19, 2005

I have gotten the WP-Amazon Plugin to work under WordPress 1.5 with the following changes to wp-admin/wp-amazon.php:

==================================================
--- wordpress/wp-admin/wp-amazon.php	(revision 36)
+++ wordpress/wp-admin/wp-amazon.php	(working copy)
@@ -1,4 +1,6 @@
 < ?php           
+require('../wp-config.php');
+
 /*
 WP-Amazon Plugin for WordPress 1.2+
 Version 1.2.3 2005.01.25
@@ -66,12 +68,12 @@
 
 $areMagicQuotesOn = get_magic_quotes_gpc();
 
-require_once ('../wp-includes/wp-l10n.php');
+require_once(ABSPATH . '/wp-includes/wp-l10n.php');
 
 $title = 'Insert item from Amazon.com';
 $standalone = 1;
 
-require_once ('admin-header.php');
+require_once (ABSPATH . '/wp-admin/admin-functions.php');
 
 parse_str($_SERVER["QUERY_STRING"]);

I’ll be sending a patch to the author within the next couple of days.

Update – Februrary 20, 2005
The patch I posted yesterday showed the admin menu on the popup window. I have updated the code with the final one, that looks like it did in WP 1.2 without the admin menu. You can also download the patch here.

One note: This patch is based on WP-Amazon version 1.2.3, which you can find at the authors site.

Update – March 23,2005
For those who don’t want to much with the patch, I have put the file full file here for download. Just copy this into your wordpress/wp-admin directory and everything should work fine.

Trac: Integrated SCM and Project Management

This post is more a reminder to myself than anything else. As I was browsing the wordpress plugin repository I saw they are using version 0.8 of a product called Trac that integrates with Subversion and provides basic project management and defect tracking.

The site says the software does the following:

  • An integrated system for managing software projects
  • An enhanced wiki
  • A flexible web-based issue tracker
  • An interface to the Subversion revision control system

This looks really interesting and I need to remember to check it out. I tried to download it this morning, but it seems the download area of their site is down.

Update: Edgewall.com is not down. For some reason, FireFox was giving me zero reply error. When I went to a Windows machine with IE, I was able to download the software.

Upgrade to WordPress 1.2.2

I have upgraded the site to WordPress 1.2.2. This also required me to synch up all of the changes I’ve made to the code since I originally installed WordPress 1.2 with Kubrick and finally bring my Subversion repository up to date with the current production code. I’ve not been following my own advice and have been making modifications directly on the web site.

So, I have everything updated, and a development server created that I can change things on and then move the changes to production after I’ve tested. A lot of work, but in the long run definitely worth it.

I think I got everything, however I might have missed a few things. If you run into problems, please email me at ron_at_bieberlabs.com and let me know what the issue is.

Pragmatic Version Control with Subversion Book Released

Pragmatic Version Control Using SubversionAn annoucement went to the Subversion mailing list yesterday that the new book in the Pragmatic Programmer Series, Pragmatic Version Control Using Subversion is now available.
I’ll definitely be picking this one up, as I am a big fan of the “pragmatic” series of books. Once I receive it and read it, I will post my impressions of the book.

More information is available at pragmaticprogrammer.com. As an FYI Amazon has this available, currently, for preorder only.

The Joel Test: 12 Steps to Better Code

Browsing through Joel on Software I came across a very good article called The Joel Test: 12 Steps to Better Code.

I have already rated the development environment that I work in according to the test, but am not going to share the results right now as I want to hear what other people in my organization think before publishing anything. In any event, its a good read as it really makes you think a little from a common sense perspective about the way you develop software as an organization.