Wednesday, November 4, 2009

Group Work Time! The WattDepotCLI

As my software engineering class enters the second half of the semester, we have begun work on the WattDepotCLI. WattDepot is a service that seeks to collect data on electricity so that the data can be later used for visualization tools and analysis. My class also began to work in pairs for this assignment, so I had to also take advantage of tools like Subversion and Hudson, as discussed in earlier posts.

The assignment to implement a command line interface (CLI) for WattDepot turned out to be a lot more intensive than I had originally expected. The WattDepot library includes an API, and this was helpful once I really got into writing the necessary classes and methods for the CLI, but it was daunting to just begin the project.

Also, I feel that we didn't have a good design strategy in place from the beginning of the project, which meant that for several days we were stuck on how to write the code, and that we were left with several major changes to make to the project. One of these was implementing commands by creating an interface and using a Map to match commands with instances of the interface. I feel that I'm somewhat rusty in using Java, since the last Java-focused course I took was well over a year ago, so these ideas took some time to figure out.

Finally, this was the first time that I've really had a need to use Ant's verify command to do automated quality assurance. For the most part, I've only had to deal with Checkstyle, and rarely, if at all, FindBugs and PMD. With this project, though, I found it really frustrating to make all three tools happy. The worst case of this was when PMD told me to combine multiple lines into one, which would have made for a line of code that would have been close to 300 characters - definitely outside of the range that Checkstyle will allow! Although the tools were useful, it was sometimes difficult to satisfy the tools while trying to upload a file that was partially but not quite completed, and that still had minor errors that PMD or FindBugs would complain about. In this sense, I feel like it almost inhibited my productivity, because I was constantly having to go back and hide code with comments, just to satisfy one of the tools.

Working with a partner was a new experience in my career as an ICS student at UH. In all previous classes I've taken, we were told to not work with others on any assignments, and all assignments were relatively small and self-contained. Thus, it was very different to have to schedule meetings and coordinate roles in the group. Kendyll and I switched back and forth on how to break up the list commands. First, we decided to break it up by type (Power, SensorData, etc.), then we broke it up by subtype (day vs timestamp) and finally switched back to the first idea.

While Kendyll and I technically finished the entire command specification for the assignment, there were several items that we wanted to complete but didn't have time to do. The one major part of the project that Kendyll and I were unable to complete were the test cases. Although I believe that our methods were designed correctly to facilitate testing, we just ran out of time to write the test cases. The other thing that I didn't have time to do was to break up the command line processing and the methods themselves into two different packages.

Overall, I felt somewhat rushed and unprepared for the assignment in general. That being said, I did enjoy getting the chance to work on a project with someone else and on a project with real-world implications. I'm looking forward to getting the chance to explore the WattDepot project further.

My completed project can be found on Google Code here. Select the Ehiku version.

No comments:

Post a Comment