Welcome to my blog.

Thursday, November 6, 2008

In the GREEN with HackyStat!

| |

THE DEVELOPMENT OF A SOFTWARE ICU
A software 'Intensive Care Unit' is basically a set of tools for assessing and maintaining project health. It is very much like a hospital's ICU, as it monitors health via vital signs, except that it is monitoring a software project. Of these vital signs, some can give one a very clear idea of how a project is doing. Measures of this type include things like code coverage, complexity, coupling, code issues, and churn. For instance, if a project has bad code coverage, it is invariably lacking in some areas, thus being less 'healthy' than it should be. There are also measures like build counts, unit test counts, project size and development time, which give project health indications. However, with these measures, it is harder to say what is healthy and unhealthy since every project is different. They are there for one to manually interpret and analyze.

What's so interesting about a software ICU is its use in collaborative software. When there are projects being developed by multiple people all at once, its hard to know the current state of a project without manually running tests and doing analysis. When this is done, you then have to share these results with other teammates and that is another task in itself. With a software ICU, daily builds can send vital sign information to a central tool that analyses all the results in an effective way. This way, all project members are able to see the projects current status at any point, from anywhere. Everyone can see how everyone else is working on a project, as well as how consistent code is committed. A software ICU is a valuable tool for doing all of this.

Hackystat, developed by Philip Johnson, is one such tool for measuring a projects overall 'health.' Scheller and I decided to set it up to monitor our Due Dates project, along with the other teams working on their versions of Due Dates.

USING THE HACKYSTAT SYSTEM
Installing and using all the HackyStat sensors was a long, yet essentially easy task. Luckily, with the Due Dates project, Scheller and I were already using JUnit, Emma, CheckStyle, Findbugs, and PMD. This meant we only needed to install a few more tools on our system. These included SCLC, Javancss, and DependencyFinder. The eclipse plug-in worked seamlessly with the IDE. That took no time at all to install. Integrating the Ant sensor was just as easy.

The main problem I ran into was getting the svn sensor to work. When I initially went through the hackystat tutorial, I did not have to set up anything regarding username and passwords since everything was passed through the command line:
ant -Ddefault.account= -Ddefault.password= -Ddefault.sensorbase= -f svn.build.xml
I forgot about this when using it on the Due Dates system so I kept getting errors. Luckily hackystat provides an abundance of user wiki pages to help solve these types of problems. I realized I had to create a UserMap.xml file that held those parameters for me. 

Other than that, I did not run into much trouble installing the system and its sensors. I set up a daily build task on hudson to build the system each day. I was really anxious to see how our system would hold up in the hackystat software ICU.

DUE DATES GOLD CURRENT HEALTH
After setting up everything to send data to the hackystat sensorbase, I was then able to check on the current health of our Due Dates system. I was relatively surprised by the results: 

Picture 1
Project View of Due Dates Gold in Hackystat Browser

All the vital signs are green, meaning our code is healthy. Our coverage is in the 90's and there are no code issues. In addition the complexity, coupling, and churn values are all very reasonable. I was pleased with these results, although there are many areas for health improvement. For one, our system could definitely add some more tests to the test suite. Although our coverage is good, our test case number is fairly low.

As more development goes into the Due Dates project these values are sure to change and there will be more trend history displayed. Hopefully our project will be able to stay in the green. I really think having a software ICU like HackyStat monitor a projects status is extremely valuable. It is a great way to see the overall health and status of a system, thus making it easier to make improvements. Software development on a whole is made more efficient.

0 comments: