Thursday, February 19, 2009

Devcathlon: Event Implementation

Introduction
In order for scores to occur in Devcathlon an Event must be invoked by the activity of a development team. To get a feel for implementing an actual Event the team is enacting Starter Events.

Engineering the Event
My Starter Event for the week is called No MIAs which tracks the development activity of members within a team. The system is checked every 24 hours for programming activity.
  • If a member of a team has not made alterations to the code within 72 hours his or her team loses 10 points.
  • If all members of a team has not developed within 72 hours his or her team loses 20 points.
The point of the event is to assure everyone on the team is carrying their fair share of the project load.

Implementing this part of the system is difficult because there is a steep learning curve with coding a new framework. The complexity of the development is in finding the right combination of code to get the No MIA event to work properly. Invoking No MIAs will do the following.
  • Iterate through a list of team members.
    • Using the foreach is like learning to play golf, you're not always going to hit it straight but when you do its quite satisfying.
  • Check for every team member's development time against a 72 hour time period.
    • To do the time check do a calculation using the current time and the member's dev time.
  • Set up a XMLGregorianCalendar instance for comparisons using the Tstamp class.
Another piece which is causing me much grief is the configuration.example.xml file. If I cannot get the script to work I will not be able execute the unit test. <DevcathlonConfiguration> Hackystat webserver stuff... <EventConfigurations> other code... </EventConfiguration> <EventConfiguration event="No MIAs"> <WakeupInterval minutes="1440"/> <BaseScoreWeight weight="1"/> <Properties> <Property key="OneMember" value="-10"/> <Property key="AllMembers" value="-20"/> <Property key="ThreeDays" value="4320"/> </Properties> </EventConfiguration> </EventConfigurations> </DevcathlonConfiguration> According to the stack dump the OneMember property cannot be found, I do not understand because the getProperty method takes in the oneMemberKey String, which holds the "OneMember" property.
public NoMias() throws EventException {
    super(eventName);
    try {
      this.oneMember = Integer.parseInt(configManager.getProperty(eventName, oneMemberKey));
      this.allMembers = Integer.parseInt(configManager.getProperty(eventName, allMembersKey));
      this.threeDays = Integer.parseInt(configManager.getProperty(eventName, threeDayKey));
    }
Not sure how to resolve issue at this point because I can't locate the cause of the failure.

Edited on February 25, 2009
Found what was causing the error with the unit test. I improperly set up the properties for the configuration.example.xml file. Now I can move on with the unit test.
    configManager.addProperty(eventName, "OneMember", String.valueOf(oneMember));
    configManager.addProperty(eventName, "AllMembers", String.valueOf(allMembers));
    configManager.addProperty(eventName, "ThreeDays", String.valueOf(threeDays));
Screencasts
The screencasts are great! When I was going over the Hackystat API for this assignment I was using the screencast to review content that needed clarification. If students are sadly mistaken if they think they can miss class because the lecture will be available online. Professor Johnson enjoys giving quickie quizzes instead of taking attendance.

Conclusion
Good and challenging assignment, I need another day to finish this assignment, also I need to solve the issue with the property key from the configuration.example.xml file. Once I fix the problem I can perform the unit test and clear the Event from the issue board.