St Bathans

November 19 2019 · central-otago landscape-photography

St Bathans is an old gold mining town in Central Otago. It was established in the 1860s to support miners and is now nearly abandoned. It’s still a popular tourist spot with the blue lakes (photograph below) an iconic scene of the old sluicings.

Good morning

Good morning


Thinkpad T440s

November 17 2019 · tech laptop thinkpad

I recently picked up a second hand Thinkpad T440s laptop as a replacement for my Macbook Air. The Macbook was stuck with 4gb of RAM with no option to upgrade it. For a few hundred dollars I got a Thinkpad T440s with the following specs

  • Intel i5-4300U dual core CPU @ 1.90GHz
  • 12gb RAM (maximum for the model)
  • 128gb HDD
  • 14” 1600x900 screen

I replaced the hard drive with a new 480gb SATA SSD. There are guides on the internet for replacing the screen with a 1920x1080 panel. You can also replace the …


Typescript I - Safe Fetch with Decoders

What happens when we run this Typescript code?

type Person = {
    Name: string;
    Sport: string;
}

async function loadPerson(id: number): Promise<Person> {
    let result = await fetch(`/person/${id}.json`);

    return await result.json() as Person;
}

loadPerson(1).then(person => console.log(person.Name));

person/1.json

{
  "Name": "Ortho Stice",
  "Sport": "Tennis"
}

Exactly what you think - it logs Ortho Stice to the console. Do you think the code …


F# Web Application on AWS Lambda

I recently built a small F# web app which runs on AWS Lambda. In this post I look at some of the libraries, tooling, and tips which can help you build on the same platform. I used Giraffe (an F# layer on top of ASP.NET Core) as the web framework and DynamoDB as the database. AWS API Gateway receives the web request and hands it off to the Lambda for processing.

Link to this section The Application

A local bar publishes their beer tap list in …


AWS Developer Associate Exam 2019

I recently got the AWS Developer Associate certification. Here are some tips and a copy of my study notes.

Read the AWS Exam Guide . It’s a 3 pager by AWS describing exactly what is in the test.

Purchase the Whizlabs Practice Exams. A few people had recommended these to me and I found the questions a good way to study. All questions have a detailed explanation of the correct answer and reasons why the other options weren’t correct. If you start the exam in ‘practice mode’ …