Proxies in ECMAScript

31 Mar 2018

What are they? Proxies give us greater control over what happens when we interact with objects. They wrap a target object and expose some of the internal operations on it. This means we can customise what happens when we get or set a property, create...

Continue Reading →

Typed Arrays in ECMAScript

28 Feb 2018

What are they? Typed arrays provide a way to quickly and easily manipulate the raw data stored inside a binary data buffer. This is really useful for processing audio and video data. They're similar to arrays, but with some subtle differences we'll...

Continue Reading →

Test Driven Development

18 Apr 2017

Welcome to Container Industries Ltd. As the new engineer here you've been assigned the job of developing the company's container functionality. The following requirements have made there way over to your desk: Items can be added to a container

Continue Reading →

Strategising your way to clean code

22 Sep 2016

The Strategy design pattern is neat. It decouples algorithm implementations (the how) from the objects that use them (the what). This separation means the cost of changing either the algorithm or the code that uses it is nice and low because...

Continue Reading →

A JSON rabbit hole

07 Jul 2016

I fell down a really curious rabbit hole the other day and thought I'd share the adventure. I was using a gem that handles a response from an API (pretty standard, right?). The response was handled inside the gem like so: def get(path, options...

Continue Reading →