Archive for November, 2007

Arming Software Development Project Managers with Real Data

November 30th, 2007 by lorne cooper

Managing software development is tough enough as it is. Managers take responsibility for the results their teams deliver. They’re on the hook for hitting schedules, delivering quality, and meeting customer requirements. Worst of all, if they’re saddled with slacker engineers, they still have to get the work done, and done right.

Tools are needed to help managers stay on top of their projects and find problems when there’s still time to fix them, before the schedule pressures explode. Project management tools are valuable, but their schedules only reflect the quality of the information that went into making them. Garbage in, garbage out.

The SCM system is the source of the information that drives smart decisions. Here are four sources of real data that can come out of any quality SCM system. I’ll illustrate with AccuRev because, well, because it’s the best.

  1. Bug Arrival Rate
  2. Churn rate
  3. Task Estimate accuracy
  4. Complexity Creep

1. Bug Arrival Rate

A key graph in any project manager’s arsenal compares bugs reported over time against bugs closed over time. Here we use AccuRev’s AccuWork issue tracking tool to store all issues, whether reported by QA, sent in from customer service’s CRM, or entered by the powers that be as customer requirements. Since our iterations are four weeks long, we use the week as a reporting time period. Some AccuRev customers use days.

In AccuWork, queries are easy to create, and we get a report from AccuWork in XML covering all the issues opened or verified [foot note: In our terminology, developers “close” issues, and QA “verifies” them. Other companies have developers “submit” issues and QA “close” them] against a particular iteration.

The XML slides right into Microsoft’s excellent Excel 2003. I use PivotTables and Excel graphs for all my reports. Others might leverage their superior Perl skills.

Here, we add a “week” field based on the AccuRev time field.

lorne pic final Arming Software Development Project Managers with Real Data

2.Churn Rate

A key metric for quality is how often different parts of the code base have to be modified to address issues. Here, the AccuRev code repository has all the information we need. I use the AccuRev Hist command

accurev hist –a –s “release candidate stream” –fx –t “2006/1/8 – 2006/1/1”

to get an XML file of all the “Promotes” (sort of like “check-ins”) to a release candidate stream within a time range. Some use a separate “hist” command for each release period. Personally, I take a big time range and then use Microsoft’s Excel 2003’s XML file support to slice and dice into tasty chucks. I tried it once with Excel 2007. Once.

Since we component-ize our code base based on directories, the “path” field is particularly interesting, as directories can be as significant as individual files.

Loading the XML file into Excel, my macro deletes some unneeded columns and creates a Pivot Table like the following:

lorne pic 2 final Arming Software Development Project Managers with Real Data

Here I’ve filtered the data to not include the binary files, and used the Excel Pivot table’s advanced feature to show the top ten in descending order. AccuRev.c takes a beating every release but it isn’t significant. Server/diff.c and Client/stat.c seem to be at the center of a lot of changes that release, and are probably candidates for some code reviews.

3. Task Estimate Accuracy

Along with dates of issue opens and issue closes, we have chosen to include a user field for the original estimate of the length of time it will take to complete the issue. That gives us something to compare to when we “close” an issue and send it to QA, and an opportunity to correlate against the length of time before an issue gets verified.

As a best-practice, we try to normalize issues to a couple of days in length. Longer and you haven’t really figured out what needs to be done. Shorter and you’re liable to strangle in your own spit, a management practice I can’t recommend having seen the results.

We get this data out of AccuWork again, and can slice it by group, release, or even individual developer. This is a quick way to quantify the subjective feel we all have for who is slow, who’s fast, and who’s clueless. Here’s a scatter plot for a group. Note that they are generally on the high side of their estimates, and that they haven’t done a very good job normalizing tasks to 2-3 days:

lorne pic 3 final Arming Software Development Project Managers with Real Data

4. Complexity Creep

As software gets modified, and especially when managers become conscious of the amount of time taken to fix a bug or implement a feature, there is a tendency for developers to make the code base less maintainable. There are some metrics for code complexity that can benefit the manager when trying to assess when it is time to refactor. A frequently used metric is cyclomatic code complexity.

While we don’t do any code complexity measurements here, some of our larger customers do. This is easy to collect using a trigger on changes being sent to a release candidate (or QA candidate) stream, where the trigger calls the analysis tool and puts the results into a tab-separated file for later plotting from Excel.

A simple (Perl) implementation of the server side “server_post_promote” trigger creating a file “complexity.txt” looks like:

open COMPOUT, “>>complexity.txt” or die “Can’t open complexity.txt”;
if ($stream eq “acmeProj_QA”) {
$complexity = complexity($stream, $version, $workspaceDir, $filePath);
print COMPOUT “$user\t $date\t $transaction\t $stream\t $version\t $filePath\t $complexity\t $issueNum\n”;
}
close COMPOUT;

Together, these reports provide a good mix of data around schedule, estimation and code quality, giving our beleaguered project manager a pretty nice set of armor.

Please post your favorite management reports, even if you don’t (yet!) use AccuRev.

AccuRev 4.6 preview nuggets – redux

November 28th, 2007 by jtalbott

AccuRev is tremendous when it comes to managing the Software Development Process; you have complete visual control over how code will flow and progress through the stages you feel necessary as an organization.  This kind of capability generally appeals to folks at the executive level, or release and build engineers, or project management.

We haven’t forgotten about the developer though!  In 4.6 we’ve introduced the “version slider,” which allows  for a complete visual history of any element under source control, along with complete groupable annotation.  Quickly drag the slider to any previous point in time and you’re able to see what changes encapsulated that version, who made them, and group by various fields. You may have seen a similar screen capture to the one below from AccuRev in the pages of SD Times recently? Here’s an article on change management you may find of interest there as well.

4.6 preview slider

I’ve never been a fan of the expression “blame game,” but for the detectives out there, this puts the clues to the Who, What, When, Where, and maybe even Why (if comments are used appropriately) of code change at your literal fingertips…

AccuRev 4.6 preview nuggets

November 21st, 2007 by jtalbott

As we head into Thanksgiving here in the United States, one of the things AccuRev customers have to look forward to on the other side is the upcoming 4.6 release. I thought this might be a good time to start giving some preview tidbits of 4.6 core functionality that would be of interest.

As you already know, the AccuRev StreamBrowser gives you a complete visual representation of how code is flowing through your system, not to mention dymanic control of the development process. And the “shamrock”, or default group icon, lets you know specifically what elements have been worked on at each stage. Well, with 4.6 you will now be able to see work in progress at the Issue level instead of just the file level:

4.6 preview default group by issue

This top-level visibility into what Issues have progressed to what areas of your development process further abstracts the team from needing to worry about individual elements, and instead they can concentrate on the bigger picture: “Am I going to get this release out in time?” Or “Do I not have enough of my core features past the QA gate yet?”

You can also still show the default group by file, and additionally you can view by transaction as well. Ponder this while fighting off Tryptophan induced sleep. Many of you asked for this feature and I look forward to learning how you will make use of it.