Testing the Docker for Mac Beta

I’ve finally had a chance to install the new Docker for Mac Beta and give it a whirl. In this article I’m going to talk a bit about how Docker works, the challenges of running Docker on a Mac or Windows and how the new Beta helps. Below: The welcome message for the new Docker for Mac app So What is Docker for Mac? If you don’t know what Docker is, check out my article Learn Docker by Building a Microservice or the lovely What is Docker page from the docs.
Read more

Is it worth persevering with Golang?

I recently decided to try out the Go Programming Language, by building a little project called google-it which let’s me run a google search from a terminal: The idea behind the project is simple - avoid jumping into a browser if you need to quickly look up something which you can find in the first line of a Google search result. The idea is to try and stay in the zone.
Read more

What's your Vim Name?

I’m a few weeks into moving to Vim as my main editor, I’ve stopped crying and shaking mostly (at least about my editing ability). Now I’m wondering: what’s your Vim name? And who’s got the best one? As far as I can work out, my Vim name is: Replace everything from the cursor to the end of the line with 've'. Which is what happens if I get bored and type my name (Dave) into Vim.
Read more

Quick Tip: Sending Newlines with cURL

Yikes, this took far too long to figure out! I have a service which takes plain text multi-line input and outputs an object for each line, something like this: Input Line 1 Line 2 Line 3 Output [ {line: "Line 1"}, {line: "Line 2"}, {line: "Line 3"} ] There’s a bit more to it than that, but that’s the gist. I want to test my service with cURL, trying: curl --data "Line 1\nLine 2\nLine 3" \ -H "Content-Type: text/plain" localhost:3000/parse This did not work.
Read more

Moving from React + Redux to Angular 2

I’ve just finished working on a very large project written in React and Redux. The whole team were new to both and we loved them. I’m going to share my experiences of experimenting in Angular 2 with you, from the point of view of someone who needs a pretty compelling reason to move away from my JSX and reducers. The Journey So Far Let me highlight a few key moments in my UI development experiences, to give a bit of context to my ramblings.
Read more

Learn Docker by building a Microservice

If you are looking to get your hands dirty and learn all about Docker, then look no further! In this article I’m going to show you how Docker works, what all the fuss is about, and how Docker can help with a basic development task - building a microservice. We’ll use a simple Node.js service with a MySQL backend as an example, going from code running locally to containers running a microservice and database.
Read more

Getting Started with React & ES6

Feeling like having a go with Facebook’s hugely popular React framework but not sure where to start? In this post I’m going to build a simple React application from scratch - using ECMAScript 6. We’ll put together the bare minimum skeleton of a site and keep the folder structure free of noise and clutter so that you can focus on the app code and not the tooling! The simple app we’ll build is at github.
Read more

Manipulating JSON Web Tokens (JWTs)

I’ve been writing a couple of web services lately that use Auth0 for identity management. It’s a great platform that makes working with different identity providers a breeze. One thing that I couldn’t work out how to do at first was to quickly build a new JWT1 from an existing token. I wanted to take my current token, add some more data to it and return it to the user. So here’s a ‘why’ and ‘how’.
Read more

The Best Module System for AngularJS Applications

I was working on a small and simple application built with AngularJS the other day. As with most applications like this, I start with a single JavaScript file caled app.js and no module system. In the past I’ve used RequireJS with AngularJS. It’s an awful mistake. It leads to a big jump in complexity with no benefts. Angular apps don’t work well with AMDs, so really your are using RequireJS to combine files into one big file.
Read more

Failures Connecting from Elastic Beanstalk servers to MongoDB on EC?

tl;dr? Check your mongodb.conf bind_ip settings to make sure that you’re not allowing connections only from localhost. This may just end up being the first part of a wider troubleshooting guide, but this is one I’ve spent a few hours fixing, after assuming I was making terrible mistakes with my security groups. If you find you cannot connect to your MongoDB server from an EB app server (or anything for that matter), before you spend ages checking your Elastic IP, VPC and Security Group config, don’t forget that you may have simply used bind_ip in your config file.
Read more