Thoughts on Go

Traditionally I’m a pretty late adopter of new trends, and Go has been out for something like 6 years now, so I figured it would be a good time to try it. I’ve been learning it for about 2 months; I’ve done dozens of Codility exercises, written a WebSocket server and a statusbar daemon, so I think I’ve given it a good go. My experience has been generally positive and I’ll definitely use it in future....

June 27, 2015 · 5 min · Mike Cartmell

Docker: first impressions

I’ve been wanting to try Docker ever since I saw a talk about it at Red Dot Ruby Conf. The idea of being able to build a container in development and ship it to staging, then production without any changes is extremely enticing, although I admit to being a little sceptical. Now I’ve implemented a Docker deployment process for the first time with one of my projects. Is Docker the holy grail of cloud deployment, or is it all just hype?...

November 16, 2014 · 7 min · Mike Cartmell

Automated Rails testing with Capybara and PhantomJS

Capybara is one of those tools that sounds great but is often frustrating. The claims of ‘no setup’ and ‘intuitive API’ make it sound like automating your browser testing is going to be a simple task. Unfortunately, the nature of these full-stack tests mean they’re often very tricky to get working reliably, and this has always put me off before. Testing should save you time, not create extra work. This weekend, starting on a new test suite, I decided to go about really getting a solid Capybara setup, and get a complex test passing every time without anysleep hacks....

October 26, 2014 · 5 min · Mike Cartmell

Making a game with Phaser

Today I felt like making a game, so I learnt about Phaser and set myself the task/challenge of recreating a simple game from my childhood. Phaser is incredibly fun and easy to get started, I’d recommend giving it a go! The game I chose was Tanx. I started with the excellent Phaser tutorial and converted it to CoffeeScript. It’s perfectly fine to use CoffeeScript with Phaser, or I guess any other language that compiles to JavaScript....

April 20, 2014 · 4 min · Mike Cartmell

Variable scope in Ruby

One big difference between Perl and Ruby is that Ruby has no lexical variables. This confuses me when programming Ruby, because I’m used to thinking ifwill create a new scope. It doesn’t. Variables defined inside if will be available outside, because they belong to the method scope. For example, in Ruby you can do this: def foo if true x = 2 end puts x end foo This prints 2....

April 14, 2014 · 2 min · Mike Cartmell

The Heartbleed bug

On reading about the Heartbleed bug bug, my first thoughts were: This sounds quite simple, is it really easy to spot? Why wasn’t this noticed during review? The bug is in the Heartbeat Extension for TLS, as described in this draft. Interestingly, this document does actually highlight the importance of checking the payload length: If payload_length is either shorter than expected and thus indicates padding in a HeartbeatResponse or exceeds the actual message length in any message type, an error Alert message using illegal_parameter as its AlertDescription MUST be sent in response...

April 8, 2014 · 2 min · Mike Cartmell

10 Singlish phrases I would actually use in the UK

Possibly not everyone knows that English is an official language of Singapore (one of 4.) What’s more, there is an unofficial (and sometimes frowned upon) mini-language called Singlish, derived from bits of Hokkien, Teochew, Malay, English and Tamil. Most of these words exist either to express something that does not have an English equivalent, or to say something more succinctly. Either way, it does come in handy, and it’s fun to use language that would be unacceptable or confusing back home!...

March 17, 2014 · 3 min · Mike Cartmell

Free tissue packs

This is a common sight at lunchtime in Singapore: tissue packs, often several next to each other, seemingly left behind on the table. One might, upon first encountering this phenomenon, assume this is the generous act of kind strangers. But it is not. You must not take the tissues. For they have an important message, and that message is this: Go away. Take your food and sit elsewhere, because this seat is taken....

September 30, 2013 · 1 min · Mike Cartmell

Settling in Singapore

So I’ve been in Singapore just over a week, and so far it’s going pretty great. It’s ridiculously easy to settle in here. Everything is crazily efficient and convenient. I think even if you’d never been here before and wandered around aimlessly for a whole day, you’d still find everything you needed. I kept my sim card from when I was here on holiday. I switched it over on the plane and it was working before I got off, including data....

September 14, 2013 · 3 min · Mike Cartmell

On moving

In a little over 4 weeks I’ll be starting an exciting new chapter in my life. I’ll be moving to Singapore, staying in an area called Sengkang, to be with my girlfriend Brin. And strangely, I’m not feeling nervous about it. Perhaps I will nearer the time. But I’ve had a lot of time to think about it; pretty much since I met Brin back in January (generally a good idea if you’re getting into a long-distance relationship), so I’m mainly just excited that the day is finally (almost) here!...

August 4, 2013 · 4 min · Mike Cartmell