- Deriving Geographical Coordinates from Map Projections
Given a flat projection of a world map, and an x/y coordinate on that projection, how can we derive the latitude/longitude on the globe?
- Creating tag index pages with Gatsby
I've been giving Gatsby a trial run in this new version of my site. When using GitHub pages, one of the things I'd always longed for was dynamic tag "index" pages for my blog posts.
- Easy VM updates with Ansible
I have a load of VMs running on a physical server in my house. I started with a few VMs and a manual process, but now I have many VMs and I'm tired of updating them all.
- The trading market used for almost every Cities: Skylines interaction
In Cities: Skylines, as your city grows you'll notice people moving around the city - whether on foot, or in a vehicle. They move around for a number of purposes: residents look for jobs and families, tourists visit entertainment centres, and city services such as the fire and police departments will attend calls. There's even a supply chain where logs, coal, goods, etc, both raw and processed, are taken from one business to another (or exported!) as they get refined.
- Building a Super-Robust HTTP API with Isomorphic TypeScript
I've been a fan of TypeScript for a few years now, but it wasn't until I used it isomorphically that I really appreciated how beneficial it can be when it comes to making systems more robust.
- Return Early, Return Often
The cognitive load introduced by having a single return statement in a function (normally accompanied by a
result
variable) is often underappreciated, but luckily with a little refactoring it's fairly easy to resolve. - The Builder Pattern and How It Will Save Your Bacon When Unit Testing
When writing unit tests around classes, often each test will call the constructor for our class and provide dependencies as arguments. However, this introduces some coupling between the tests and the signature of the constructor, which can make it very difficult to change our constructor in future.
- Unit testing TypeScript with Alsatian