An Architect's View

CFML, Clojure, Software Design, Frameworks and more...

An Architect's View

What Makes Better Code?

November 9, 2009 ·

As you might guess from some of my tweets and blog posts lately, I've been reading more about Agile, Lean and XP software processes, looking at how I can improve my own working practices and those of the teams I work with. Once again the XP mailing list has provided a good read with a link to large-scale research at Microsoft into the effectiveness of certain software practices. As the researcher points out, the vast scale and diversity of Microsoft's software development ecosystem allows for some in-depth analysis that compares different approaches on similar teams. The article is worth reading all the way through and shouldn't really contain any surprises but there are a couple of things I wanted to pull out and highlight.Test-Driven Development
What the research team found was that the TDD teams produced code that was 60 to 90 percent better in terms of defect density than non-TDD teams. They also discovered that TDD teams took longer to complete their projects — 15 to 35 percent longer.
Neither of these findings should be surprising but it's good to actually have numbers you can point your managers at when arguing in favor of TDD! Organizational Structure
Organizational metrics, which are not related to the code, can predict software failure-proneness with a precision and recall of 85 percent. ... This was probably the most surprising outcome of all the studies.
OK, this one surprised me! Not that organization affects project success or failure but that the predictive correlation was so high. This is one case study you bet I'm going to read cover-to-cover! The article also has a section on distributed teams but it bases its findings only on degrees of distribution and doesn't include a comparison of the XP practice of having the team in the same room, working around a table together which some studies have shown improves productivity by as much as a factor of two (I'll blog more about this once I've assimilated those studies in more detail). The article concludes that the degree of distribution has less impact than organizational cohesiveness (see above) and that's not really surprising. I've worked in "War Room" style environments and the productive can go up dramatically even compared to developers all being in relatively open cubes on the same floor of a single building.

Tags: programming · tdd

6 responses

  • 1 Sean Corfield // Nov 9, 2009 at 2:36 PM

    War Rooms double Team Productivity
  • 2 Brenda // Nov 9, 2009 at 4:20 PM

    Thanks for posting this information and link to the article. I have been pushing our dev shop to modify our CMMI development processes and practices to incorporate XP and TDD. Hopefully this will help me to convince management to start at least a case study of a similar nature in our company.
  • 3 Joel Stobart // Nov 9, 2009 at 11:54 PM


    A great post. The same from Microsoft, (you wont hear me saying that twice).

    I have blogged a few of my favourite bits:

    It sounds like assertions may be really effective as tools, which could be a really interesting development. I'll have to brush up.

  • 4 Ryan // Nov 13, 2009 at 1:16 PM

    Sean, have you seen any good, recent research showing the benefits of dual monitor setups (or large resolutions) for development? Years ago I heard there was some marginal research at IBM, but it was minimal and is now quite dated.
  • 5 Sean Corfield // Nov 13, 2009 at 2:17 PM

    @Ryan, I can only offer my personal experience that I am more productive on a dual monitor - or at least extremely large, high resolution monitor - where I can see my code workspace side-by-side with reference material etc.

    Years ago our resolutions were much lower so the information density even on two monitors would be much lower than we're used to today.
  • 6 Kerr // Dec 7, 2009 at 11:01 AM

    Sean - this is a great find, thanks for posting this link. Like Joel, I rarely find myself handing accolades to M$, but this is certainly an exception.