10/02/2010
I still get quite a few hits coming in for this. I’ve got it all up online and working again. I’ve added a redirect from the old link to the new home so wherever links to it are scattered about should magically rework again. The new home for the compare script.

31/01/2010
Some time ago I noticed that the up/down count on comments & submissions on reddit would vary wildly under the hood whilst the aggregate displayed would stay fairly steady quite often. By that I mean a comment that had 20 points might be flicking wildy as redditors turn arrows blue & orange.
I thought it might be interesting to graph such activity and I had at first thought of using google charts’ fairly decent api but quickly discovered Flot and was completely sold. If you have ever needed to create some small chart in a web app and started to roll your own solution (very often people will do some graph drawing server side then send over an image) then stop! and go look at Flot. Its an amazing bit of javascript.

In hindsight the “battle of your comment” isn’t as interesting as I thought it would be but it is quite nice to watch how a submission progresses on the site over time. Its only really useful for semi-popular ones as otherwise there just isn’t the data. The whole thing works by appending .json to the reddit url given. That’s the unoffical/offical reddit API. That is then parsed to grab the up/down vote count and then its simply sent back to Flot as JSON itself.
I have noticed that whilst the comment count on the site will vary much more rapidly the JSON file itself doesn’t and seems to lag behind somewhat. I guess that makes sense from a load/abuse point of view. In real terms this means there’s not a lot of point setting the timeout on this page to hammer reddit for “by the second” data.
Some may find it useful so here it is. I have it currently sitting at jaymzcd.webfactional.com. This makes use of cherrypy and jquery. If you’d like the code its here.
7/04/2009
I absolutely LOVE Trials2 from Indie developer Red Lynx. In fact, its the first game I’ve actually “gone out” and bought in a long time. I say “gone out”, its available on Steam. Anyway, one minor annoyance I had was that although the scores for people are available online and per-track in-game I found it a bit annoying clicking through each page when I got home to see if any of my scores had been beaten by friends.
So I knocked this up. Its quite simple, it uses a combination of cURL & xpath to grab the page for the 2 profiles you’re interested in and then simply loads those up into an array. I thought I’d beautify it a bit to fit in more with the Trials 2 site. You can check it out here (/code/comparetrialsprofile.php). It does what I’m most interested in – compare your global ranking per track with a mate. With bank holiday weekend coming up I might flesh it out a bit.
Some things I’d like to add would be over-all summaries and the ability to compare more than one person side by side – maybe grabbing the team members from the team page etc. Hopefully red lynx dont change the layout/format on their site
Once again, kudos guys on an incredibly addictive/challenging/beautiful game.
I’ve defaulted it to me on the left & my mate that introduced me to Trials on the right (he’s jolly good).
Note: occasionally you might get a timeout and your browser will try and let you save the file – just reload
DOUBLE NOTE! As i’ve moved hosts I need to reconfigure this to run. So sorry, at the minute I need to dig out the old hdd as my helpful ex-host nuked my site when whilst they locked me out.