Profiling Hashtables in C Hashtables are a neat way of storing (key, value) pairs with fast lookup, insertion and deletion times. I've written a simple implementation of a hashtable with a view to making an extremely easy-to-understand
Google Cloud Functions In the spirit of fairness, since I've spent so much time using AWS Lambda functions, I thought I'd give Google's latest offering a try. However, following the instructions to create a simple cloud
Preprocessor Polymorphism The preprocessor included with C compilers is a strange beast. By far its most common use is to #include various header files, and to #define static variables for later use. But there's other,
Swing in Seven Swing can make or break a track. Have a listen to this clip of a drum beat without any swing: Sounds kinda lame, right? Let's ignore the sounds for a second and concentrate
Build Your Own Enum! After programming in Java for altogether too long, I've developed a healthy appetite for the humble Enum. There's a problem, though: Python's enum is ugly. Ugly as hell: class Something(Enum): x = 1
DockerBox I've had an idea brewing for a while. I'd like to be able to use a single command, available on any device with SSH, to load a fresh image of any operating system
Side Project: Text Game So I've finally got around to making a text game! Sort of. Instead of running in a text-based environment like a console and accepting English-language commands as input, I made the decision to
Goroutines and Concurrency I recently watched Rob Pike's talk on Concurrency Patterns in Go, and was really impressed by how easy it was to make solid concurrent code without relying on threads, mutexes/locks or anything
AWS and Dash, Amazon buddies forever! Amazon don't sell their IoT Button in the UK. But that didn't stop Aran and I from making a pretty sweet hack over the weekend... ...and winning Best Use of AWS, at my
Google's Open Vulnerability N.B. This has now been fixed! Good job. However long it took. I found a Google vulnerability today. And I got hyped. Really hyped. Except, as it turns out, not all vulnerabilities
Hacking the Dash Button I got an Amazon Dash button in the post today! And nope, I don't have a Nerf gun -- I'm just grabbing the button because it's super-hackable. I got the Nerf one because,
S3 (Serverless 3, not the other thing) Before I kick off, here's what I'm most proud of right now: If that looks too horrific, here's the same info from Postman: And if that's too much... this might not be the
HackCampus -- Application Process So it all started when Josh Simpson gave a talk at BrumHack 2.0... ...and then, a couple of months later, when I remembered the talk, and decided to apply to HackCampus through
Chord Progression #1 Here's a sweet chord progression I just found: The root chords aren't anything too fancy: just I -> VII -> VI. But the voicings are pretty neat: Left: A E G,
Serverless 2: Who Needs S3 Anyway? It turns out Travis CI supports deploying directly to AWS Lambda: something I should have checked before doing any of the messy configuration with specifying IAM user policies for accessing an S3 bucket
Serverless: Going Full-On Hipster Who needs servers anyway? I've been wanting to try out AWS Lambda and API Gateway for a while now, so I thought it'd be a neat idea to write a tiny, not-even-slightly-useful microservice.
Buzzwords and friends. In my continuing quest to be a jack of some CS-related trades and a master of absolutely zilch, I've decided to learn about some buzzword-y tech for deployment and packaging. First of all,
Classy? Functional? You decide. Anyone who's met me for more than a few seconds knows I'm a big fan of Python, warts and all. It's not the fastest language for performance-sensitive code, but I think it's one
Graceful Partial Functions in Python Functions as they are in Python are great, but there's one small glitch: unlike in Haskell/Ocaml/F#, they're not "curried" automatically when we don't pass enough arguments to them. Say
Who Needs Root Anyway? I've got a rooted Sony Xperia Z5. It's a relatively new phone, with a bunch of great features: I still love the fingerprint sensor, and the camera blows my mind every shot. Check
FL Studio: Multiple MIDI Assignment I have a couple of keyboard controllers (Panorama P4, Yamaha P35) and a mini drumpad (Korg Nanopad2), and today I wanted to map each controller to different instruments in FL Studio for a
Usage code first: The right way to design APIs? It's common advice, at least for those not sticking to TDD: "write usage code first". In other words, before you write an API, work out how you're going to use it.
Text Game Stream-of-Consciousness Warning: this is an unfiltered stream of thoughts on a hypothetical text game, and isn't by any means good or interesting writing. Proceed with caution. The program, at its most basic level, does
HTML5 Canvas Animation I've been wanting to try out some JS for a while now, as it's an incredibly popular language that I've barely touched except for data-binding stuff with Angular. I decided I'd give Canvas
Python String Formatting Right now, str.format is probably the best way to accomplish most string formatting in Python. I'm not going to touch on the format spec mini-language, because I've never learned it and frankly