Code I've written, and more

Over the years I've written some bad code, and some okay code. But one constant is that I've always enjoyed writing code, and always enjoyed the challenge of learning new languages and libraries.

I guess I started learning to code at primary school with Logo (opens new window), before dabbling with BASIC (opens new window) in secondary school. At University I learned Pascal (opens new window) and C++ (opens new window).

Since then I've learned, to varying degrees of competence (and in roughly chronological order): VBA (opens new window), Perl (opens new window), PHP (opens new window), KiXtart (opens new window), Rexx (opens new window), Python (opens new window), C (opens new window), C# (opens new window), Javascript (opens new window).

A lot of my code (opens new window) is on GitHub. Here are write-ups of some of the projects I've worked on, and some of my thoughts on coding and other people's code:

  • Using AI to create a new religion

    I've always been fascinated by religious holy texts - they're such a product of the time they are written, and generally have little or no useful information for how to live one's life, unless you're willing to "interpret" them with a distorting lens that helps to bring them in line with modern ideas of how we should behave and treat each other. But, if I were to create a new religion, or cult, how would I go about it? Writing an entire book seems like hard work, so what if I could train some kind of deep learning bot on existing religious texts and then ask it to use its knowledge to create a new holy book.

    6 min read, 1029 words. Continue Reading...

    Categories: Code , Tags: Code, Religon

  • Pubs not Puns

    I was talking with a friend today online, and he mentioned my love of pubs. This was actually a typo, as he was aiming to be sarcastic about my lack of love for puns:

    1 min read, 190 words. Continue Reading...

    Categories: Code , Tags: Software, Testing, Jest

  • GraphQL, Graph DB, Graph API - what's with all these Graphs?

    In my current role, I've found myself working with Microsoft's Graph API - and have implemented a Graph API MicroService in GraphQL. I've also recently been working on a side project to calculate Bacon Numbers for both actors/actresses and movies, and for this I've been using a Graph DB - Neo4J. So, just why do these technologies have the word Graph in them, and how are they related? Let's find out!

    5 min read, 937 words. Continue Reading...

    Categories: Code , Tags: Software, GraphQL, Graph DB, Graph API

  • The importance of readable data structures

    A friend asked for help on Facebook the other day with a programming problem. He needed to dynamically create a set of buttons, and was having problems looping through his variables that stored the data used to create his buttons, to create each button dynamically.

    8 min read, 1457 words. Continue Reading...

    Categories: Code , Tags: Software, Python, Object, Naming, Clarity

  • Into War

    A friend recently let me know of a tiny program that runs a 3D scene with both audio and video. How tiny? The executable, a .com file, is 64 bytes in size (yeah, that's pretty damn small!), and the camera view is a flyover of a grassy field with a blue sky above. The audio is a single note played once, overlaid with the sound of a helicopter's whirring blades and a periodic swooshing noise that sounds like the wind. It seems too amazing to be real, especially when you've seen the video:

    5 min read, 955 words. Continue Reading...

    Categories: Code , Tags: Software, DOS, Small

  • Tone Generator

    Thanks to the generosity of a friend, my lounge now not only has a 7.2 embedded wall speaker setup, but the sofa also vibrates when there is a low bass rumble in the audio of whatever media I'm consuming. This effect has been achieved with the (mis)use of an Aura Interactor Shaker. The Aura Interactor was a device sold in the 1990s to gamers, and was a backpack with a low frequency speaker inside it. Rather than being designed to make noise, this speaker moves a large piece of metal back and forth without a diaphragm, and shakes whatever it's attached to. The rig comes with an amplifier, and takes a mono RCA input - which, thankfully, most subwoofers these days have an output for. My friend has collected a few of these devices over the years, removing the shaker from the backpack each time and bolting it to a piece of wood that is then bolted to the inside wooden frame of a sofa.

    3 min read, 593 words. Continue Reading...

    Categories: Code , Tags: Audio, Tone

  • Tab or Space(s) to Indent?

    Tabs vs Spaces - which one should be used when indenting code? I'm going to spoil the suspense right away by saying that the answer is clearly Tabs. However, it would be remiss of me not to describe what we're talking about, and why Tabs are the correct(TM) choice.

    7 min read, 1315 words. Continue Reading...

    Categories: Code , Tags: Software, Tab, Space

  • Voltage Divider

    A friend who is studying Engineering at university asked me for help tutoring him for one of his degree projects where he was tasked with writing a voltage divider calculator:

    3 min read, 409 words. Continue Reading...

    Categories: Code , Tags: Software, Voltage, Divider

  • QR Code Generator

    With the magic of Vue, it's pretty easy to do a whole host of pretty cool things dynamically. As a quick example, here's a dynamic QR Code generator using a text box linked to the vue-qriously library.

    1 min read, 136 words. Continue Reading...

    Categories: Code , Tags: Software, Vue, QR

  • This Website

    This website is built using Vuepress and a little bit of Vue magic. The entire source for this site is on GitHub, and the config.js file has been set to build the site to the /docs folder. In GitHub this repository has been set to publish the site at /docs and has been given a custom domain name -

    3 min read, 530 words. Continue Reading...

    Categories: Code , Tags: Software, Vue, Vuepress, Markdown


    Categories: Code , Tags: Software, Ingoa, Māori


    Categories: Code , Tags: Software, ASA, Gamification

  • A Better Path

    Categories: Code , Tags: Software, Picard, Music, ID3

  • FishBarrel

    Back in the early days of my foray into skepticism, I found a Chrome plugin called FishBarrel which makes it easy to gather data from a nonsense website and submit a complaint to the relevant regulatory body.

    1 min read, 150 words. Continue Reading...

    Categories: Code , Tags: Software, ASA, Chrome

  • Kodi NZ OnDemand Plugin

    Categories: Code , Tags: Software, Kodi, TV3, TVNZ

  • NZ XMLTV Listings

    Categories: Code , Tags: Software, XMLTV, Sky, Freeview

  • Download Music Artist Images

    I was cleaning up my music collection yesterday by using Discogs, a great online Discography catalogue website, to download missing album cover art. I normally use the long-windedly named Album Cover Art Downloader to download cover art, as it's pretty good and can grab images from various sources (, yahoo, - but there are some albums, especially bootlegs and the like, that aren't on Amazon. While using Discogs I saw that they have artist images (such as the one on the right), and started to download these to use like Album Art images, by naming the file folder.jpg and placing it in the artist's folder (My music collection is organised by First Letter\Artist\Album, e.g. A\Aphex Twin\Hangable Autobulb).

    4 min read, 703 words. Continue Reading...

    Categories: Code , Tags: Software, AlbumCoverArtDownloader, Discogs

  • Decrypting encoded text

    I became interested in cryptography a few years ago, and have been slowly working my way through Bruce Schneier's Applied Cryptography. From this, I became interested in simple forced decryption (cracking) of cyphers, and directed my attention to the ROT13 algorithm.

    6 min read, 1062 words. Continue Reading...

    Categories: Cryptography, Software , Tags: ROT13, ROTx, Caesar, Substitution, Cypher

  • My first web page

    At University we were tasked with creating a web page on the topic of patterns of innovation. I still have a copy of the page, and it shows a less than auspicious start to my website creating days!

    1 min read, 93 words. Continue Reading...

    Categories: Code , Tags: Software, Website