CommuterJoy » Logbook

« logbook home

Posted by mattc at Dec 27, 06 07:20 PM ... Comments (6)

I've released some code I wrote over the summer in the hope I can find someone with a few hours to help me finish it off. As in, someone who writes better Perl than me.

I've called the project betfairfree and, as the description on Google's subversion hosting says, it's an 'interface to the free version of BetFair's Sports Exchange API', and to liberally quote from BetFair themselves ...

"With the Exchange API, you can communicate directly with the Betfair database in XML format via a SOAP interface. By using the Exchange API, your application can provide a custom interface, functionality and specialized operations not otherwise afforded by the web interface."

The code is in a usable state, but certainly not finished, and suffice to say I don't make my living writing Perl.

The main things on the todo list are a) to get a complete coverage of the free API (probably only implements 60% of it at the moment), b) as always, the code deserves a second pass with some areas needing refactoring, and c) some decent examples of what one might do with it, which will of course be the fun part.

It's not going to get finished in a hurry, by me at least, but I'll try to transfer my own notes in to the various areas of the now-public project wiki, issues etc.

The API is described in SOAP, which I've not used before, but I enjoyed working with strongly typed XML documents, and Matt Sergeant's XML::Xpath module was great for removing the headache from working with the heavily nested nodes and multiple namespaces that seem to come hand in hand with SOAP.

So if you have any interest, do download the project files and drop me a line if you have anything to contribute.

Posted by mattc at Nov 26, 06 07:22 PM ... Comments (0)

Every year I play the Times Fantasy Football and every year I struggle with finding the best value players.

Typically the players that get last minute transfers from the bench of a good team to a starting place in the first XI of a lesser team are the best picks. Jiri Jarosik being a prime example who ended up amassing a huge number of points after Chelsea dumped him on Birmingham a few weeks before the transfer deadline.

Anyway, here's the output of a program that will periodically reorder the latest player points tables from The Times website in to a fairly crude 'best-value' metric.

The cheapest players earning a relatively good number of points throughout the season will appear at the top end of the tables, the expensive players earning a similar amount will drift around in mid-table indicating that they are overpriced.

The generated files are stored in YYYY-MM-DD format.

random bookmark
link summary month October 2009 (1)
September 2009 (14)
August 2009 (16)
July 2009 (21)
June 2009 (24)
May 2009 (16)
April 2009 (2)
March 2009 (22)
February 2009 (11)
January 2009 (11)
December 2008 (9)
November 2008 (16)
October 2008 (18)
September 2008 (11)
August 2008 (12)
July 2008 (20)
June 2008 (15)
May 2008 (27)
April 2008 (9)
March 2008 (10)
February 2008 (8)
January 2008 (8)
December 2007 (12)
November 2007 (10)
October 2007 (10)
September 2007 (6)
August 2007 (13)
July 2007 (8)
June 2007 (10)
May 2007 (12)
April 2007 (5)
March 2007 (12)
February 2007 (13)
January 2007 (22)
December 2006 (21)
November 2006 (28)
August 2006 (1)
category code (15)
food (4)
notes (4)
photo (18)
project (2)
quote (12)
sketch (13)
soup (10)
travel (2)