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 →

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...

Continue Reading →

Cryptanalysis - Caesar Cipher

22 Jan 2015

How do we make sure the messages we send are only read by the intended recipient? This problem has been bothering people for a long time, with examples of encryption being used to hide messages going back to ancient Egypt, some 4000 years ago. I will...

Continue Reading →

Number Theory Part 2

17 Nov 2014

This post covers more of the number theory I found useful for understanding the basics of public key cryptography. I've covered Fermat's little Theorem, Euler's Theorem, eth roots, and discrete logarithms. Once this stuff is covered you should be able...

Continue Reading →