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