|go ahead... be a heretic|
From test harness to CPANby dwm042 (Priest)
|on Apr 16, 2011 at 17:44 UTC||Need Help??|
dwm042 has asked for the
wisdom of the Perl Monks concerning the following question:
I started blogging sports recently and while doing so I've been running into algorithms and procedures in the area of sports analytics (what used to be known as sabermetrics). Sports analytics received a huge shot in the arm with the publication of Michael Lewis's book "Moneyball", and these days, according to Mark Cuban, perhaps 2/3 of all US basketball teams have an analytics team. That said, some of us like to do this on an amateur basis. One important algorithm is Doug Drinen's simple rankings system. I've implemented this one 5 different ways now. A particularly clean version can be written in PDL.
I have this function wrapped in Module::Starter with a working test harness now, and getting something like this into CPAN is the reason I just asked for a PAUSE account. Just, I don't see this code as CPAN ready.
1. There needs to be a non-pdl version.
2. The non-PDL version needs to accept very simple input and give a simple answer; input as an array of games, output as a hash of team named mapped to SRS values.
3. error checking on input.
4. helper functions? yes or no? Is something like this okay packaged with the PDL version?
What I'm trying to do is some "design on paper" before I upload..
5. Name space. I was using Sports::Analytics::SRS but a simple ranking function isn't the "System". SimpleRanking spelled out with Analytics or SportsAnalytics as a predecessor seems more appropriate.
Sports isn't an initial name anywhere in CPAN that I can see.
Algorithm::SportsAnalytics::SimpleRanking, perhaps, with Algorithm::SportsAnalytics::SimpleRanking::PDL for a PDL implementation?