Archive for November, 2007

Arming Software Development Project Managers with Real Data

November 30th, 2007

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

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.gif

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.gif

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

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

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.

Understanding AccuRev Stream inheritance, the short version…

November 13th, 2007

In my role working with prospects evaluating AccuRev – and other SCM systems – the following question comes up often; “How are streams different from branches?” What’s the big deal? Usually the question is raised in the early stages of investigation, before gaining a real understanding and appreciation of the superior architectural differences that AccuRev brings to the table. There are other more comprehensive SCM resources out there which you can use for education, but I thought I’d present a brief, and quite real customer example.

Let’s say that you are using a branch-and-label version control tool, doing mostly mainline development (since branching is discouraged by a surprisingly large number of vendors out there!), and a major project comes up. Your Graphical User Interface has fallen behind the times and you want to update it to current standards. The boss assigns a developer or a team to this project and says, “Go to it, and I don’t want to see or hear from you for 6 months until it’s done.” So the team does what they have to do, creates a branch off the current mainline, and happily codes away on their “island” for 6 months.

Fast forward those 6 months. The project is reviewed, the GUI looks fantastic, and the go-ahead is given to roll it in; they want to release the hot new look-and-feel with the next major release. Oh by the way, the next major is scheduled for next month. Well, this is when that GUI team looks around at each other, scratches their heads and says, “How in the hexadecimal are we supposed to merge 6 months of changes back into the mainline?!?!” Not to mention getting them tested against what’s already been under development all this time.

AccuRev streams, and inheritance specifically, to the rescue!

Inheritance diagram

Mainline development is going on with the core development team working on their code, and promoting up toward release through an Integration environment, on to the QA folks, and finally approved for GA. Meanwhile, when the GUI project got underway they simply created a dynamic stream based off of the Integration area. The developer(s) now can work in a private project stream hierarchy and their changes, even when promoted to their parent stream, will *not* impact the mainline at all. That’s very nice, but the flip side is where it gets cool. Because of inheritance, any changes that the mainline team promotes to the Int stream or higher are automatically going to flow down to the GUI proj. This means that they will be able to maintain a constant integration with the latest and greatest, while still advancing their own project in isolation. When that 6 months is up and the green light is given, the only step left is to promote all the work from the GUI proj stream into the integration stream. Merging has already been done (and tested as well!)

For the longer version, please see the following Stream-Based Architecture for SCM white paper by Damon Poole.

Sound like a better approach? I think so. What kind of challenges are you currently facing in your own development regarding branch/merge scenarios?

QCon'07 San Francisco – Agile Conference

November 9th, 2007

For those tracking the movement of luminaries such as Martin Fowler and Kent Beck or looking for scalability advice from the architects at companies like Orbitz, Ebay, and Linked-In… QCon ‘07 in downtown San Francisco is the place to be!

The conference is packed with senior architects, software engineers, and open-source contributors galore — over 400 were rumoredDamon Poole / Cliff Utstein - AccuRev - QCon’07 to be in attendance. With speaker topics ranging from enterprise scalability to Agile practices, the audience was nothing short of being at the top of their game. Huddled together at the entrance to the conference rooms were a David Thomas - AccuRev - QCon’07number of vendors showing off new warez including AccuRev. Here’s a shot of Damon Poole & Cliff Utstein (top-right), Dave Thomas (left), and John Wall (bottom-right). The AccuRev booth had a John Wall - AccuRev - QCon'07constant flow of folks amazed at how the stream-based architecture brings a refreshing approach to managing software configurations and supporting agile practices. We also had some cameo appearances from existing customers like Authorize.Net and Orbitz.com.

Agile development methodologies is a major theme of the conference. For someone looking for advice on agile, just standing in the middle of the exhibit hall is all it takes — everyone is talking about best practices, success stories, and failed attempts.

We had a constant stream of people intrigued by our stream-based architecture and inherent support for agile practices. Here’s a list of common discussion points:

private workspaces: commit-early, commit-often

stream inheritance: merge-early, merge-often and sharing iterations early and automatically with parallel development efforts

issue tracking integration: assign, deliver and track development activity to stories/issues/features

continuous integration: integrations with cruise control, finalbuilder, electric-cloud, and others

refactoring: IDE integrations with eclipse, Intelli-J, Visual Studio support application-wide refactoring with version control

staged workflows: organize distributed teams and isolate integration areas from testing areas for explicit and repeatable access to known configurations.

snapshots: guaranteed reproducibility of labeled configurations for builds known to be ‘good’

reparenting: retarget active development to known good configurations for testing or stable development

If you didn’t have a chance to attend this years QCon, be sure to put next years event on your calendar!

/happy conferencing/ – dave

Multi platform build in 3 easy steps

November 8th, 2007

This is so simple that I’ll just start this post with the 3 easy steps.  Then I’ll throw in some screenshots for good measure. 

1.  Setup a single build stream and a different workspace for each of the targeted platforms

2.  Before running a build, re-parent the build stream to the code stream to be built

3.  Update the workspaces and kickoff the build on each platform.

Simple, eh?

Now let’s drill down a bit with what this looks like in the StreamBrowser.  Let’s say we want to build different versions of AccuRev across 4 different platforms (Linux, MAX, Unix, Windows).

I have created a build stream with a workspace for each of those platforms (Step 1).  The physical location of the workspace is located on the approriate build server.  In addition, the private workspace contains any platform specific configuration files necessary for the build.

In this example, I am performing a build from the Accurev_INT stream.  Something you might want to do in a continuous integration environment.  As changes are promoted by the developers, the build automatically kicks off on each platform.

s1.jpg

Now let’s say I decide to do a build for the Accurev 4.5.3 release for all platforms.  With a single command, I will re-parent the build stream to the AccuRev_4.5.3 snapshot (Step 2).

accurev chstream -s Build -p Accurev_4.5.3

s21.jpg>

After performing an update on the workspace and I can now run my build scripts (Step 3) and just like that, we’ve performed builds on all the platforms.

 Can you make use of this technique in your organization?

Ten Random AccuRev GUI Tricks and Tidbits

November 7th, 2007

Ten Random Things You May Or May Not Be Aware of in the AccuRev GUI
… in no particular order …
1) In a workspace or stream view, you can right-click the column header bar and choose from a number of non-default columns to display; ID, ElemType, Last Modified, Size, and Lock Type are the fields available that are not displayed by default.

2) You can display how your stream hierarchy looked at any point in the past; in Tools, Preferences select the Stream Browser tab and select “Enable Stream Browser History” – you can now walk the browser to any historical time. A nice way to see how things have evolved over time, or to find out what process you were using last year, for example.

3) While we’re in Preferences, you can use any Diff/Merge tool that you prefer; simply enter the correct path and parameters by overwriting the value in the Diff or Merge dropdown.

4) For those using Issue Tracking, in the Query editor you can create queries using appropriate variables (like CUR_USER) and set them as Public; now all users in AccuRev have access to this query by default, write once, use anywhere.

5) Back in the stream or workspace view (and other views as well, for that matter) you can select rows or cells for copying and pasting externally, like into a Word or Excel document; select the appropriate areas, right-click in the column header, choose Copy Rows or Copy Cells.

6) AccuRev smart tabs defaults to the existing tab if it’s already open. Want a second copy of any given tab? Right-click the tab, select Clone tab. This way, for e.g., you can have two copies of a single workspace, open to different places in the source tree.

7) Once again back to any view that has column headers. You can sort by multiple rows instead of a single row; right-click the column header, select Multiple Columns mode.

8) Changing your primary workstation and want to redeploy your workspaces? Easy from the CLI, but you can do this from the GUI as well; from your new workstation select View, Workspaces, choose the correct workspace and right-click, select Edit. By walking through this dialogue, the new hostname will be applied.

9) Have an extensive stream hierarchy and can’t find the stream you’re looking for? Select the Graphical/Tabular view of the Stream Browser, sort in the tabular view by the column you want to search on, then click the stream row in Tabular view: you are brought to the correct place in the Graphical view automatically. You can also do this by using the binoculars icon in the Stream Browser view.

10) Want to learn what CLI commands are being run by the GUI? Launch the GUI in verbose debug mode; (Windows version) Create a batch file and put in the following contents:
cd C:\Program Files\AccuRev\bin
java -Daccurev.debug.acapi -cp “oro.jar;xercesImpl.jar;xml-apis.jar;fw.jar” fw.MainApp

Executing the batch file launches the GUI along with a DOS shell that spits out the operations.

Okay, so maybe you knew some or all of those already. Maybe every single one was a momentous revelation! In either case, I’ve found that there is always someone who knows a trick or two that I was unaware of to help increase my productivity.

Let me hear from you. What are your favorite “tricks of the trade” within/using AccuRev?

Three Absolute Requirements for Successful Offshore Application Development, Part 3

November 2nd, 2007

 

Requirement #3: Match the Project to the Team

You can put lipstick on a pig but it doesn’t do much good. It’s not much to look at, and it annoys the pig. You can assign any old set of tasks to the offshore team, but if they CAN’T succeed at the project, or DON’T CARE about succeeding at the project, you won’t get much value and you’ll have ended up annoying the team.

Agile methodologies have taught us all the benefits of keeping the customer tied into the development process. We know the offshore team will have less of a context for managing changes and usually will average less years of experience than the corporate team.

That doesn’t mean you can try to do the “thinking” for them. There are as many smart people in Moscow and Bangalore as there are in Silicon Valley, just fewer Starbucks.

There are two common failure modes in defining projects for the offshore team:

  1. Asking a remote team to solve a complex problem the customer might not understand; or
  2. Asking the remote team to grind through endless bug fixes to a stable product line.

In the first, it’s easy to see that the customer isn’t getting any happier with each release. In the second, the failure will be the Dutch Elm Disease of application development: developer turnover.

Developer turnover comes from multiple sources, many of which you don’t control. Given the heavy cost of recruiting and training new hires, it pays to stay on top of the factors you do influence. Everybody wants to be successful, and will stay on a successful project longer than on an unsuccessful one. So pick the project wisely.

Great projects for remote teams are ones that have very well defined deliverables but ambitious long-term goals. Projects like cloning capabilities of one system to another, changing platforms or improving performance of an app, all benefit from clarity of definition and sufficient technical challenge to keep the remote team productive and engaged.

Epilog

In my humble experience, meeting these three requirements eliminates the additional risk created by an offshore development group, and reduces the problem to the same set of risks as an onshore development group. Not that onshore development is easy.

Are three requirements really all it takes? Yes, because all three are meta-requirements that cover the most important challenges of offshoring. In fact, a superstar remote team lead (Requirement #1) can be enough in itself to deliver success. Superstars are so hard to find we can’t count on finding them. That’s why you need to maximize your success rate by meeting requirements 2 and 3 as well.

Bonne Chance, Bueno Suerte, Удачи, and Good luck!

AccuBridge for Visual Studio 2005 PE – Now available for Beta test

November 1st, 2007

AccuRev is happy to announce that a new AccuBridge integration for Visual Studio 2005 is now available for Beta testing! We encourage all Visual Studio 2005 users to download and use this new integration. As always, please read the release notes which contain information on the new features, and any known issues of interest. Also you will want to read the instructions in the release notes on how to convert projects from the previous SCC bindings to the new packages implementation in this release.

Click here to download the new AccuBridge for Visual Studio 2005 PE beta edition

New Features

AccuBridge for Visual Studio 2005 PE is a completely new integration between AccuRev and Visual Studio 2005. It implements the SCC provider interfaces that are part of the Visual Studio 2005 Package Technology (VSPT). This integration does not use the old Microsoft Common Source Code Control Interface (MCSCCI) unlike previous versions. As a result, using the new integration is much more AccuRev-like.

Highlights of This Release

These features are described in the document “Using AccuBridge for Visual Studio 2005 PE.”

AccuRev commands are present in the Solution Explorer context menu

AccuRev Tool Window with Searches and History Views

An AccuRev Toolbar for quickly executing commands on selected items in Solution Explorer

Support for Solutions spanning multiple AccuRev workspaces


Note: If you decide to go back to using the older SCC integration, you will need to first uninstall this new beta integration, re-install the previous add-in, and re-bind your projects to the AccuRev source control provider.