Wednesday, February 25, 2009

On Your Mark

This week we began actually programming for the Devcathlon through Starter Events. The event that I worked on involved rewarding teams who build before they commit. They would be rewarded if they build locally before committing and penalized if they didn't. There are also bonus points that occur when a team is on a build-commit streak. More info on the events can be found here.

One of the problems I faced while programming was figuring out the scoring. Eventually I figured out that BaseScoreWeight was a multiplier for the score. But that lead to another problem with the scoring: deductions. Because of the use of the multiplier, point deductions was made much difficult. I would have gone into EventScore class and add the capability to hold deduction info. That way the points computation would be made much easier. Right now, probably the only way to get deductions to work correctly is convert them into fractional deductions, which is rather awkward. My event was later changed so that I wouldn't have to worry about deduction weight but I think this is still an issue that needs resolving.

Another problem that I had was making commit data for test cases. I made a makeCommitData method in DevcathlonTestHelper class to help me out.

Another challenge I faced was trying to figure out how the sensor data type worked. This page help me greatly but I'm still a little sketchy on some of it. Eventually I found that there were 2 different sensor data types, build and commit, that I had to make into separate indexes.

I had some difficulty with getting successful test cases. I found that it was mostly issues dealing with the timestamps of the build and commit data such as timestamps that were made that weren't in the time interval I was looking for or timestamps of builds that were after commits when they should be before.

The Devcathlon program can be found here.

No comments: