Code Coverage as a Metric

James Newkirk and Brad Wilson have co-authored a post where they present an novel (to me) idea about code coverage metrics, e.g. “my code is 80% covered by my unit tests according to NCover or VSTS”.

The traditional way of viewing code coverage is as a scalar value. It’s simply expressed as a percentage answering what portion of your production code is touched by your test code. This is the mental model I’m used to. Under this paradigm I’ve always viewed code coverage percentage as a somewhat empty metric; more of a rule of thumb than a if-you-can’t-measure-it-you-can’t-manage-it kind of thing.

Just because you have 100% coverage does not mean that your tests are any good. Test code, like all code, needs to be examined, reviewed, and punished when it’s bad. Yet another good argument for collective code ownership.

I’m not sure anyone would argue that code coverage is as “hard”, reliable, or objective a metric as Iteration Velocity, Feature-Defect Ratio, Estimation Accuracy, etc. Code Coverage simply tells you “tests are being written”.

James and Brad present the metric as a vector. Really, go read the post, it’s a cool idea and I won’t spoil the killer metaphor they give here. Ultimately they’re saying what’s being ignored is the change in coverage percentage (Code Coverage Delta?) across integration builds or whichever event you choose to collect and distribute the metric.

Interesting.

Still I think the metric is overhyped, though the vector approach might increase its value by properly recasting the number as a heuristic. Now we have a trigger to 1) have a conversation, or 2) take a closer look, or 3) loosely gauge if team members are following through with good testing practices.

Public Iteration Reviews

Interesting that the p&p team working on the new SCSF drop is putting up there iteration reviews for the public to see. I see this as another and valuable form of “practice guidance” they’re providing beyond the executable and code work products. So much about agile is about continually improving increment-over-increment. An implicit and oft-overlooked part of this is you should make this process transparent to the outside: to your customers, to the people that pay your bills, to the people that eat your dog food, whatever the scenario.

As you can see here and here they’re admitting their defeats along with enumerating their successes. They’re also not counting work partially-done as done-done.

There’s a lot one can take from this. Of course it’s a case study straight from a top agile shop, but we can certainly take a note and publish similar reports, if not to the outside world, for our customers and stakeholders to see.

Perhaps, too, p&p could take a page from the Scrum playbook and provide a demo in the form of a screencast at the end of each iteration. A small step like that could make life easier for the pragmatists like myself who tend to drop in on a later, more mature (CTP) release.

JetBlue Becomes JetTransparent

I’m a frequent flyer on JetBlue. My development team is located in Syracuse, NY. I’m located in New York City. I come up on average every three weeks to get face time with teammates, customers, and stakeholders. Luckily I didn’t have to fly last week, but, as a member of their frequent flyer program got an apology email from their CEO, David Neeleman, today. An excerpt:

We are sorry and embarrassed. But most of all, we are deeply sorry.

Words cannot express how truly sorry we are for the anxiety, frustration and inconvenience that you experienced. This is especially saddening because JetBlue was founded on the promise of bringing humanity back to air travel and making the experience of flying happier and easier for everyone who chooses to fly with us. We know we failed to deliver on this promise to you last week.

Most importantly, we have published the JetBlue Airways Customer Bill of Rights—our official commitment to you of how we will handle operational interruptions going forward—including details of compensation. I have a video message to share with you about this industry leading action.

Again, I didn’t have to fly last week so maybe my take is a bit skewed (admittedly this post could have taken a different tone had I planned on being on a beach in Aruba last week), but they’re doing the right thing and as someone who offers a service I can sympathize; there are times when things just don’t work out, unforeseen problems, ball drops, force majeure, etc.

The first thing to do in a customer-facing disaster is to be 100% transparent: accept accountability, communicate and execute necessary repairs, and restore operations as quickly as possible. JetBlue’s reaction is an excellent case study in how to not only deal with the aftermath of falling on your corporate face, but put yourself above the competition once you’re back up and standing.

[tags]Travel, JetBlue, Business, PR, Marketing, Disaster Recovery, Transparency[/tags]

The SCSF is Getting Some Work Done

Blaine Wastell (a PM with Microsoft’s Patterns & Practices Team) posted:

The Client Team at patterns & practices is planning an update of the Smart Client Software Factory to be released in late April of this year. As usual, we need your feedback on the potential scope for this update. The current plan includes both new functionality, updates currently published on our community site: http://www.codeplex.com/smartclient and a number of usability fixes (especially around recipes). [The full post]

Looks like some good stuff coming including new and enhanced recipes, WCF/WPF/WF integration, and loads of offline guidance/tooling.

He invites the interested to participate at CodePlex

[tags]SCSF, Microsoft, Architecture, Software Architecture, CAB, Composite Applications, Tools, Community[/tags]

CodeCamp NYC II

I’ll be speaking at NYC’s second CodeCamp on Saturday March, 3rd. Thanks very much to DonXML for giving me one of his slots! The topic?

Test Driving NHibernate and the Domain Model

In this talk we’ll survey the basic features (maps, collections, inheritance, queries) of the NHibernate object-relational mapping tool, discussing best practices and limitations. We’ll immediately apply this knowledge to a working example of a Domain Model rolled from Plain Old C# Objects (POCOs). Focusing on code, we’ll review the key design patterns, decisions, and testing strategies that come in handy when creating maintainable, consistent, and elegant object models that stand the test of time.

I’ll use some of the patterns in Eric Evan’s Domain-Driven Design and Martin Fowler’s Patterns of Enterprise Application Architecture to craft a Domain Model that’s mapped using NHibernate right before your eyes. We’ll discuss and apply these patterns and do an intermediate introduction to NHibernate mapping, all in a Test-Driven manner.

Do I know how to party or what?!

There’s a ton of good talks and great speakers over five (!) tracks. Scope the line-up right here and get to registratin’

IIS 7 Lagging?

Mike Schinkel has posted an agreeable piece of malcontentedness about IIS 7 possibly being “Too Little, Too Late“.

I started posting a comment to this, but, having just attended a presentation on Amazon Web Services, I felt a larger steam rising with head-bobbing-in-agreement given some of my previous posts on the subject of infrastructure and virtualization.

I’m excited about IIS 7, though I’m with Mike in disappointment on the declining market share. That means your bag-of-tricks, .NET Developer, are just that much less applicable, portable, and — what really matters to those who love what they do – handy.

It’s a major bummer that there’s no such thing as a virtualized “.NET Application Container” for the new scalable grid computing and provisioning services coming out (Amazon EC2, MediaTemple’s Grid-Server). Essentially .NET programmers can’t easily take advantage of new long tail models with easily-sourced infrastructure services. Going out on a limb, I’d suggest these limitations contribute to a lot of top/entrepreneurial developer talent moving over to various flavors of the LAMP stack, Ruby, etc.

RSS Mashups & Composite Content

I’ve been looking for a tool to create a curated blog drawing from several feeds to produce a single stream of content. The items in the aggregate feed would be republished with or without commentary or used as a catalog enabling easy assembly of new pieces of content.

This style of authorship is what Jason Calacanis calls metajournalism. In a previous post, I called the work product of this style metacontent. I guess you could say metajournalists produce metacontent. Since we’re making up words here, I’m liking the terminology Composite Content these days. Somehow it just makes reblogging seem less dirty.

Recently Yahoo introduced a new tool, Yahoo Pipes, that aids some in creating composite content. It’s a nifty web-based IDE for creating “pipelines” that merge, transform, and tweak content feeds from any web source. It has some extra delights in that it’s possible to create input parameters to your feed so that it can be customized through a form/URL API. It will be very, very nice if they allow users the right/ability for a community of users to create different widgets that can participate in pipelines. I’d love to have a “digest” block that took an input and produced an output on a fixed schedule (daily). Very cool tool, check it out.

For a while now I’ve been playing with xFruits, a web service that has “bricks” for RSS mashups. It’s fairly limited in what it does being mostly focused on aggregating RSS feeds and transforming content types (RSS-to-PDF, RSS-to-Web). Still, for the more casual user, it’s a lot easier to get in to than Pipes and gives lots of utility out of the box.

Then there’s EyeBeam’s ReBlog tool of course, but this project seems to be inactive. That and I fail to see how this is much different than burning a del.icio.us feed. Which, by the way, del.icio.us offers a daily blog post tool that will put up a list of your day’s links. Even so, it’s a limited feature; you can’t filter by tags.

Even with this emerging and admittedly very cool tool set, there’s a few missing use cases for the aspiring metajournalist. Imagine if you will a company wanting to create a curated feed from several internal feeds. Let’s take a independent software vendor for example. Let’s say this ISV has:

  • A source control system that captures release notes and syndicates via RSS
  • An internal document/content management system with feeds; The new MOSS or WSS, for example
  • Several internal blogs/bloggers representing different concerns, departments, teams, units, etc.
  • Feeds from third party services: PR Newswire, Reuters, AP Wire, Getty Images

How would a new marketer at this ISV take these internal feeds and combine them for a single home page feed? How would customer support professionals treat several disparate feeds as a kind of catalog for making proactive “how to” content?

To move up to higher levels in the Editorial Hierarchy of Needs, you’d really want an application that brought content from multiple feeds into a queue, a holding pen of sorts. Each item in the queue can be republished or, in the case of the metajournalist, tagged for inclusion in an original piece of composite content. Ideally that tool would assist in the author. The editor UI (Live Writer, web-based, BlogJet) does drag-and-drop inclusion of items from the master feed perhaps even tracking and displaying usage so you could avoid or build repetition (depending on your goal).

In the next month or so, I’ll be looking to accomplish the first scenario (holding pen) with Pipes. The workflow:

  1. Use Pipes to aggregate multiple feeds and make formatting consistent.
  2. Author receives feed in their preferred reader, Google Reader.
  3. Author shares items they want to publish.
  4. Author burns this feed from Google Reader into a master feed.
  5. The master feed is consumed by a widget living on the company site, etc.

As for me and my idea of composite content, I’ll probably stitch together multiple attention feeds (Google Reader starred items, del.icio.us, etc.) in Pipes and bring it down into a hacked up (I’ll have to make) plug-in for Live Writer. Then again, at the current pace of innovation in RSS mashup platforms, by the time I get to it, I really wouldn’t be surprised to find something like this already out there.

A New SaaS Reference App

Microsoft has released a reference application called “LitwareHR” (think Northwind or the Pet Shop app, etc.) designed to illustrate how one might architect and assemble a Software-as-a-Service offering with .NET.

The code is available on CodePlex and supplemented by behind-the-scenes content at their architect-focused site, Skyscrapr.

(Via: SD Times)