A Rails development environment with Docker

Docker and Docker Compose reduces bringing up a development environment on any system which supports Docker to a single command. For me this means the time to a working development environment, even on a fresh machine for a project I haven't worked on for months or years, is just a few seconds.

Startup Reading List (2018 Edition)

Something most of the startup and product people I look up to have in common is that they read, a lot. They also challenge what they read. Rather than reading a chapter, then immediately trying to implement what they've read, their books are full of post-it notes and scribbles, dinners and emails are full of debates on one methodology or idea v another.

2015 In Review

May 2016 seems like a reasonable interval to have given 2015 to sink in. 2015 was expected to begin at a Full Moon Party on one or other island off the coast of Thailand. Instead it began with a hastily booked flight back to London and a week or so recovering from three days of hallucinations and dehydration on Aonang - they really do food poisoning properly there. Can't say I'm proud for bailing due to food poisoning; live and learn.

What I'd tell myself about startups if I could go back 5 years.

This is, in no particular order, what I'd tell myself about startups if I could go back in time to when I first got involved. Which is probably the same as what I've learned. This is most definitely not advice, the "you" here is directed at me. So is "I". Grammar is hard.

2014 In Review

Having reached 2015 I'm forced to acknowledge that 2013 In Review is probably not going to happen. I might even remove it from my ToDo list where it's now the oldest item after returning the copy of "Chaos" I borrowed from a public library in my first year of university, six years of fines are going to hurt. In the spirit of it probably isn't a big deal I'll dive straight into 2014 but with a scattering of confusing references to 2013 for context.

DIY EKG Using Arduino and Javascript

An EKG (electrocardiogram) - also referred to as an ECG - is a recording of the electrical activity of the heart. This can be used for measuring the rate and regularity of heart beats. Using a readily available Arduino shield, an Arduino and a $10 set of electrodes, it's possible to generate this waveform at home and then manipulate and plot it in realtime using Javascript.

Google Cardboard Unity Tutorial

Having tried the Oculus I'd prepared myself to be completely unimpressed by Google's $2 VR solution. But after trying Roller Coaster VR I was blown away by how well the slightly shabby looking cardboard assembly performed. Naturally despite never have tried any game development or 3D modeling, I wanted to make stuff for it. Using Unity and some plugins, this turned out to be surprisingly easy. This tutorial covers the bare minimum needed to go from never having used Unity before, to a simple 3D environment you can look around using Google Cardboard.

Automatically Generate Vagrant Machines from Chef Node Definitions

If you use chef-solo to provision your production servers, Vagrant makes it easy to set up a production- like environment on a local VM for testing purposes. It can however seem like wasted time to have to manually replicate the contents of your node definition in your Vagrantfile and more importantly it's easy to make a change to either the Vagrantfile or the node definition and forget to update the other to match. In this post I'll look at a simple method of automatically generating Vagrant machines based on node definitions.

A Rails Development Environment with Docker and Vagrant

Onboarding new developers to a Rails projects is still a far harder task than it should be. A big part of this is that setting up a development environment for an app or suite of apps, getting the correct ruby versions, database versions etc running locally, can in many cases take upwards of a day. A combination of Vagrant and Docker can make this a thing of the past.

DNSimple SSL Certificates and NGinx

If you purchase a Geotrust SSL Certificate from DNSimple for your domain, there's a small amount of setup required to get the certificate in a format you can use with Nginx. This post includes an overview of the process and a simple bash script to automate it.

Starting a Rails Console with Capistrano 3

When deploying with Capistrano 3, it's often useful to be able to start a rails console without having to ssh into the target host and set it up manually. This can be particularly challenging if you're using rbenv as you have to ensure that rails console is called with suitable environment variables set set to ensure that the rbenv Ruby is used not the system Ruby.

Reading Git Merge Conflicts

Git merge conflicts are something any developer who works in a team bigger than one, has to deal with from time to time. It's surprisingly common it seems to deal with these without really understanding what's going, I did for years and I know many others who still are.

Teaching People to Code

Recently I've been experimenting with ways of teaching people to code which match the way I and other succesful developers I know have learnt. These focus less on theory and syntax and more on problem solving and "hacking things together". Now I'm looking for five people who want to learn to make stuff with Ruby to teach.

Capistrano 3 Tutorial

One of the most popular posts on this blog is on how to use Capistrano 2 to deploy Rails applications to a VPS, including the scenario when you want to run several different applications on the same server. Capistrano 3 has now been released and having upgraded several large production applications to use it, I've found there to be a lot of worthwhile improvements over v2. This post explains, with sample code, how to use Capistrano 3 to deploy one or several Rails applications to a VPS.

Tailing log files with Capistrano 3

When deploying Rails Applications with Capistrano 2 it was common to have tasks to tail log files on production servers so that they could be viewed locally without sshing into the remote machine(s). In this post I'll cover how to do this with Capistrano 3.