Here are all the articles available on this blog.
Using Go in the Browser via Web Assembly
Tuesday, 13 August 2019
I’ve wanted to try out Web Assembly for a while — it feels like it offers great potential for more flexibility in the browser. I’ve also been wanting to look at Go for some time now, so I decided to combine the two in one experiment. Here’s how I did in writing a simple web page, using Go as the programming language.
Breadth First Graph Traversal in Clojure (Kiwiland Example)
Saturday, 11 May 2019
In my previous article, I looked at how to create a graph in Clojure, and find the length of various journeys within it. I will now move on to look at how to search the graph, to solve some of the other questions in the Kiwiland Trains Programming Challenge. This will focus primarily on the implementation of a breadth first search.
Building a Graph in Clojure, for the Kiwiland Railway
Tuesday, 9 April 2019
I was recently looking at a programming test, where the challenge is to represent a railway system (called “Kiwiland”) and then deduce various facts about it (for example the distance for a certain route). I wanted to develop this in Clojure, and thought it would be an interesting thing to work through on my blog.
Enabling https with Nginx, Docker, and LetsEncrypt
Thursday, 22 November 2018
As more and more attention is paid to https (for example, with increasing levels of warning from Google Chrome on plain http sites), it becomes more and more important to ensure our websites are protected accordingly. Fortunately, Let’s Encrypt offers a free way to obtain certificates for our websites, and works simply with many standard web servers.
This article shows how we can configure Nginx to use Let’s Encrypt to provide certificates, and demonstrates how to automatically update the certificates when they expire. For flexibility, I have also put all the things in containers.
Using AWS Cognito to Secure an ExpressJS API
Sunday, 8 July 2018
Sunday, 17 June 2018
Introduction to Json Web Tokens
Monday, 4 June 2018
In my previous article, I showed how to create a login page using AWS Cognito. At the end of that article, we landed on our desired web page, but with an access token appended to the URL. This article follows on from that stage, looking at the structure of the URL, and the Json Web Token (JWT) contained within it.
AWS Cognito User Pool
Tuesday, 22 May 2018
AWS Cognito offers the ability to manage a set of users in its user pool capability. I was looking for a way of controlling access to a web site, and Cognito seemed an ideal way of achieving this. This articles shows how to set up a user pool, how to add users to it, and how to display a login screen for your users.
Automated Tweets with AWS Lambda and DynamoDB
Wednesday, 15 November 2017
Another article about Amazon Web Services (AWS), this time creating a Lambda (or Serverless or Function as a Service) which tweets about this very blog at regular intervals, using DynamoDB as its data store. I also use AWS Simple Notification Service (SNS) to trigger an e-mail to let me know the tweet has happened.
A Clojurescript API Server in Docker using ExpressJS
Wednesday, 11 October 2017
A CD Pipeline in Amazon Web Services
Friday, 1 September 2017
In a previous article, I described serving a website from an S3 bucket, with CloudFront allowing us to apply SSL. This article looks at the other side of the process — how we populate the S3 bucket in the first place. I would typically use Jenkins to set up a build and deploy pipeline for this, but here I look at using the build tools AWS provides.
Building a Stopwatch using only HTML and CSS
Tuesday, 22 August 2017
Secure hosting using SSL and AWS CloudFront
Tuesday, 15 August 2017
In a previous article, I looked at how we can use Let’s Encrypt to automatically create and manage SSL certificates for us. This article follows on in a similar vein, and shows how Amazon Web Services (AWS) also let us create free SSL certificates. This is an example with a static site hosted in an AWS S3 bucket, but can also be applied to any AWS website hosting mechanism (e.g. EC2 instances).
Using Traefik Proxy with Docker Compose and LetsEncrypt
Wednesday, 2 August 2017
Traefik Proxy is a fairly recent entry into the reverse proxy space, alongside more established applications such as nginx and Apache httpd. The thing which differentiates traefik is that it was created in a post-Docker world and integrates with Docker to reduce the manual configuration needed.
This article looks at how we can use traefik as a reverse proxy across a docker-compose managed suite of containers and then use let’s encrypt to add SSL certificates for https access.
Reducing Docker Image Size
Thursday, 22 June 2017
There is more attention being paid these days to the size of Docker images, with a desire among many developers to reduce the size as much as possible.
Why is this important? It comes down to the usual points of download and storage needed. A simple example is when your website is experiencing an unusually high demand and you want to spin up some more hosts to handle it. For each new host, you need to download your Docker image to it. If your image is 200MB, it takes 10 times as long to download it as is your image is 20MB.
So, how do we make smaller Docker images? Here are some techniques.
Letter to my Younger Self
Friday, 9 June 2017
You are sitting there uncertain about your future direction, trying to decide
what your next step should be. You have doubts about what you should be doing
and whether you are able to do it. Just remember that there is no single path
to follow, you will have a variety of different jobs through your career and
things will usually work out okay.
To help you as you go, here is some advice I (and therefore you) have picked up
along the way …
Cross Framework Messaging
Wednesday, 20 January 2016
situation where I needed two different UI elements — built with two different
Rather than choosing to migrate one onto a different framework, I looked at a
way of allowing them to send messages to each other using the Mediator Design
Using this pattern, I have an example of an Angular app, a React app, and a
Tuesday, 24 November 2015
I recently needed to put together a quick proof of concept for a small project
and decided to use this as an opportunity to try out a lighter than light
Whilst frameworks like Bootstrap are already quite light, I wanted to see if I
could remove even more. With all the Angular 2 kerfuffle, I wanted to look
for another framework which I can use instead. I also wanted to drop gulp
and just try using npm instead.
Monday, 14 September 2015
One area this applies to is in the large number of function calls resulting from this approach — particularly when we are writing recursive code.
We will give an example of this problem — calculating Fibonacci numbers — and then look at a technique known as memoization as a way of improving performance.
Saturday, 12 September 2015
Tuesday, 8 September 2015
We will now look at another functional technique, known as currying, which builds on those concepts.
Thursday, 3 September 2015
Functional programming is seeing an increase in popularity, as can be seen in rising adoption of languages like Scala, Clojure and Erlang. Even Java has introduced lambdas (more about lambdas, later).
Wednesday, 10 June 2015
A learning stub server in 40 lines of code
Wednesday, 2 April 2014
PhantomJS for client side testing
Monday, 17 March 2014
[Please note that PhantomJS has been suspended, so this article is only retained out of historical interest.]
As web-based projects do more on the client side, conventional server-side performance testing is not able to give you all the performance story. I have, therefore, started looking around for tools which would give more insight into that purely client-side performance.
Creating vagrant boxes with veewee and packer
Sunday, 16 February 2014
This is an old article, and the technologies used in here may have changed significantly since I wrote it. Proceed with caution.
I’ve been creating a few vagrant base boxes recently — some for a DevOps course I am putting together, and some for investigations in my current project — and I thought I’d quickly share my experiences of the two tools: veewee and packer.
Tomcat Session Replication with BackupManager
Sunday, 22 September 2013
My current project is using BackupManager for session replication in Tomcat and I wanted to understand this a bit more. I set up a quick example to try it out on and thought that my experiences might be of some use to other people who are using this approach (or are considering it).
A Quick Look at New Relic APM
Wednesday, 11 September 2013
Note that this is an old article, which is still useful as an historical overview, but should not be considered representative of New Relic’s current capabilities.
I’ve been taking a quick look at an Application Performance Management application called New Relic and thought I’d share my initial findings.
Parallel Deployment with Tomcat 7
Monday, 13 May 2013
Tomcat 7 introduces the ability to perform parallel deployment. This means that multiple versions of a war file can exist on single Tomcat server at the same time. More importantly, those multiple versions of the war file can be used simultaneously by different users.
The idea is that this allows a new version of a war file to be deployed to a Tomcat server, without requiring any downtime. This (in theory) offers a simpler process than the more conventional approach involving multiple Tomcat servers and load balancers.
This blog post demonstrates this feature and also notes some limitations.