Sunday, March 22, 2009

Spring Break!

What better way to start off spring break than with an assignment? Haha. Well to be truthful, developing on Devcathlon the Spring Break isn't too bad. I don't have to worry about limiting myself to a certain amount of time because I need to do other assignments.

What I did:

As I write this blog, I have 2 commits since we disbanded Wednesday. I probably should have broken it up into smaller commits. It's just kind of hard to stop sometimes. Time flies by when things are finally clicking, then you don't want to stop.

I was successful in adding a mockup of both Team Manage submenu and Team Invitations. I got much farther wicket wise with the Manage submenu. I spent a lot of time focusing on actually adding a team. I fiddled around with the TeamManager and successfully created a team with no members, and myself as the owner. Right now, I have a genericInit() method that adds a team through Java code. So I then retrieve the list of teams to dynamically populate the Manage submenu. I just need to apply that with a wicket form and I think I am close to having a fully functional "Create a Team".

Contributed to packages:
  • org.hackystat.devcathlon.ui.page.teams.manage
  • org.hackystat.devcathlon.ui.page.teams.invitations
  • org.hackystat.devcathlon.ui.page.teams
Number of Meetings:
1 face-to-face meeting at Holmes Building
2 Google Chat

DevTime:

Hehe... I had a little more time on the weekend than early in the week. o.O

My Issues:
Issue 44: Add mockup of Team Manage submenu. Status: Done.


Issue 49: Add mockup of Team Invitation submenu. Status: Done.

Issue 54: Implement Creating Team form. Status: Accepted.
Issue 55: Implement Team Invitation. Status: Accepted.


Monday, March 16, 2009

CSS - Confusing Stuff, Son

Alright, so the "son" was a cheap add-on to make the CSS acronym work. But hey, that's the best I can do. Anyways for the task this past week, we went back in time to rediscover our old friend (and enemy... sometimes), Wicket and start thinking of how to implement things for Devcathlon using it. Particularly this week, we worked on modifying a menu bar.

For now, our menu bars are not your fancy javascript drop-down menus, but it does it's job. Borrowing the CSS code from Kalsey (http://kalsey.com/2003/05/css_tabs_with_submenus/), we have menus bars with submenu's right below it. We needed to modify the bar so we address the following issues:
  • support 10 submenus (wraps around screen, and overlaps content ?)
  • realize the shortcomings of the submenus (due to its absolute positioning)
  • indicate which page user is currently viewing (by making menu link bold)
Problems Encountered:

I was able to figure out the last two tasks, but not without some difficulty. The hardest one was indicating the page the user was viewing. From the beginning, I knew I wanted to add a class tag "selected" and just add a class property to the CSS making the font bold. After hours of slaying away trying to get it to work, I finally got it by adding this one line to each Menu's page (plus the CSS property in menu.css):
// from SubMenu14Page
// tags corresponding link with class, "selected" for CSS to make bold
get("SubMenu14Link").add(new SimpleAttributeModifier("class", "selected"));

My Shortcomings


The only task I was not able to finish was the 10 submenus. I assume the problem occurs when there are 10 submenus, the submenus wrap around the screen overlapping the page's content. I can only assume because 10 submenus displayed fine for me because I had my window maximized.

I tried adding padding & margins to the submenus creating whitespace between the submenu and content. Nothing. I tried adding margin & padding to the content with the same idea, but that was no good. Maybe the problem is the wrapping itself. I honestly wouldn't want my list of tabs wrapping around the screen if I purposely resized my window to be smaller.

Oh well... guess I'll find out from the others when this is all said and done. I gotta say though, FireBug (which Anthony Du pointed out to me in our last mockups) was extremely useful in this exercise. Because some of my css properties weren't refreshing when I modified the files, I just used FireBug to preview properties on the fly. Good stuff.

Distribution file: [Download Link]

Sunday, March 8, 2009

Procrastination is Bad

Alright, this was my second event for Devcathlon and things were less scary and confusing. I wasn't completely lost, which felt pretty good because it meant I was making progress.

My event for this week was, "Don't Wait Until the Last Minute". Basically, the event calculates the average number of builds, commits, and development time (devTime) over the entire match. Within the last n days, if any two categories (builds, commits, devTime) exceeds their respective averages by over m percent, then the team will be penalized. The event is meant to discourage procrastination, so there won't be any last minute "rush-to-finish-up" moments.

Although the event specifications indicated to take the averages over the entire match, I opted for something a little different. If we were to continuously take the averages throughout the entire match, then the average may fluctuate if there is a lot of activity within the penalty period, making the policy a little more lenient (see below). To discourage this work around, I only took the average during the non-penalty period.


What I Learned


I feel through this exercise, I learned a bit more on where to look for data retrieval and retrieving different types of SensorData. I initially retrieved all data using DailyProjectDataClient. But after realizing that I need to retrieve data for an extensive period of time, it would take forever to loop through an entire match collecting 24 hours of data at a time. SensorBaseClient allowed me to retrieve data within a time period I specified.

During my earlier encounters, I had trouble retrieving commit data. But after a (long) look through some documentation, I was able to solve it by adding a property field that was missing. On a side note, I probably would have been deducted points for this event. While I did start early, I think I spent more time towards the end.