Monday, February 16, 2009

Devcathlon: Interfacing the System to Hackystat

Introduction
Devcathlon is still in its shell state the development cannot move forward without a mechanism to track scoring. Devcathlon must be integrated with the Hackystat system in order for points to be distributed.

The Code
Task1

Working with Hackystat
In Devcathlon, the point system is dictated by events performed by software developers. Scores are earned or taken away when a programmer performs an action within the events list. To track a developer's efforts Devcathlon must have an interface that connects with Hackystat. The Hackystat system is well documented and contains several APIs to help retrieve data.

Implementing the APIs is the easy part trying to figure out where to find the class or method was the difficult part. Hackystat has numerous classes that I am unfamiliar with and required many hours of research to understand how each component works.
    String host = "http://dasha.ics.hawaii.edu:9876/sensorbase";
    
    SensorBaseClient.isHost(host);
    
    //to login
    SensorShellProperties sensorProperties= new SensorShellProperties();
    String userId = sensorProperties.getSensorBaseUser();
    String userPassword = sensorProperties.getSensorBasePassword();
    
    //need a client
    SensorBaseClient sensorClient = new SensorBaseClient(host, userId, userPassword);
    
    sensorClient.authenticate();
The above code sets up application for logging into the system. Notice the sensorProperties object which accesses a .properties file which holds user information. Eliminating the need to hard code data into the program.
    MultiDayProjectSummary summaryIndex = 
      sensorClient.getMonthProjectSummary(userId, myProject, 2008, 11);
The code sets up a MultiDayProjectSummary object and takes in a summary of data from November 2008.
  logged in...

  01-Nov-2008 0
  02-Nov-2008 0
  03-Nov-2008 0
  04-Nov-2008 110
  05-Nov-2008 87
  06-Nov-2008 0
A snapshot of the output from HackystatOne.java.

Screencasts
Professor Johnson added a new feature to class lectures utilizing a program that records his desktop and webcam at the same time. The a few nice things about using screencasts for lecture purposes.
  • Nothing in the lecture will be missed.
  • The lecture can be reviewed at a later date.
  • No need to bother the professor about items in the lecture.
There maybe a downside to using the screencast for lecturing but I think the benefits outweigh the negatives.

Conclusions
The APIs for the Hackystat system will be useful when the team starts to develop the Devcathlon Events. All of the necessary classes and packages will be at our finger tips to collect Hackystat sensor data. The sensor data is the lifeblood of Devcathlon the information from Hackystat will be used for the all important scoring mechanism. Without the point system, Devcathlon will be one boring game.