Try Again. Fail Again. Fail Better.

Coding snippets, experiments and moments of madness, to moments of clarity.


16th Jul 2014

For the past 6 months I’ve been working on setting up RabbitMQ for several tasks. As with anything it has it’s own share of seemingly tricky to navigate problems. I’m leaving these tips here as much for my own benefit later as for everyone else. When no_ack is set to true for basic_consume in AMQP 0.9.1 at least; that means the server does not expect an acknowledgement to be sent from the consumer when it receives a task i.e. if your consumer can fail for whatever reason, and you want a task to be requeued, set no_ack to false. One thing that plagued me for a while was seeing a PRECONDITION_FAILED message appear when a task failed on the consumer. Check your code, and then check it again to make sure that if you nack a task, that you don’t later ack it. Any blog post, or Stack Overflow article I ever

Continue Reading...

The Summit

1st Nov 2013

For the past few days, I've been back in Ireland at The Summit in Dublin with my colleague Tyson Miller. We're here with Recon Instruments, and we've met some of the smartest, coolest and most interesting people in the tech community. It's been fantastic to talk with these people, listening to the problems they are trying to solve and the challenges that they faced head on. There were some really amazing projects, and the talks we attended provided some great ideas that we can take away and work with. We were invited to an evening with IDA Ireland in the beautiful House of Lords in the Bank of Ireland building in the city centre. Meeting some of the conference speakers such as Tony Hawk and Jamie Heaslip proved a highlight, but listening to the insight of Jordan Casey - a 13 year old developer who has launched several apps in the…

Continue Reading...

Vancouver Dev Week

14th Nov 2013

This week is Vancouver Dev Week - an event which has come about due to the popularity and quick sell out of CascadiaJS. Start ups were encouraged to host and attend events across Vancouver. On Tuesday night I went to one event at Unbounce HQ while a few of the guys from the office went to the Startups Unite job fair in Gastown. After a slice of pizza, a brief tour of the offices by James Brennan- an Unbouncer, and a chat with Matthieu Macret and it finished up with a programming challenge. Taken from Pragmatic Programmers Dave Thomas' website Word Chain, is a challenge to convert a word e.g. cat to another e.g. dog in the fewest moves possible. There were some fine looking solutions on the (Table Tennis) table at the end of the hour, with solutions attempted in JavaScript, Python, PHP, Ruby, Scala and Java. Unfortunately my attempt didn't quite

Continue Reading...

Strava PRs

30th Jul 2014

Edit: I’ve now made a GitHub repo for this albeit small piece of code. Any forks / pull requests welcome! I bought a new road bike about 6 weeks ago now, and a lot of my work colleagues at Recon use Strava to keep track of how far we cycle and run. One of the coolest features we use most often is segments, and more importantly our achievements on these segments. Each of us have our own favourite segments - usually shorter segments where we can squeeze out seconds. One of the measures we use for somebody having a “good” trip is how many PRs they set on that trip - we don’t usually count 2nd or 3rd fastest times, because let’s face it if you ain’t first, you’re last. Calling out the breakdown of achievements is one of the features I’d love to see on an activity page, but I imagine it was

Continue Reading...