Sunday, April 26, 2009

ICS 499: Milestone 6.1 and Work Improvements

Introduction
The team was given a reprieve for Milestone 5 and was given an extension for Milestone 6 which I am calling 6.1. The Scoreboard has progressed quite nicely and is ready for display. Got into a jam with the sorting of a Map. Quite a productive week for the Devcathlon project.

Scoreboard
The Scoreboard is fully functional and takes live data via the Initialization class.
  • All active matches
  • All users in a match
  • Match scores, events, and comments
There are some cosmetic issues that need to be address with the headers in the events panel and scores next to names. I think the Scoreboard is about 90 percent complete.

Sorting a Map
The last major hurdle of the scoreboard was to implement a top performers panel. The panel displays the top point getters of a match. To associate scores to users I employed a map to store the points. Now it makes no sense to display points arbitrarily the tallies should be in descending order. But sorting values from a Map is not a simple task. A magical method to sort a Map does not exist in the API. I had employ a TreeSet to sort the values and then used points as a keys to associate a user to a score.
    List userScores = new ArrayList(userScoreMap.values());
    TreeSet sortedSet = new TreeSet(userScores);

    Object[] scoreArray = sortedSet.toArray();
    
    List scores = new ArrayList();
    
    int size = sortedSet.size();
    
    for (int i = size - 1; i >= 0; i--) {
      scores.add((Integer) scoreArray[i]);
    }
The code is not pretty and it maybe prone to buginess. I will be working on improving the Map sorting algorithm in the next Milestone to conjure something more elegant.

Group Improvement
Up until last Monday April 20th the group was limping along in fact there were issues with presenting Milestone 5. After going through group therapy with Professor Johnson which, I felt was beneficial for everyone. I saw improvements in all facets of development: communication, coding, and team morale. I feel like that I am part of a team and Devcathlon will be completed by the end of the semester.

Friday, April 17, 2009

ICS 499: Milestone5 and Playing Nicely with Others

Introduction
Devcathlon is currently at Milestone 5. My responsibilities continue with the Scoreboard and added the match invitations to help out. I took on the leadership of the Match and Scoreboard team. Although, I am not sure if the group needs three chiefs. I think one leader is sufficient at this point, with only three weeks left in the semester. The group needs to be working together and hearing one voice. Not three different opinions which stifles productivity.

The Scoreboard
The Scoreboard now takes in real data showing the details of a chosen match. Right now the system is set up for two teams to compete. Eventually, Devcathlon will allow more than two teams to play each other. Of course this means the Scoreboard will need to go through a redesign to accommodate three groups or more. The team lists still needs to have members linking back to their profile. Also the Events details needs headings to make the panel easier to read.

Group Work
I have learned a lot about group development this semester. Throughout my professional life I have been a participant in a team where success was dependent on communication and working as a unit. Without cohesion and dialogue the team cannot meet its goals. Members maybe doing redundant work or a task requires multiple bodies for completion. Furthermore, the unit cannot work efficiently if two or three members are not performing the tasks needed to get the job done. The team will get stuck in the mud and cannot meet its deadline.

Friday, April 10, 2009

ICS 499: Data in the Scoreboard

Introduction
This week's milestone requires us to implement real data into Devcathlon.

Digging for Match Data
I initially took on the task of implementing the Initialization class which is used to create data to test Devcathlon. However, I encountered a set of issues that prevented from finishing the application.
  • Could not connect with the host (Sensorbase).
  • Did not have data to work with (User data).
Not being able to connect to the sensorbase was not too bad there were ways to workaround that issue. Not having the data was the bigger problem because the system needs information for it to work. Once the group figured out a direction which included sharing data: names, emails, and passwords. It should be noted the passwords are retrieved locally and not accessible to the public.

Retrieving data for display.
A lot of the implementation in Devcathlon is the digging for data. Every aspect of the system has data: matches, teams, users, and events its our job to pull out the info for display. Retrieval is fairly simple, Hackystat and Devcathlon APIs have the needed methods for extraction. The interesting part of the development has been the display of information using Wicket. Throughout Devcathlon the info needs to be presented as a link using the snippet.
 
        item.add(new Link("MatchLink") {
          private static final long serialVersionUID = 1L;

          /** Upon clicking this link, go to Match page */
          @Override
          public void onClick() {
            try {
              setResponsePage(new MatchDetailPage(mItem));
            }
            catch (Exception e) {
              // if there is an exception error
              e.printStackTrace();
            }
          }
        });
The code sets a Match name as a link and directs to the match detail page.

Page Layout with CSS
One of the challenges I have been encountering with the development is the layout design of the scoreboard. To the dismay of some of my teammates I have been using Devcathlon as an opportunity to learn html and css. The process has been painful at time however, I am learning about inheritance and how changing one value in one page can affect the layout in a different page.

Conclusion
The group got hit pretty hard with Milestone 3 due to a lack of sufficient progress. I think Milestone 4 will be an improvement and I think we built pretty neat system thus far.

Sunday, April 5, 2009

ICS 499: Match Building

Introduction
This week's iteration of Devcathlon required a lot of thought and research. The scoreboard went through another design in order to fill up screen space and reorganize the layout. Encountered issues with memory in Findbugs and building a Match to start testing the system.

Scoreboard
The scoreboard seems to be a hot topic within the group as it consumed our attention at the beginning of the week. Everyone decided to go with the design on the left. The new layout is simple and makes good use of screen space as you can see very little white in the background. Anthony Du came up with great idea of using Panels to implement a modular approach to the scoreboard. So each piece can be refreshed at according to whatever interval the administrator chooses. However, the Matches section, because it tracks all ongoing matches will be updated every 60 seconds.


Matches
One of the difficulties I am having is creating a Match. Part of the problem with Match creation is with the instantiation of a project. To create a project in Hackystat.
  • A user must receive and accept an invitation.
  • Must have access to Hackystat server for the SensorbaseClient.
  • The project must have an owner.
There is a lot involved in creating a Match that requires another day of tinkering. The alternative would be to implement a custom Project class that does not require the Sensorbase Client.