Using Python to generate over 10,000 unique 8-bit lightsabers

Python is great for a number of things. It powers 1.4% of the internet, Nasa uses it a lot! and you can use it to create art. In honour of Star Wars Day, I wanted to create a program that dynamically generated lightsabers and tweeted them out once a day. TL;DR I created a computer program that generates a unique lightsaber made out of four different parts (blade, hilt, pommel and button) and tweets it out once a day along with some statistics about the lightsaber....

May 4, 2020 · 12 min · Adam McKerlie

Adding Cron to a Digital Ocean Droplet

I love Digital Ocean. It’s incredibly easy to set up, it’s cheap to get started and you can scale up easily as your website grows. All of my old sites were hosted on there and when I needed a host for my latest project, Daily Lightsaber, Digital Ocean was the obvious choice. The main feature of Daily Lightsaber is the scheduled post of a new lightsaber every day. To do this I needed to add Cron to my droplet....

April 28, 2020 · 3 min · Adam McKerlie

A deep dive into swear patterns at G Stock

Warning: This post contains NSFW language. Every year in September over 300 staff from around the world come to Toronto for our annual conference, called G Stock. This is a week-long event that culminates in a keynote by our founder Bruce called The State of G Nation. Back in 2010 when I started at G, I used to track casual curse words Bruce would drop at G Stock via Twitter. In 2014 we decided to take it to eleven and build out a bespoke system to track it....

September 13, 2019 · 6 min · Adam McKerlie

Dealing with Web Adventures of Web Applications (Machine Generated)

This post was written by a markov chain. You can read more about how and why it was built here. This meant that not all of the “Freedom” methodology, we also have a few languages. There are some downsides to such a simple ping to major tom, telling it to the API. Routing our backends I mentioned backends a few months and now you have not two journeys, but perhaps a dozen....

August 21, 2018 · 3 min · Adam McKerlie

Technical React Apps A Project in A REST Data Restorement and Project Documents with Search (Machine Generated)

This post was written by a recurrent neural network. You can read more about how and why it was built here. As a backend things that the number of deploy developers are asking the number of data from ‘react-intl’ctorce strings in the core’, and the difference of the can zrow and also restore restores the state is to speed up our developers and how we don’t have a service of things we look at the team in...

August 21, 2018 · 2 min · Adam McKerlie

We Taught a Neural Network to Write a Blog

At G Adventures, we write a lot of content for our various blogs. Our main company blog has over 8 million words and our technical blog is currently sitting at 114,000 words (though I just added another 2500 words through this post and the two generated posts!). Creating this content takes a lot of time and effort from over 40 writers. Recently, the Technology team had a Hack Day and I decided to learn more about Machine Learning (ML) and TensorFlow ....

August 21, 2018 · 8 min · Adam McKerlie

Simple Deploys using Fabric

At G Adventures we deploy 20+ times a day to many different services that handle millions of requests and millions of dollars in transactions by keeping it simple One of my guiding principles for developing and deploying software has always been to keep it as simple as possible for as long as possible. Premature optimization wastes valuable developer time, solving problems that may never be real. One of the areas where this is apparent at G Adventures is how we deploy code....

January 22, 2018 · 7 min · Adam McKerlie

Dealing with Technical Debt

Technical debt is something that every software company has to deal with at some point. Whether it’s from bad architectural designs or just changing business needs, at some point technical debt will need to be refactored. Here are a few tips I’ve pulled from my experience removing technical debt. Take Inventory The first step in dealing with technical debt is to take inventory of the entire codebase. Knowing the extent of the codebase is necessary before you can start removing or rewriting parts of it....

September 19, 2017 · 4 min · Adam McKerlie

Speeding up Postgres Restores Part 2

Apparently there’s a lot of pugs in blankets In Part 1 of Speeding up Postgres Restores I talked about how we improved the time it took to restore our local environments. Initially, we started out naively pg_dump’ing (is this a word?), gzipping, unzipping, and then piping the output using psql < file.sql. This took over 30 minutes to do a full restore. In the end, we used Postgres’ custom format and used the job’s argument to speed up the restore to only 16 minutes....

April 12, 2017 · 4 min · Adam McKerlie

Speeding up Postgres Restores

How I felt throughout this process Recently I sat down to speed up our database restore process in our development environment. Like most projects, our database started out small and grew significantly over the years. When we started the database was just a couple of MB uncompressed. Now it’s almost 2GB compressed (50GB uncompressed). We restore our dev environment once a week on average and the old way of doing restores was no longer working....

March 4, 2016 · 6 min · Adam McKerlie