Posts
Infrastructure Testing Frameworks
I’ve been taking a look at some infrastructure testing frameworks recently, and also trying to wrap my head around the concept in the first place.
To begin, what is an infrastructure test framework, and why would I need one? As developers, we’re used to writing tests for our code. Once we are ready to deploy that code, it makes sense that we would want to ensure our deployment went as expected, and that our production environment is properly configured and secured.
Posts
Lets Build a Web Server by Ruslan Spivak
Over the Chinese New Year holiday, I was working through this series of web tutorials on Ruslan’s blog. Indeed, as the articles recommend, typing out and testing each bit of code (using curl) helped me to understand each point the author was trying to illustrate. It’s always nice to get to write something low-level, because the abstractions you work with (sockets, file handles) are all pretty mature so any problems you encounter are most likely to be found in your own code.
Posts
Getting Started with Shaders
Shaders are essentially programs which can be compiled and run within your graphics card (or CPU if you are using software rendering) to control how pixels are rendered to your screen, and are the foundation for modern graphics programming.
An amazing resource I have been looking at for learning how shaders work is the Book of Shaders, which teaches you how to write shaders from scratch, from drawing lines and shapes to more interesting forms of art such as Voronoi diagrams.
Posts
Docker Storage Caveats
Over the last year, we’ve been using Docker in production over at RADIOactive. Docker has been pretty great for us. From an operational perspective, it gives us the advantage of being able to deploy and monitor apps in a generic manner. From a developer’s perspective, application packaging is greatly simplified as well, as any dependencies can just be put into the container no matter what language or framework we are using, with any further configuration being added via environment variables.
Posts
Tappy Plane Postmortem
Over the weekend I tried my hand at making a clone of Flappy Bird on iOS using Swift and SpriteKit. The game uses the excellent graphics from Kenney, which are public domain although well worth leaving a tip for.
The first thing I noticed was how slow the iOS simulator was when it came to graphics rendering. The development experience became a lot smoother once I started running the game as a Mac app.
Posts
Migrating to Docker
I’ve been running a couple of servers on DigitalOcean for some time. I wanted to consolidate the services on each of these servers into one host, but in separate virtual environments, so this seemed like a good opportunity to try out Docker. Docker is a technology allowing us to create processes running within a Container - a sort of lightweight virtual machine that shares system resources with the host such as processes, RAM, and hard disk space.
Posts
HN Scraper
I’ve just released an example project written in Go that scrapes Hacker News and presents the results on a web page. For a more robust approach to obtaining HN data, I would recommend relying on the official API instead in case the markup changes.
Making the request Grabbing the HTML from the HN front page can be done using the built-in HTTP client in Go, found under the http package:
Posts
Releasing some old game projects
I’m putting up the code for some game projects that I did back in 2013, during my One Game a Month challenge. I only made it until the third month, until I couldn’t make time for it anymore. The code is not going to be very well structured - I haven’t even looked in there since releasing them! It was a good experience trying to ship projects on a deadline though.
Posts
JSON to XML with Go
One reason Go is interesting to me is for it’s portability. I’m often running programs on Windows machines which get wiped pretty often, so it saves me time when I don’t have to install dependencies like Python or a C++ runtime. With Go, everything is statically compiled into a single binary which runs out of the box. To give it a try, I decided to take a simple task I would normally perform in Python, and do it in Go instead.
Posts
Getting Started with Go
Go is a statically typed system language designed for high productivity and efficiency. I’ve been reading about Go on and off for a while, but not been able to play around with it much until recently. Coming from a Java background, here are some things that I found remarkable or unusual from my beginner’s perspective.
Opinionated Go’s guiding principles are to be simple, easy to use, fast, and efficient. This means removing syntax debates with the go fmt tool, having a picky compiler which disallows things like unused variables or packages, and disallowing inheritance in favour of composition.