Loading ...
Sorry, an error occurred while loading the content.

25952Direct evidence, XP reduces the cost-of-change curve...

Expand Messages
  • Jiva DeVoe
    May 1 12:40 AM
    • 0 Attachment
      As some of you know, we have been using XP to develop some apps. As
      part of this, we have obviously been developing unit tests as we go.

      Well, we're approaching completion of the first phase of this
      project, and we have some interesting statistics to share. We ran
      some source code analysis tools on the codebase, and we have found
      that the system has, currently, around 17,000 lines of code. (This is
      written in C++ BTW) Mind you, this is 17,000 lines of all hand
      crafted code. None of it was generated. This represents for us about
      3.5 months of work. The analysis tool we used told us the following
      interesting info:

      Based on a *typical* project. The tool said that a typical team would
      take about 47 man-months, or (with an average team of 4 coders) .9
      man-years. We developed it with 4 coders in just about .25
      man-years!! That's amazing! Next I ran a "code quality" analysis
      tool, which shows things like code complexity, and stuff like that and
      rates you on it. Surprisingly enough, with the exception of the lines
      of code/lines of comments ratio being bad, we had NO red warnings! :)

      But, all of this is not the truly impressive part. Last week, as we
      were reviewing things, we discovered a serious design flaw in the
      system which went back, clear to the VERY first modules we wrote
      way-back-when we started. These modules were absolutely CORE to the
      rest of the system, and were used in several other modules VERY
      intimately. BUT... we decided... it had to go.

      SO... in a marathon coding session, three of us sat down and jammed
      through it, replacing code throughout the system. Thanks to the fact
      that we had unit tests, we were able to go through the system module
      by module, change out the code, and retest that module, and then move
      on, confident that we'd not broken anything!

      In 8 hours, we replaced or added over 1000 lines of C++ code! This comes
      out to be 1 line of code every 1.5 minutes PER CODER! AND at the end
      of the day... THE WHOLE SYSTEM RAN THE SAME(or better) AS WHEN WE
      STARTED! This is phenomenal! We replaced 7% of our codebase, in a
      single day, and it all WORKED! Impossible!

      Now... a couple of caveats:

      Yes, hate me, tell me I'm a bad boy. We did NOT pair-program all day
      long. We paired for some of the day, and worked alone during other
      parts. We also did NOT write *as many* *new* tests as we should have
      that day. We did write some, but not as many as we could have. We're
      fixing the latter there this week. However, I just wanted to share
      that with you guys as some PROOF that actually doing these things DOES
      reduce the cost of later changes.

      EVERYONE on the team said "There is NO way we would have been able to
      do this on an ordinary project with no unit tests, or one where we
      didn't all understand the system as a whole."

      --
      Jiva DeVoe
      VP of Software Development
      Opnix, Inc.
      -= Innovating Internet Intelligence =-
    • Show all 32 messages in this topic