Monday, November 16, 2009

Revamping to WattDepot 2.0

In this blog, I will talk about upgrading our team's WattDepot User CLI to version 2.0. This was a very tedious task since it required a lot of refactoring of our code. The majority of our groups effort was put into refactoring our code since we implemented an interface and used a Hashmap to call our commands. We made the mistake of finishing all of the commands from 1.0 instead of getting the hashmap to work. This made us take a few more hours than it should of since we just added more code to refactor. There were also a few new commands that was added into the new version of WattDepot. The new commands can be found here. The three new commands were a lot easier to implement now that we were more familiar with the API. Also, the commands were changed from version 1.0, which were easy to fix after we implemented our Hashmap and interface. I am glad that we have finished the assignment and got everything working.

I thought that my group partner and I worked well together. I felt that we each held our own and did the tasks that we assigned for each other. We met regularly about 2-3 times a week in sessions of about 3-6 hours at a time. This gave us plenty of time to work on the assignment.

I believe that our system wasn't the most efficient way to implement the user CLI, but we were able to get the job done. Having the refactor the code created some problems, but we were able to workout the details and get all of the commands up and running. We tried to take care of as many of the issues raised by our reviews of our system. The reviews were very helpful since it gave an outside perspective on our system that we were not able to see ourselves. Our design of the system still has some kinks, especially after we broke up the commands into their own classes. To get all the commands working, we had to extend the UserCommandInterface class since it held some key methods that could only be accessed if we extended the class. This was a design error by us since we were not able to access the client information from the main class since we didn't ever pass it as a parameter. To summarize this, we have each of the classes in the command package having to extend the UserCommandInterface and the UserCommands class. The names are a little confusing since the UserCommands class is the interface and the UserCommandInterface holds the CLI menu methods.

We did not write tests for every class which tells me that we do not have good test cases. This was a pitfall because we did not write test cases at the same time that we were writing code. We tried to write out the test cases at the end of the code for the old commands from version 1.0, but again we ran out of time. We were only able to cover 76% of our class, 63% of our method, 44% of our block and 46% of our line code.

Looking back on the assignment, I feel that the goals of this assignment was to give everyone in the class group experience, which is something that was lacking in previous ICS classes. We were also introduced to some pretty cool tools that helped the group project go along smoothly. Using subversion was a big help since we were just one click away from updating and commiting our changes to the project. The new tools that I was introduced to were Hudson and Hackystat, which were both interesting tools. Hudson was a good tool that helped our group keep our project healthy and not let it stay broken for long. Hudson was a build tool that is very useful since it verifies the system all the time with helps when either me or my partner forgets to verify. Hackystat was another interesting tool which told us all about our code. Here is a printout of our code. This printout told us that we needed to write more test cases to help cover more of our code. Also, since our design of the system was pretty bad, our code is very complex.


What day and time during the month was Oahu energy usage at its highest? How many MW was this?
November 2-6, 9-13, 16-20, and 23-27 all had a usage of 995MW

What day and time during the month was Oahu energy usage at its lowest? How many MW was this?
November 2-6, 9-13, 16-20, 23-27 all had a usage of 493MW

What day during the month did Oahu consume the most energy? How many MWh was this?
dunno how.

What day during the month did Oahu consume the least energy? How many MWh was this?
dunno how.

What day during the month did Oahu emit the most carbon (i.e. the "dirtiest" day)? How many lbs of carbon were emitted?
4th, 5th, 16th, 17th, and 30th of November. 29,959 pounds of CO2 were emitted.

What day during the month did Oahu emit the least carbon (i.e. the "cleanest" day)? How many lbs of carbon were emitted?
7th and 8th of November. 22,908 pounds of CO2 were emitted.

Our distribution file can be found here.

0 comments:

Post a Comment