Monday, November 16, 2009

WattDepotCLI Version 2.0: A second look at the system

Over the past week, I have worked with my partner to implement a version 2.0 of the WattDepot CommandLineInterface that we have been working on for approximately three weeks. This process involved taking the comments from the code review completed a week ago, and incorporating the appropriate updates to the code, in addition to creating implementations for three additional methods.

The main comments from the code review basically said to just spend more time on the project to add more functionality, so this was one of my main focuses for the week. I implemented test cases for the commands that I had originally implemented, and I also split up all of the files into two separate packages, to separate the parsing of commands from the methods to carry out those processes. The test cases took some time, but I found that once I got the general structure of one completed that it wasn't as difficult to implement additional test cases for my methods after that. As for the reorganizing of files, I really took advantage of the Refactoring tool in Eclipse to make it a quick and painless process. Also, one item that we didn't get in our code review but that concerned us was the consistency of our code. We worked to refactor some methods so that the method signatures would have a similar style.

I did not regularly meet in person with Kendyll to work on the code since we both had busy weeks with our other coursework, but we kept in touch with each other regularly via e-mail and instant messaging. This worked well because we were able to work on our own time when we had the chance, but also always had an idea of what we were supposed to be working on at all times. We tried to partition the workload evenly, but found that at times we were setting it up where one person would work on the code for a while, make a commit, then let the other person work for a while, just because our schedules didn't allow for a more consistent division of work at all times.

As part of the adaptations we made for version 2.0, we also began using the Hackystat ProjectBrowser to monitor the "health" of our project using nine different key areas. The overall ICU for our project over the past week is:



For the most part, you can see a trend in increasing coverage and decreasing complexity, which are both signs of a healthy project. From this image, you can see that there is a clear increase in work done as time progressed, which occurred because both Kendyll and I were busy for most of the week and had to wait until the weekend to get work done, although we both tried to do some minor work on the system each day. Probably the only thing to really worry about from the ICU was the trend in coupling, which indicates that our files were becoming more tied together. I believe that the increase was caused by the fact that many classes either implement or extend other classes, and we could not get around this

I would like to address the "churn" factor, which looks ridiculous at first glance. The reason it is so high is that I did not refactor the system into different packages until yesterday. Thus, the system registered this as hundreds of lines of code being deleted and hundreds of lines of code being written in one commit, when it really only involved files being moved around. If you exclude this day

Finally, we were asked to use our system to generate the answers to several commands. Kendyll did this part, so please refer to his blog post for the full details. However, the answers were:
  • What day and time during the month was Oahu energy usage at its highest? How many MW was this?
    >power generated SIM_OAHU_GRID timestamp 2009-11-26T20:00:00.00-10:00
    4.96E8
  • What day and time during the month was Oahu energy usage at its lowest? How many MW was this?
    > power generated SIM_OAHU_GRID timestamp 2009-11-28T02:45:00.000-10:00
    9.95E2
  • What day during the month did Oahu consume the most energy? How many MWh was this?
    >powerstats generated SIM_OAHU_GRID day 2009-11-26 sampling-interval 60 statistic max
    9.95E2
    What day during the month did Oahu consume the least energy? How many MWh was this?
    >powerstats generated SIM_OAHU_GRID day 2009-11-26 sampling-interval 60 statistic min
    4.93E2
    What day during the month did Oahu emit the most carbon (i.e. the "dirtiest" day)? How many lbs of carbon were emitted?
    >total carbon generated SIM_OAHU_GRID day 2009-11-04 sampling-interval 60
    29959
  • What day during the month did Oahu emit the least carbon (i.e. the "cleanest" day)? How many lbs of carbon were emitted?
    >total carbon generated SIM_OAHU_GRID day 2009-11-07 sampling-interval 60

    22908

My group's completed version 2.0 can be downloaded from Google Code here.

No comments:

Post a Comment