John Hamelink

Purveyor of Fine Code

Hello, I'm John. I'm a Scottish web developer, CEO of FarmGeek, and CTO of Network Mapper. I love building things. Sometimes I write, and when I do, it normally goes here.

Consuming Nested API routes with Ember

At the time of writing I'm learning Ember-cli for the first time. It's pretty tough as there's not too much up-to-date documentation out there, but I'm slowly getting there, and I'm beginning to feel the power it brings.

One of the things I've been finding especially difficult is grokking how Ember consumes API data - specifically how it decides upon what the route it wants to consume looks like.

After hours of fruitless Googling and reading, I relented and hit IRC: #emberjs on Freenode to be specific. After speaking to a few helpful fellows on there, it became clear that...

How to join screenhero with free slack credit


You may have heard of Slack before - a brilliant team chat service that raised $180m from the likes of Andressen Horowitz, Google Ventures, Kleiner Perkins and Accel. Very cool.

Well, on Wednesday Techcrunch posted an article announcing slack's aquisition of Screenhero, a Ycombinator allum who have a really slick tool for remote pairing and screensharing.

This provides some really interesting prospects for slack users - being able to remotely debug or collaborate on issues through Screenhero directly is the first thing that comes to mind. Wouldn't it be cool if we could all try it...

Making unite.vim use the project root directory

I've been using vim for quite a while now - I think it's about 3 years (not a long time for most vim users, might I add!). Over the short 3 year journey, I've built up a pretty massive vimrc file which I add & tweak almost every day. Over the past week I decided to make the switch over to Unite.vim, but coming from ctrlp, I wasn't satisfied with the default behaviour.


There are plenty of ctrlp snippets out there which approximate ctrlp's behaviour, but one thing they don't focus on is ctrlp's ability to...

Distributed web systems with Consul, Diplomat, Envoy and HAProxy

As part as my never-ending quest to improve how I build cool things, I've been working for some time on building out infrastructure to help automate and monitor how my apps and servers are doing. I've written about horizontal scaling before, but today I'd like to get into one specific facet of its implementation: automated network discovery, and how we use it at FarmGeek to build reliable applications.

The problem

So lets say you have a few servers - a node balancer, two application servers and a database server, for example. Everything's working fine until BAM, one...

Server nirvana: my journey towards infrastructual mindfulness

As my business has grown over the past 10 months, I've found myself in charge of more and more servers. Being a one-man-band most of the time, I've found myself increasingly aware that I don't have a comprehensive understanding of what my servers (and apps!) are doing, and if they're crying out for help, they might not get it until something goes amiss.

So I set about looking for a solution.

Over the course of the last month, I've greatly improved almost every aspect of how our apps are delivered, from using configuration management to set up servers and ensure...

11 Things Windows users might not know about Linux

As an avid Linux user for over 5 years, it still surprises me how many people don't know basic things about Linux which make it so appealing to people like me. If you're thinking about using Linux for the first time, or perhaps you've only just heard about it, here are a few things you might now know that might interest you:

1: Linux isn't an operating system

Linux is actually the name given the "kernel" of one type of operating system. There are hundreds of thousands of Linux distributions for you to choose from. Linux draws its inheritance back...

Testing NodeJS with Jenkins

NodeJS is awesome. I've used it for many pet projects and have worked on commercial projects which have made good use of Node in sticky situations. When it comes to testing Node, we're spoiled. My favourite testing framework is Mocha and my favourite testing library is should.js. We'll be using that alongside Jenkins to build an automated test suite for our demo repository.

You will need Mocha

Mocha is our testing framework. We use it to describe the tests we want to make.


Should.js is our assertion library. We use Should to check something is...

The Green Developer

A good developer is energy conscious. A good developer understands the impact he has on the environment around him. A good developer is able to take all these things and use them to make a positive impact in his universe. A good developer is a green developer.

A green developer? What are you smoking?

A green developer understands how to build in blocks: he must master the art of software engineering versus software developing. What sets the software engineer apart from the developer is not speed, agility or knowledge, it is the ability to recognise and compartmentalise everything he does...

What makes for a Good Development Lead?

Throughout my career so far, I've mostly worked alone. When I say alone, I've often worked alongside other people, but ultimately I've been paying them, or I had made the choice about whether they were suitable for the project (or for me) or not. They've mostly not been working on the same thing I've been working on either.

Ultimately, I've been the leader of the projects I've worked on during most of my freelance career. While at my current fulltime job however, due to the nature of the work I was doing there, I often had to work with other...

Code is Poetry

I once read a much better article than this one by Matt Ward that attempts to show the similarity between code and poetry. Matt shows how the flow and syntax of good code, that abstract minimalism and lowest common denominator approach, is actually very similar to that of a poem.

I agree with everything Matt says, but I felt the article was a little lacking in showing how the coder can be a poet in order to achieve greatness and self-fulfillment (that's what poetry and coding are partly about, in my opinion) . To this end, I've compiled some...