Our unusual unit testing..

July 16th, 2010

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

DIY Burglar Alarm

March 2nd, 2010

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.

‘New-WebServiceProxy’ cmdlet in PowerShell 2.0

November 9th, 2009
I’ve been using PowerShell quite a bit of late, bit of a learning curve but when you get into it it really is amazingly powerful (the ability to pipe objects (and not just text) is a game changer). Hence the name I suppose!
In the last while, I’ve been using PowerShell 2.0 in Windows 7, and with it the excellent ‘New-WebServiceProxy’ cmdlet. In a nutshell, this allows you to use Web Services API’s directly from the shell, which I’m finding incredibly productive.
Here’s a short example of using a relatively non-trivial Web Service: the BetFair API.
$bfExchange = New-WebServiceProxy -uri
https://api.betfair.com/exchange/v5/BFExchangeService.wsdl -Namespace
BFE
$bfGlobal = New-WebServiceProxy -uri
https://api.betfair.com/global/v3/BFGlobalService.wsdl -Namespace BFG
$loginReq = new-object BFG.LoginReq
$loginReq.username = <your betfair username>
$loginReq.password = <your betfair password>
$loginReq.productId = 82
$loginReq.vendorSoftwareId = 0
$loginResp = $bfGlobal.login($loginReq)
# Get some Betfair Events, happening in the next 3 hours
$marketsReq = New-Object BFE.GetAllMarketsReq
$marketsReq.header = New-Object BFE.APIRequestHeader
$marketsReq.header.sessionToken = $loginResp.header.sessionToken
$marketsReq.fromDate = Get-Date
$marketsReq.toDate = (Get-Date).AddHours(3)
# Invoke the call
$marketResp = $bfExchange.getAllMarkets($marketsReq)
# The format of the Markets, etc, is all documented here:
# http://bdphelp.betfair.com/API6/6.0/RefGuide/wwhelp/wwhimpl/js/html/wwhelp.htm
foreach($market in $marketResp.marketData.Split(’:')) {
$data = $market.Split(’~')
Write-Host “Market: ” $data[1] “Path: ” $data[5]
}
Although trivial, its a good example of ‘feeling your way around’ an external Web Service without having to write any real code (i.e. fire up VSTS).
If your thinking of trying out powershell, give PowerGui a look http://www.powergui.org, and also I find Console to be way better than the default Windows cmd. I’ve also plenty of interesting Powershell links bookmarked on delicious: http://delicious.com/dberesford/powershell

I’ve been using PowerShell quite a bit of late, bit of a small learning curve but when you get into it it really is amazingly powerful (hence the name I suppose!). The ability to pipe objects, and not just text, makes it excellent ‘glue’ for which to bind things together (e.g. data in SQL Server, Excel, Email, your own .NET components/services, etc).

In the last while, I’ve been using PowerShell 2.0 in Windows 7, and with it the excellent ‘New-WebServiceProxy’ cmdlet. This allows you to use Web Service API’s directly from the shell, which I’m finding incredibly useful. (You could do this in Powershel 1.0 but it was a bit more involved)

Here’s a short example of using a relatively non-trivial Web Service, the BetFair API:

#short script to log on to Betfair and grab some upcoming events

$bfExchange = New-WebServiceProxy -uri https://api.betfair.com/exchange/v5/BFExchangeService.wsdl -Namespace BFE

$bfGlobal = New-WebServiceProxy -uri https://api.betfair.com/global/v3/BFGlobalService.wsdl -Namespace BFG

$loginReq = new-object BFG.LoginReq

$loginReq.username = <your betfair username>

$loginReq.password = <your betfair password>

$loginReq.productId = 82

$loginReq.vendorSoftwareId = 0

$loginResp = $bfGlobal.login($loginReq)

# Get some Betfair Events, happening in the next 3 hours

$marketsReq = New-Object BFE.GetAllMarketsReq

$marketsReq.header = New-Object BFE.APIRequestHeader

$marketsReq.header.sessionToken = $loginResp.header.sessionToken

$marketsReq.fromDate = Get-Date

$marketsReq.toDate = (Get-Date).AddHours(3)

# Invoke the call

$marketResp = $bfExchange.getAllMarkets($marketsReq)

# The format of the Markets, etc, is all documented here:

# http://bdphelp.betfair.com/API6/6.0/RefGuide/wwhelp/wwhimpl/js/html/wwhelp.htm

foreach($market in $marketResp.marketData.Split(':')) {

$data = $market.Split('~')

Write-Host "Market: " $data[1] "Path: " $data[5]

}

Although trivial, its a good example of ‘feeling your way around’ an external Web Service without having to write any real code (i.e. fire up VSTS).

If your thinking of trying out powershell, give PowerGui a look, and I also  find Console to be way better than the default Windows cmd. I’ve also plenty of Powershell links bookmarked on delicious.

Windows build of ‘PJSUA’

September 21st, 2009

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.

Open week in Tramore Tennis Club

August 4th, 2009

It’s Senior Open Week in the local Tennis Club and for the first time ever (yes, this is 2009!) the fixtures and results for each day are all available on the website: http://www.tramoretennis.com(Disclaimer: I host the website, and my better half sits in on committee meetings and keeps the site updated)

The results/fixture management is done using a copy of Tournament Software which is used in the club office by the hard working people who run Open Week, and the updates are published to the Tournament Software web site every evening. Works quite well, previously all this information was just posted on the club notice board. So far we’ve had a great reaction to it and hits on the website are way up (from the usual dribble of visits it gets).

Senior Open Week is the highlight of the year in the club, there are over 200 entrants – mainly from the surrounding Waterford clubs but also a few from further a field; Cork, Kilkenny, and even Dublin! ;-)  I usually make a point of seeing the ‘A’ finals (which will be on next Sunday, August 9′th) each year where the standard of tennis is just incredible to watch. Good prize money for the winners I believe, and the cakes and sandwiches are usually top notch too!

Bealtaine Festival of Outdoor Science 2009

May 20th, 2009

CALMAST are running the Bealtaine Festival of Outdoor Science from May 17 – 24th with an incredible line up of outdoor activites for school kids and the general public in the local Tramore and surrounding areas (with the majority of the outdoor events happening along the Copper Coast), see the full schedule here.

These two in particular grabbed my attention:

Saturday 23rd May

For Family groups. General public

Event Mosaic on Annestown Beach
Venue Annestown Beach Co. Waterford
Build a giant Mosaic on Annestown using natural materials found on beach with Artist Sinead Driver and geologist Tina Keating of the Copper Coast Geopark
The Copper Coast Geopark runs between Tramore and Dungarvan, in Co. Waterford and comprises 25 km of beautiful coastline. But did you know that this part of Ireland was once close to the South Pole, exposed to violent volcanic eruptions and earthquakes? Did you know that the area was once a desert, dissected by large rivers, long before the landscape was gouged by glaciers? Here’s your chance to find out. The Copper Coast Geopark has it all, 460 million years of Earth history recorded in the rocks, explained on panels, brochures or during school visits and excursions throughout the year and guided tours in the summer.”

And the Comeragh walks (I received a little bit more information about this via email):

Woodlands and Uplands – 2 short walks in the Comeraghs

The Crough Walk is a 1.5km woodland walk along the banks of the Mahon Stream, where we plan to do some nature-spotting – mammal-tracking, tree-naming, stream-dipping and bird calls. We will then go to the Mahon Falls Walk to see some upland habitat and blanket bog and the special flora associated with it.

Date: Sunday 24th May 2009

Venue: Mahonbridge / Comeragh Mountains

The Comeragh Mountains form part of the largest SAC (Special Area of Conservation) in Co. Waterford, protected under law for important habitats. May 24th is Wildwatch Day, when events take place all around the country for people to get out, experience the wild and learn about the nature on their own doorstep. The Irish Wildlife Trust volunteers organise regular outings to places with interesting natural history:

Time: 2 pm

Duration: 2 hours approx

Age group: All Ages Welcome. Children under supervision

Meeting point if different to venue: Mahonbridge Village. There is limited parking at the walk start, so car-pooling is encouraged

To Book: Log onto www.livingearth.ie

Contact Person for more info: Marie Power Mobile: 086 8124275

Walk Leader: Denis Cullen

Special requirements for participants: The walk has been well finished by the Comeragh Community Group/Coillte and is suitable for buggies/wheels. However, it is an uphill course for the first half.

Directions to venue: From Waterford, take the N25. Turn off just past Kilmacthomas, for Mahonbridge. Follow signs for 3km approx. until you arrive in the village. The walk start is just 50m away, through village on the Comeragh Drive. Mahonbridge is located on the main Dungarvan to Carrick-on-Suir Road, about 16km from Dungarvan.

Plenty there to interest everyone, again see the full event list here: http://www.livingearth.ie/Full%20Events%20Listing. I think I might skip the ‘cooking seaweed’ event myself however ;-)

April 2009 Budget Calculator

April 7th, 2009

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

Twitter TV

March 20th, 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

Local history lectures in Dunhill, Waterford

February 26th, 2009

I’ve been attending the odd local history lecture in Dunhill now for the past few years, and they’ve rarely disappointed. The two recent ones in particular on the IRA in the local area during the war of independence were really excellent. Here’s the main link for the lectures: http://www.dunhilleducation.com/node/100

which unfortunately doesn’t contain the schedule, so here’s the scanned flyer that I have (and by the way, the tea and biscuits are also excellent!):

Julian Walton lecture series 2009

What I’ve been reading of late..

December 23rd, 2008

I’ve been going through a bit of a fantasy/sci-fi phase lately (well, since I was about 14), and the weirder the better it seems these days. Here’s some of the best of late (listed in order of best’ness):

books winter 08

  • American Gods Not sure how this passed me by (considering Sandman is one of my all time favorites) when it was published first but this is really great, fully deserving of all the awards its won (the Hugo & Nebula awards for 2002 in particular).
  • Only Forward Definitely in the whacked-out category, this book contains so many ideas that its surprising it’s so small! One for jogging your imagination, I thought it was brilliant. Will be trying out a few more of Mr. Smiths books in 09 for sure.
  • Treason An oldie (1979) but a goodie, and also quite whacked out. Oddly, this is the only other book of Orson Scott Cards that I enjoyed apart from the epic Enders Game series, I should really go back and give a few others a try.
  • Mockingbird Again an oldie (written in 1980) but also a goodie! Also won a Nebula award. File under ‘when computers go bad’!
  • I Am Legend A real oldie (1954) but definitely a classic – don’t let the recent Will Smith film put you off (haven’t seen it myself but heard its not great). Vampires rock.
  • Wrath of a Mad God (Darkwar) I’ve been following the adventures of Pug ever since I was given a copy of Magician at some point in the mid-80’s (and which I’ve read a few times since!). I’ve read all of Feists books down through the years and FINALLY (and a little sadly) its all over – this book just wraps it all up – veggie reading but of the best kind, I couldn’t put it down. At least I assume this book wraps it up – how more powerful can he get?? ;-)

If anyone has any recommendations along a similar genre, please leave a comment!