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...
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
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...
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...
Cryptanalysis - Vigenère Cipher
04 May 2015
In this post I cover the Vigenère cipher. It's an encryption system that builds on the Caesar cipher covered in the previous post, with the additional twist that it uses multiple shift values instead of one. Caesar's cipher shifts every character...