Notes on Elm

Nov 2, 2016

I recently got interested in the Elm programming language. A little while ago I started reading the PureScript docs and then later started learning Haskell. However I'm generally much more focused on frontend development and could never really see myself using either of those languages for much.

Elm has most of the awesome functional programming features of Haskell. It also has a lot of similarities with Redux and can actually be used to create real-world applications.

Here are some of my rough notes from reading through the Elm docs. I also implemented most of the examples from the docs, with my own modifications, in this repo.

Read 36 remaining paragraphs...

Notes on Flow type checking in JavaScript

Jul 22, 2016

Here are some rough notes I made while setting up Flow and reading through the official docs. These notes probably won't be that useful to anyone but me.

Read 6 remaining paragraphs...

Book notes: A Guide to the Good Life

Jun 19, 2016

This is my review of A Guide to the Good Life by William B. Irvine. It's a book about Stoicism.

The previous three book summaries I read were packed full of specific tips. The next few are all a bit shorter and deal with more abstract concepts rather than actionable bullet points.

Read 49 remaining paragraphs...

Book notes: You Can Negotiate Anything

Jun 14, 2016

After reading the Influence summary, I decided to jump straight into the recommended next book: You Can Negotiate Anything by Herb Cohen.

Read 32 remaining paragraphs...

Book notes: Influence

Jun 9, 2016

For my third Blinkist book summary, I chose Influence by Robert B. Cialdini.

I bought this book on Kindle about 4 years ago but only read the first three chapters. I've always wanted to finish it and this was a good opportunity to see what else was in the book.

Read 42 remaining paragraphs...

Book notes: The Five Dysfunctions of a Team

Jun 6, 2016

For my second Blinkist book summary, I chose The Five Dysfunctions of a Team by Patrick M. Lencioni.

I first heard about this book from this blog post on the Elided Branches blog (which is absolutely excellent by the way). I expect to read it in full someday but thought I may as well start with a summary.

Read 21 remaining paragraphs...

Book notes: The Miracle Morning

Jun 5, 2016

Last week I tried out a new service called Blinkist. They provide 15 minute summaries of non-fiction books. My initial experience has been amazing and I have now subscribed to them.

I have also been writing notes on paper of all the summaries I've been reading. The first book I read was The Miracle Morning by Hal Elrod.

Read 27 remaining paragraphs...

Notes on Polymer Web Components

Jan 26, 2016

[Note: I found this blog post 5 months after I first wrote it. I didn't get around to publishing it at the time but decided I'd rather publish it now than delete it.]

These are some of my notes from reading through the Polymer documentation. I was using version 1.2.3 so things may have changed since then.

Read 11 remaining paragraphs...

Quick notes on advanced ES2015 features

Jan 7, 2016

[Note: I found this blog post 5 months after I first wrote it. It is not finished to the standard that I originally planned but I decided I'd still rather publish it now than delete it.]

I first started programming JavaScript with vanilla ES5. I disliked it right from the start having grown accustomed to the nice syntax of Python and ended up switching to CoffeeScript for quite a while. However, around June of last year, I got interested in ES6/ES2015 again.

These are some of my notes from reading this book on ES6 features. I deliberately didn't write about anything I already found trivial, deciding to only focus on things I didn't already know. I never got to the end of the book but still decided to publish it.

Read 7 remaining paragraphs...

Google Content Experiments for static sites

Sep 17, 2015

AB testing poses some unique problems for static websites. In this post, I will describe my particular implementation with Google Analytics Content Experiments and what I learned along the way.

Read 22 remaining paragraphs...

Publishing my first npm package

May 26, 2015

I use a lot of great open source software every day. For both work and side projects.

Although I have released everything I've ever made on GitHub, I had never created anything which other people could actually use.

I wanted to change that. This is the story of how I published my first npm package and what I learned along the way.

Read 28 remaining paragraphs...

Word frequency analysis with command line tools

Feb 20, 2015

I have previously written about writing speeds. I think one of the best ways to improve is to utilise abbreviations and other tricks.

I recently looked into a shorthand system called EasyScript. The most important part I took from it is to develop a set of short abbreviations for the most common words. They give a set of suggested abbreviations but I wasn't happy with them. Instead, I wanted to analyse my own writing to find my most commonly used words and phrases.

Read 25 remaining paragraphs...

Building a blog with Metalsmith

Feb 11, 2015

I recently transitioned this blog from Jekyll to Metalsmith. I'm glad I started with Jekyll but I wanted more control. I decided to switch to Metalsmith so that I could write my own build scripts in a language I knew (JavaScript).

There are tons of excellent static site generators available. See for a list. I've used DocPad before (for the website). I chose Metalsmith because it offered the most bare-bones setup with minimal restrictions.

This post will not be a full guide on how to use Metalsmith. I'm assuming that anyone interested in Metalsmith is willing to get their hands dirty. Instead, this post will simply list some of the useful plugins I've come across and some other hacks I've made up.

Read 17 remaining paragraphs...

CloudFlare and hashed CSS

Feb 2, 2015

One of the main advantages of static sites is supposed to be faster load times. However, I noticed this blog was still taking longer than expected to load.

I discovered this post by David Ensinger in which he describes the same problem. I've learned a lot from his other posts and we appear to have pretty similar setups. The problem he describes is a time consuming 302 redirect caused by using GitHub Pages with a DNS A record. I suggest you look at his post for more details.

Read 18 remaining paragraphs...

Host any static site with GitHub Pages

Jan 26, 2015

GitHub Pages is pretty awesome. It provides free, no-hassle hosting for static sites built with Jekyll. However, it also has some limitations.

For example, although Jekyll "supports" tags, you can't create pages to list all posts with a given tag. At least not without using a plugin, which GitHub Pages doesn't allow.

There is an easy way around this. You can build the site locally (using any plugins or code you want) and still host it on GitHub Pages. It's pretty simple although there are a few caveats.

Read 26 remaining paragraphs...

Three months of blogging

Nov 10, 2014

This will be my third monthly review. Yet again, I am going to look back at the last month and create a plan for the next one.

Read 15 remaining paragraphs...

20 of my favourite cooking photos

Nov 7, 2014

I started learning to cook in September 2011. I really enjoyed it. I learned from my Mum, from books and from my own mistakes.

I started taking photographs of what I was making in early 2012. Since then, I have built up a collection of 550 cooking photos of new and interesting recipes. Unfortunately many of the early photos were taking with my Nexus One camera and are pretty much unusable. However, I still have plenty worth sharing, here are my 20 favourite cooking photos.

Read 40 remaining paragraphs...

Here are my dotfiles

Nov 5, 2014

I've recently been uploading a lot of my old projects to GitHub. There is only one left: my dotfiles.

Read 18 remaining paragraphs...

My 10 best Tenerife photos

Oct 31, 2014

In March of this year, I went on a family holiday with my parents to Tenerife. It was fantastic, one of the best holidays we have ever had.

That was also around the time I was getting into photography. I had just bought a second hand Fujifilm X10 and this was the first chance I had to really use it. I wanted to share some of my favourite photos. I've probably got about 50 very good ones but that's too many for one blog post. So, here are my 10 best Tenerife photos.

Read 10 remaining paragraphs...

MCTS in Texas Hold 'em Poker: A retrospective

Oct 29, 2014

I've recently been uploading a lot of my old projects. Both to prove I've actually done them and also in case someone might be interested.

This week, I have uploaded my 3rd year Cambridge University dissertation project. It is a Texas Hold 'em poker-bot which uses the Monte Carlo Tree Search algorithm. You can view the source on GitHub. In this post, I am going to give a very brief summary of the project and make notes on how I could have done better.

Read 20 remaining paragraphs...

Changing my email address and updates to my CV

Oct 27, 2014

I have a new email address:

Read 7 remaining paragraphs...

My experiences playing croquet

Oct 24, 2014

I haven't written about it before but I am a very keen croquet player. I thought I would share some of my experiences playing in matches over the last few years.

Read 22 remaining paragraphs...

Lessons learned from a three year programming project (part 2)

Oct 22, 2014

Continued from part 1. You can also view the project on GitHub.

Read 17 remaining paragraphs...

First draft of my CV and a trip to Bristol

Oct 20, 2014

Last week, I said that Mondays would be about my job search. Here's what I've done so far.

Read 16 remaining paragraphs...

Selling my childhood toys on eBay and Amazon

Oct 17, 2014

I mentioned in my two months of blogging post that I've been selling my family's old possessions on eBay and Amazon. Over the last couple of years, I have sold literally 144 things on eBay and 153 things on Amazon. I thought I'd share a few of my thoughts on how it's gone.

Read 10 remaining paragraphs...

Lessons learned from a three year programming project (part 1)

Oct 15, 2014

For the last three years, I have been working on a little pet project. It has probably taught me more about software development than my entire time at university.

It's a command line program for writing and organising a personal diary (GitHub link). I've spent hundreds of hours on it and have gone through many different designs. Instead of covering every little detail of the project, I'm going to write about some important lessons it has taught me.

Read 24 remaining paragraphs...

Two months of blogging

Oct 13, 2014

I've now been blogging for about two months. In that time, I've written 19 posts or about 12,000 words. After my first month, I reviewed my progress and adjusted my plan for the future. Now it's time to do it again.

Read 14 remaining paragraphs...

Writing before breakfast

Oct 9, 2014

I want to become a better writer. According to the growth mindset, I know that this is achievable through hard work and practice. I have to consistently put in the time and effort and I will slowly get better.

I knew that when I first started this blog. I set myself a schedule for publishing blog posts and have stuck to it ever since. This has worked brilliantly. But, it also has a few problems. Although I've never missed a post, I have procrastinated more than I would like. This last week in particular, my writing has suffered because of it.

Read 11 remaining paragraphs...

Big list of blogs I like

Oct 6, 2014

I don't have time to write a proper post right now so here is a big list of some of my favourite blogs. I use Feedly as my RSS reader and save longer articles to Pocket for later reading.

Read 3 remaining paragraphs...

Writing speeds

Oct 2, 2014

I like to write a lot. I usually write for about 2-4 hours per day. For something I do so much of, there are incredible time savings to be had. Of course, writing fast is only a very small part of being a good writer. Nevertheless, these small gains add up. The less time I spend writing, the more time I can spend thinking.

Read 19 remaining paragraphs...

100 push ups: The ultimate slow gains experiment

Sep 29, 2014

I have recently written about the growth mindset. When you have a growth mindset, you believe that your basic abilities can be improved with hard work and practice.

There are plenty things in my life I want to improve. However, I'm going to start with exercise. I've previously tried and failed to form exercise habits. None of my attempts have made any lasting improvements. This time I want it to be different. This time I'm going to make it so easy I can't fail.

Read 9 remaining paragraphs...

The growth mindset applied to my life (part 2)

Sep 25, 2014

Continued from part 1. This part will discuss how the different mindsets affected me after I left university.

Read 19 remaining paragraphs...

The growth mindset applied to my life (part 1)

Sep 22, 2014

I am now a firm believer in the growth mindset. When someone has a growth mindset, they believe that their basic abilities (intelligence, talent, strength, etc.) can be improved through hard work and practice. This is opposed to a fixed mindset: the belief that basic abilities are "fixed" and cannot be improved upon.

For most of my life, I have had a fixed mindset. I'm trying to change that. I want to take a moment to look back at my life and see how the different mindsets have impacted me.

Read 12 remaining paragraphs...

The Pomodoro Technique: What I wish I'd known

Sep 18, 2014

Let me tell you how I came to write this blog post. I have been using the Pomodoro Technique for over a year. I was using a web-based timer but felt I was due for an upgrade. I wanted a command line app.

However, in my research, I learned a lot more than I thought I would. My opinion has changed on what's truly important. I only wish I had realised this sooner.

Read 16 remaining paragraphs...

One month of blogging

Sep 5, 2014

I have now published three posts per week for the last four weeks. That's about 7,000 words.

When I started, I just wanted to start. I knew I would never be completely ready but I also knew it didn't matter. Now that I've been blogging for one month, it's time for a review. I want to take stock of what went well and what could have gone better.

Read 22 remaining paragraphs...

Permanent Bash aliases

Sep 3, 2014

This post will introduce a handy little Bash tip. I created it over a year ago but many other people have already done similar things.

Bash aliases are incredibly convenient. If, for some reason, you don't already use them then you should read this tutorial.

Read 7 remaining paragraphs...

Music for programming

Sep 1, 2014

Music is awesome. Music while programming is even more awesome. It reduces the effect of distracting background noise and helps you get into the right frame of mind. Without further ado, here are my recommendations.

Read 20 remaining paragraphs...

Vim auto-capitalisation

Aug 29, 2014

Continuing in the same theme as my last post, I am going to write about another awesome Vim tip I found recently. That is: automatic capitalisation of the first letter of each sentence.

Many word processors already include this. For some reason, Vim and other text editors don't usually have the option. I don't know why. I feel that a lot of unnecessary key-strokes are wasted on the shift keys. It also stresses the little fingers and twists the wrists.

Read 16 remaining paragraphs...

Better Vim abbreviations

Aug 27, 2014

I've been using Vim, full-time, for nearly three years. I have written a lot of plain text in that time.

Pretty early on, I noticed I was wasting a lot of time with several common typing patterns. For example, to type "I've" requires 5 key strokes including two stretches of the little fingers. I replaced that with the abbreviation iab iv I've. That's only two keys instead of five and it doesn't put any unnecessary stress on the little fingers (which I sometimes have problems with).

Read 16 remaining paragraphs...

My password generation scheme

Aug 25, 2014

I've been using computers for a long time. Way back in the days of Windows 95 I had a tremendously insecure password. I think it was 1234. I later upgraded to 123456 and then the (clearly far superior) 654321.

At one point I used my mothers maiden name and later my cat's name. When I ran across sites that required numbers in the password, I simply added a 1 to the end.

Read 14 remaining paragraphs...

A third attempt at Anki

Aug 22, 2014

I first found out about Anki ages ago. Probably about four years ago on LessWrong. It's a flashcard program which makes remembering things easier.

A lot of smart people had said a lot of good things about Anki. That made me want to try it. However, I have yet to stick with it successfully.

Read 13 remaining paragraphs...

Namecheap, GitHub Pages and apex domains

Aug 20, 2014

[Edit: Since writing this post, I have switched to CloudFlare. Using their CNAME flattening, you can pretty much have it all: a fast CDN, an apex domain and no annoying 302 redirect that GitHub pages used to add. See this post for details.]

When I was setting up this blog, I was excited to learn that GitHub Pages runs on a fast Content Delivery Network. But there is a problem. It does not work with apex domains (i.e. instead of

Read 8 remaining paragraphs...

Wordsearch game

Aug 18, 2014

For my first post not about blogging, I thought I would return to my wordsearch game. I made it for the website and I would say it's the game I'm proudest of. I really like the simplicity and style of it.

In this post, I will take a look back at what I've already done and make a note of what I think could be improved. In subsequent posts, I plan to make some improvements and also make it into a standalone game.

Read 24 remaining paragraphs...

Paragraph counts in jekyll

Aug 15, 2014

I'm a big fan of Ars Technica. There is one thing I particularly like about their RSS feed. It shows the first few paragraphs of the article followed by a link saying "Read X remaining paragraphs".

If I can't read the full article from an RSS feed, this is the next best option. It has two big advantages:

Read 12 remaining paragraphs...

Creating a style for this blog

Aug 13, 2014

I didn't want to use an existing template for this blog. As a web programmer/designer, it would feel wrong not to make my own.

However, I'm not an artist. I've struggled with creating visually attractive content in the past. For my last project,, I opted to use the default Bootstrap theme. I just wanted to get something up and running quickly.

This post will describe some of the things I've learned while creating this blog.

Read 21 remaining paragraphs...

Hello world

Aug 11, 2014

I'm starting a blog.

I want to contribute something back to the world. I've learned a lot over the past few years and I want to start sharing it. I may someday post articles about what I've already done (or upload it to my GitHub profile). For now though, I am going to write about what I've been interested in most recently: front end web development.

You can check out to see my last project (GitHub repo here). It is a website for the Professor P series of children's books and also includes five JavaScript games.

Read 5 remaining paragraphs...