Archive for the ‘Uncategorized’ Category

I was never very good at understanding gambling odds until I had to run a book for our annual golf trip last year (and had to learn by being thrown in the deep end!). Everything you need to know about odds/gambling/book making/probability can be found in these three articles:

Requires a little bit of study but it’s worth it!

However, I still find fractional odds confusing and too difficult to process in my head (especially when being discussed in a pub!), so I wrote a very trivial mobile app that lists common fractional odds and their decimal equivalent (and associated probability). So if someone drunkenly offers you odds of 11/8 on something, you can do a quick lookup to see that 13/8 is 2.38 in decimal odds (i.e. you get back your money multiplied by 2.38), and also that 13/8 has an implied probability of 42.02% (i.e. the chance of this happening). I hope this saves me a fortune ;-)

You can browse to it on your phone here (and make a shortcut to it from your phones desktop for quick pub access). If you have an Android phone you can also download the app to your phones sd card from here and install it directly using an Android App Installer (see this article for instructions).

Also, this app was written using ‘Mobl’, see www.mobl-lang.org. The source .mobl file for it is on GitHub here. The HTML5 that Mobl generates from this file can be found here.

OddsConverter screenshot

I’ve been dabbling a bit recently in writing native extensions for node.js, specifically, I wanted to use exiv2 from within Node. Exiv2 is a fantasic tool for reading and writing Exif (and IPCT/XMP) metadata to/from photos, see Wikipedia or exif.org for more info. The ability to manipulate Exif data in my photos is just a small part of a bigger pet project I’ve been working on, which uses Node..

Rather than launch the exiv2 process from within Node (messy), I had a go at writing a native C++ extension that would use the exiv2 library to do the reading/writing. Additionally, this processing happens on a background thread, so its asynchronous when used from within Node itself (in keeping with the non-blocking Node way of doing things).

The result is here on GitHub: https://github.com/dberesford/exiv2node. See the README for usage, etc. Doesn’t cover all of exiv2′s functionality, but can be easily extended if necessary.

I also learned quite a lot about Node & V8 in the process, the ability to add easily add asynchronous extensions like this is a really awesome feature of Node. Some links I found useful for developing native Node extensions:

Finally, many thanks to everyone behind both Node and Exiv2.

Took a look at ZeroMQ this evening and as its a source only distribution, I thought I’d share my compiled windows library binaries and ‘hello world’ projects. (Note you can also get the library binaries through NuGet as described here if you wish).

The following zip file contains:

  • A build of zeromq library, version 2.0.10, built with Visual Studio 2008
  • A build of the C# ‘clrzmq2‘ bindings (Version 2), also built with Visual Studio 2008 (not 2010, which version 2 is targeted for)
  • Visual Studio 2008 C# Solution containing the ZeroMQ ‘Hello World’ C# client and server demo applications, as documented in the ZeroMQ Guide.

Congrats to all everyone involved in ZeroMQ, very impressed so far.

hwclient and hwserver in action

hwclient and hwserver in action

We’re currently developing an application for the Ingenico iCT 220/250 Telium terminals. Nifty little devices, ARM9, Linux, GNU C with an Eclipse based development environment.

It’s pretty bare bones from a development perspective however, so the first thing we developed was a unit test framework (pretty hard to do TDD without one!). Here it is in action:

Ingenico iCT 220

Ingenico iCT 220

Not that I have much faith in burglar alarms (having a dog is apparently more of a deterrent for thieves) but we were fast becoming the only house in our small estate that didn’t have one. I got a quote to have one installed but thought it was a bit on the high side (to put it politely), given that the alarm units themselves don’t cost all that much (and there’s also not really *that* much to them ;-) . So I went down the DIY route.

If you’re thinking of doing the same (or getting one put installed for you for that matter), first figure out what your requirements are, i.e. broadly speaking, do you want:
– wired or wireless alarm (probably depends on if your house is already wired for an alarm)
– with or without auto-dialer (i.e. do you want it to contact you or not)
– how many door contacts and IR detectors you need

Like securing anything, the more secure you make it the greater the costs involved, and this is particularly true when it comes to figuring how many sensors you need to secure your house to a level that you (and your pocket) are happy with. E.g. for our house, I went with a wireless alarm with an auto-dialer, contacts for all the external doors and enough IR detectors to protect the main downstairs areas and the upstairs landing.

So product wise, I eventually went with a Friedland Response alarm. I got the base SA5 package with the few additional sensors I wanted and an additional remote control. The main reason I went with Response is because they have their instruction manuals all online here, so you know in advance how it all fits together and whats involved in installing it. (When also get a really handy DVD when you buy the kit; its a pity they don’t have this online too as its a better illustration of what’s involved in installing each component).

Response SA5 Alarm

After a bit of shopping around, I found that Amazon is cheapest for an SK5 kit, however (and rather annoyingly) they don’t deliver to Ireland (apparently they don’t/can’t fly batteries across the pond for security issues – don’t know if this is actually true or not). I also found the the local B&Q are selling an SA5 kit for €380, that’s quite a paddy tax guys! There also wasn’t much available on ebay at the time (although there are quite a few generic looking wireless alarms for sale if you want to chance a cheaper kit). So in the end I bought it from the Response website themselves, they do deliver to Ireland if you ring them up and ask them to courier it (costs an extra £11.50).

Installation wise it all went quite smooth (I’ve had much harder self assembly jobs!), but I did take my time at it and it’s always fun to get the drill out. You definitely don’t need to be an electrician to put in a wireless alarm. Configuring everything from the control panel (i.e. the zones, numbers to dial, etc) is just a case of following the steps in the manual. The one thing I was a bit worried about before hand was how to drill the door contacts in to the patio door, but thankfully they optionally come with sticky bits so installing them only takes a minute, result!

So in all it’s worked out very well all told. If you are considering the DIY route and have any questions, leave a comment below or drop me a twitter“>tweet.

I was doing a bit of research into SIP development and I struggled to find to pre-built binary for PJSUA (a sample console application for the excellent PJSIP) for windows.

There are quite a few steps involved in building PJSIP on windows, so if anyone is looking for a pre-built binary for PJSUA for windows, here it is. It’s built with MS SDK 7, and version 2914 of the pjsip trunk.

Although it is billed as a reference application, PJSUA is really quite comprehensive in terms of functionality, and works very well when run against my Blueface account.

Many thanks to everyone behind the PJSIP project, I hope to use it in earnest in the near future.

Myself and John have released a Budget Calculator for this emergency 2009 Budget which you can run here.

Your not likely to find good news, so please don’t shoot the messenger! By the way, RedOakTaxRefunds is the relaunched & rebranded version of Tax123.ie.

Plenty of disquiet around the country over this budget, a lot of unhappy campers (myself included!):

http://search.twitter.com/search?q=bludget

http://www.scribblelive.com/Event/Irish_Emergency_Budget_2009

In the past few weeks, Twitter has crossed over to our living room and is now a part of our TV viewing experience, primarily for Dragons Den. The Irish version of Dragons Den is mediocre in my opinion, but the fun part is when you combine it with the ‘back chat’ on #ddire. For an explanation of how these ‘hashtags’ work on Twitter, see here.

(apologies for the poor picture, but you get the idea ;-)

Twitter Dragons Den

In the picture above, Twitter is running on my media PC box (which I built a few months back) and our TV supports PIP, so that’s a mini-screen Dragons Den with various peoples ‘tweets’ about whats happening in the show in the background.

Dragons Den is the only show at the moment that I watch like this, have tried following twitter groups while sporting matches are on (for example, George Hook live tweeted during last weeks Ireland/Scotland rugby match) but personally I find I’m a bit too engaged in the match and the tweets are too much of a distraction (although I do scan them at half time). I’ve also heard that people live tweet during the Late Late Show, but I’m sorry, no amount of amusing Twitter comments would make me sit though that ;-)

I know there are many ways of following Twitter whilst watching TV (i.e. laptop, mobile, etc) but I think it would be really great if it was integrated directly into the TV itself. You could optionally have tweets relating to the show your watching scrolling across the bottom of your TV screen (like a stockticker), or superimposed like you can do with teletext – all controllable from your remote.Twitter Button

Late night last night developing the first version of the 2009 Budget Calculator for Tax123.ie, you can run it from here:

https://tax123.ie/Budget2009Calc.php

Harsh budget this year, don’t expect to be better off!

We will be improving it over the coming days, the main omissions at the moment are the changes in Mortgage Interest Relief and also the Car Parking changes.

I attended the first Transition Town Tramore (t3.ie) event back in September and was very impressed by it, not having heard of the Transition Towns movement before. It was a very informative presentation from Dave Philips from the Cultivate Centre in Dublin and was quite well attended.

What impressed me most is that we hear a lot about how doomed the planet is, etc but very little about what we can do about it at a local practical level, and the Transition movement has plenty of ideas here. It’s also heavily based on the idea of community involvement and transition at a community level, and anything in my view that promotes community spirit and getting to know our neighbors better should be supported by everyone.

So the next event is on this Thursday, 8pm in the Grand Hotel Tramore, brief as follows (more information can be found at http://t3.ie/):

Transition Town Tramore Presents

The Power of Community: How Cuba Survived Peak Oil

In the second of a series of events to raise awareness about the issues of Peak Oil and Climate Change, the Tramore Transition Town Initiative is showing the award winning film The Power of Community on October 16th at the Grand Hotel Tramore.

When the Soviet Union collapsed in 1990, Cuba’s economy went into a tailspin. With imports of oil cut by more than half ‐ and food by 80 percent ‐ people were desperate.

This film tells of the hardships and struggles as well as the community and creativity of the Cuban people during this difficult time. Cubans share how they transitioned from a highly mechanized, industrial agricultural system to one using organic methods of farming and local, urban gardens. It is an unusual look into the Cuban culture during this economic crisis, which they call “The Special Period.”

The film opens with a short history of Peak Oil, a term for the time in our history when world oil production will reach its all-time peak and begin to decline forever. Cuba, the only country that has faced such a crisis ‐ the massive reduction of fossil fuels ‐ is an example of options and hope.

“Global Oil production has not grown since May 2005” says Stan Nangle, a member of Transition Town Tramore ”and we have been on a plateau of about 85 million barrels of oil a day since them. We know that sooner or later total daily production of oil will start to reduce ‐ as it has in individual oilfields such as the North Sea ‐ and this is going to have a major impact on how we live and how our economy works.”

The Power of Community offers an insight into how Cuban society adapted to meet the challenges posed by Peak Oil, often without support from the Authorities, and how the Cuban people turned the situation around by using their initiative and working together to achieve a common goal.

“We are constantly hearing and reading about the problems we will face from Climate Change and Peak Oil, but nobody in authority is telling us what we need to do to overcome these difficulties” says Edel Jennings of Transition Town Tramore. “This film shows very clearly how Communities can pull together to find solutions to the problems they face and it gives people a positive example of what can be achieved.”

Background:

The Tramore Transition Town Initiative is a community group which is actively working to find answers to the question: “ how can our community respond to the challenges of Peak Oil and Climate Change?”

The Tramore Initiative is based on the Transition Town model developed in Kinsale Co Cork by Rob Hopkins, and currently being implemented in more than 800 communities worldwide.

The Tramore steering committee is currently working to build awareness of the issues of Peak Oil and Climate Change in our community by running a series of public events, and through direct contact with community groups, clubs and societies in Tramore. The series of awareness events will run on a monthly basis from September 2007 to February 2008 and will be followed in March 2008 by the setting up of working groups to look at how we might mitigate the effects of Peak Oil and Climate Change in the areas of food, energy, transport, health, heart & soul, economics & livelihoods.