January 27, 2013

Geek's take on NHL

Few years back I wrote a piece of software for tracking sport results. It was a standalone application using an in-process open source database. While it was OK, it required some setting up and I never quite finished it. Therefore I used to run it through the IDE. The user interface for adding the game data also felt a bit clumsy and eventually I lost interest in continuing the development. Perhaps there was just too much design compared to what I actually wanted.

I'm not a big sports fan, but it's really nice that NHL is on again. From the betting perspective, NHL seems to be quite a challenge. This gave me some extra boost to come back to the original problem of recording and analyzing the sports results. I decided to start from scratch and build a very primitive solution with minimal maintenance burden.

The first problem was how to store the data. I wanted a text based format so that I could easily create some test data to play with. I chose JSON format, which is supported in many platforms and languages and is more simple than XML. JSON format didn't practically set any restrictions for other design decisions.

I wanted an effective programming language with good libraries. Choosing Python was easy, as I also wanted to improve my skills with it. With Python I would have a cross-platform application, although the interpreter is required to run it. For me, that's not really a restriction.

The first goal was to read and and print some game data to the console. With Python JSON libraries this was a no-brainer. In addition, I created some simple model classes I would need later. I found adding the game data in text editor a bit error prone, so the next thing was to find a better solution for it. I decided to temporarily extend what originally was just a printing script to write the game data and created a command-line support for adding game results. This was a lucky accident. Using command-line was so fast that creating an as effective GUI for the same purpose is not a trivial task.

My project is now in a point where I have an unprofessionally built Python script already doing some filtering and analysis from the game results. Building the functionality with Python was amazingly simple time after time. The end result so far is not what thought it would be. It's not professionally built software, but still simple, fast and effective. Considering the spare hours invested during the last two weeks and how useful the application already is, this must be one of my favorite projects that I will remember for a long time.

I will continue adding new command-line functionality and refactoring the existing code to make it more modular. After this it's hard to say which direction the project will take. The original thought was that I need a GUI. Now it feels more as optional. The project has also been a good reminder about how powerful a simple command-line interface can sometimes be.

Let's see if my new tool can really help me pick the right NHL games to bet on.

January 05, 2013

Sports betting recap - December 2012

Total balance of betting accounts in December: -16.15%

There should be a way to know the days you just don't want to bet on any game. December was going just fine - until the last weekend. Several ice hockey bets landed only a couple small wins. If this one weekend could be erased, the December result would look much better.

While some bigger wins are inevitable in the long run, my system is obviously faulty unless results improve during the coming months. In January I'm going try out some counter bets to improve the stability of my system. For this weekend, I have a significant amount of bets in and I'm hoping for a better result than the last weekend of December...