<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Maori Geek</title>
    <link>https://maori.geek.nz/</link>
    <description>Recent content on Maori Geek</description>
    <image>
      <title>Maori Geek</title>
      <url>https://maori.geek.nz/images/papermod-cover.png</url>
      <link>https://maori.geek.nz/images/papermod-cover.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en-nz</language>
    <lastBuildDate>Sun, 28 Jun 2026 21:35:54 +1200</lastBuildDate>
    <atom:link href="https://maori.geek.nz/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>My New Site</title>
      <link>https://maori.geek.nz/posts/my-new-site/</link>
      <pubDate>Sun, 28 Jun 2026 21:35:54 +1200</pubDate>
      <guid>https://maori.geek.nz/posts/my-new-site/</guid>
      <description>&lt;p&gt;Medium has been going down hill fast. I didn&amp;rsquo;t notice for a while, since I have been heads down coding, but the other day when I needed to share a post with someone, it didnt even load my blog.&lt;/p&gt;
&lt;p&gt;I have moved all my blog over to github webpages, using hugo, medium-to-hugo and PaperMod theme.&lt;/p&gt;
&lt;p&gt;Writing posts and sharing them is very motivating for me and finally medium broke that enough for me to move my decade old blog for the third time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>I Tried to Write a HTTP Service in Zig and Failed</title>
      <link>https://maori.geek.nz/posts/2026/i-tried-to-write-a-http-service-in-zig-and-failed/</link>
      <pubDate>Mon, 09 Mar 2026 23:54:47 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2026/i-tried-to-write-a-http-service-in-zig-and-failed/</guid>
      <description>&lt;p&gt;I really like Zig. I have never wanted to write manually memory-managed code before. I don’t like C because it seems opaque and dangerous and I don’t like Rust for purely aesthetic reasons; but Zig is shiny and new and pretty and I can understand it intuitivly.&lt;/p&gt;
&lt;p&gt;I wanted to write a small HTTP service in Zig (0.15.2) that used SQLite as a data store and could scale up. To do this I used the &lt;code&gt;[http.zig](https://github.com/karlseguin/http.zig)&lt;/code&gt; and &lt;code&gt;[zig.sqlite](https://github.com/vrischmann/zig-sqlite)&lt;/code&gt; libraries which are pretty stable. I spent a couple weeks on this project, but kind of hit a few walls all at once which has lead me to the decision to abadon the spike.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Being On Call for Type 1 Diabetes with Carer</title>
      <link>https://maori.geek.nz/posts/2025/2025-07-15_being-on-call-for-type-1-diabetes-with-carer/</link>
      <pubDate>Tue, 15 Jul 2025 23:34:11 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2025/2025-07-15_being-on-call-for-type-1-diabetes-with-carer/</guid>
      <description>&lt;p&gt;Managing my 5yo son’s Type 1 Diabetes (&lt;strong&gt;T1D&lt;/strong&gt;) at night is a lot like being on call as a software engineer. Both are absolute shite. Waking up to alarms at all hours, trying to fix something to only make it worse, not understanding why anything is happening, alarm fatigue, lost sleep, burnout, and the constant stress you will sleep through an emergency.&lt;/p&gt;
&lt;p&gt;It is a bit guff to compare the two. Though, there are a some things that do apply to both, like good tools can reduce the burden.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sqlite HTTP API: Zig vs Golang</title>
      <link>https://maori.geek.nz/posts/2025/2025-03-01_sqlite-http-api-zig-vs-golang/</link>
      <pubDate>Sat, 01 Mar 2025 03:12:16 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2025/2025-03-01_sqlite-http-api-zig-vs-golang/</guid>
      <description>&lt;p&gt;I like shiny new things. Zig is very new, and very shiny, and very fast. I have no experience writing non-garbage collected languages, so I want to test it out and compare Zig with GoLang. &lt;a href=&#34;https://github.com/grahamjenson/zigvsgo&#34;&gt;&lt;code here&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;benchmark&#34;&gt;Benchmark&lt;/h3&gt;
&lt;p&gt;The benchmark is a HTTP API wrapper around SQLite:
`&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;/write&lt;/code&gt;&lt;/dt&gt;
&lt;dt&gt;takes a&lt;/dt&gt;
&lt;dt&gt;JSON&lt;/dt&gt;
&lt;dt&gt;{&lt;/dt&gt;
&lt;dt&gt;&amp;ldquo;name&amp;rdquo;&lt;/dt&gt;
&lt;dd&gt;&lt;name&gt;} and write is to the
DB&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;&lt;code&gt;/read&lt;/code&gt;
returns
100
items
`&lt;/p&gt;
&lt;p&gt;The SQL:
`&lt;/p&gt;
&lt;p&gt;&amp;ndash; TABLE&lt;/p&gt;
&lt;p&gt;CREATE&lt;/p&gt;
&lt;p&gt;TABLE
IF
NOT&lt;/p&gt;</description>
    </item>
    <item>
      <title>Small, Light, Robust Phones for a Type 1 Diabetic Child</title>
      <link>https://maori.geek.nz/posts/2025/2025-02-13_small-light-robust-phones-for-a-type-1-diabetic-child/</link>
      <pubDate>Thu, 13 Feb 2025 04:36:16 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2025/2025-02-13_small-light-robust-phones-for-a-type-1-diabetic-child/</guid>
      <description>&lt;p&gt;Our 4yo T1D son, Sam, needs to carry a phone everywhere he goes to act as his pancreas. This phone needs to:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;run&lt;/strong&gt; &lt;a href=&#34;https://androidaps.readthedocs.io/en/latest/&#34;&gt;&lt;strong&gt;Android APS&lt;/strong&gt;&lt;/a&gt; and a few other apps which need &lt;a href=&#34;https://androidaps.readthedocs.io/en/latest/Getting-Started/Phones.html&#34;&gt;Android 11 or above (14 is preferred)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;have good bluetooth, Wifi and cell signal.&lt;/strong&gt; It needs to have constant communication with his Omnipod pump, Dexcom G7 and remote systems like &lt;a href=&#34;https://nightscout.github.io/&#34;&gt;NightScout&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;be sturdy, light and small.&lt;/strong&gt; It is strapped to a very active 4yo.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;be easy to use.&lt;/strong&gt; Clicking the wrong button can be pretty dangerous.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;be very cheap.&lt;/strong&gt; Things break, buy a couple phones as backups.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The phone doesn’t need fast graphics, large battery, big screen or good camera; the things most phones are marketed on. It just needs to work and not break when a 4yo falls off their bike.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Problems with Predicting Blood Glucose with Regression</title>
      <link>https://maori.geek.nz/posts/2024/2024-06-20_problems-with-predicting-blood-glucose-with-regression/</link>
      <pubDate>Thu, 20 Jun 2024 04:25:03 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2024/2024-06-20_problems-with-predicting-blood-glucose-with-regression/</guid>
      <description>&lt;p&gt;I use an app called &lt;a href=&#34;https://github.com/nightscout/nightguard&#34;&gt;NightGuard&lt;/a&gt; to track my Type 1 Diabetic (&lt;strong&gt;T1D&lt;/strong&gt;) son’s blood glucose levels (&lt;strong&gt;BGL&lt;/strong&gt;) and alert me if he needs some food or insulin. &lt;strong&gt;I love NightGuard.&lt;/strong&gt; It is one of the most important applications I use to manage T1D.&lt;/p&gt;
&lt;p&gt;One of NightGuard’s best features is its predictive alerts. These alerts use &lt;strong&gt;regression models&lt;/strong&gt; to try predict BGL and notify of future problems. In this post I am going to explore the way NightGuard uses regression and see if I can improve its outcomes.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Inkscape to make Individual Puzzle Pieces for Laser Cutting</title>
      <link>https://maori.geek.nz/posts/2024/2024-05-21_using-inkscape-to-make-individual-puzzle-pieces-for-laser-cutting/</link>
      <pubDate>Tue, 21 May 2024 23:03:14 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2024/2024-05-21_using-inkscape-to-make-individual-puzzle-pieces-for-laser-cutting/</guid>
      <description>&lt;p&gt;My Laser Cutter bed is 300mm x 500mm, and I need to make a shape that is about 900m x 750mm. I could just use squares, but then the joinery gets complicated making sure everything lines up properly.&lt;/p&gt;
&lt;p&gt;Using jigsaw pieces might be a fun way to make such large shapes, so here is how to do that.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install “&lt;a href=&#34;https://inkscape.org/~Neon22/%E2%98%85lasercut-jigsaw&#34;&gt;Lasercut Jigsaw&lt;/a&gt;” extension
&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2024/2024-05-21_using-inkscape-to-make-individual-puzzle-pieces-for-laser-cutting/images/1.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create the puzzle you want with &lt;code&gt;Extensions &amp;gt; Render &amp;gt; Lasercut Jigsaw&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Design: Blood Glucose Levels</title>
      <link>https://maori.geek.nz/posts/2024/2024-02-20_design-blood-glucose-levels/</link>
      <pubDate>Tue, 20 Feb 2024 02:51:43 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2024/2024-02-20_design-blood-glucose-levels/</guid>
      <description>&lt;p&gt;I am building a Blood Glucose Display and just wanted to collect a few of other apps examples together to compare and get ideas:#### Dexcom&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2024/2024-02-20_design-blood-glucose-levels/images/1.gif#layoutTextWidth&#34;&gt;
&lt;strong&gt;Libre&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2024/2024-02-20_design-blood-glucose-levels/images/2.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;nightguard&#34;&gt;NightGuard&lt;/h4&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2024/2024-02-20_design-blood-glucose-levels/images/3.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;nightscout&#34;&gt;Nightscout&lt;/h4&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2024/2024-02-20_design-blood-glucose-levels/images/4.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;sugarpixel&#34;&gt;SugarPixel&lt;/h4&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2024/2024-02-20_design-blood-glucose-levels/images/5.png#layoutTextWidth&#34;&gt;
I don’t 100% like any of them.&lt;/p&gt;
&lt;p&gt;There are like two ways in which I use this information:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As a display to “glance” numbers and to alarm me if something is wrong. Like pull and push information.&lt;/li&gt;
&lt;li&gt;Using the information to calculate treatments, once something is wrong, or I think something is going wrong I need to work out a remedy.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;A lot of them contain graphs and other information that I don’t really need for either purpose.This is just a quick post about this to force my ideas into a box.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Managing a Type 1 Diabetic Preschooler with AndroidAPS</title>
      <link>https://maori.geek.nz/posts/2024/2024-02-18_managing-a-type-1-diabetic-preschooler-with-androidaps/</link>
      <pubDate>Sun, 18 Feb 2024 09:01:18 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2024/2024-02-18_managing-a-type-1-diabetic-preschooler-with-androidaps/</guid>
      <description>&lt;p&gt;Sam, our 3.5yo T1D, just started preschool. In order to keep Sam safe with his BGL in a good range, reduce our stress and to help the staff at his new preschool we devised a plan that focused on:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;making a custom &lt;a href=&#34;https://www.diabetes.org.nz/diabetes-action-and-management-plans&#34;&gt;Diabetes Action and Management Plan&lt;/a&gt;s (called &lt;a href=&#34;https://www.jdrf.org/socentralohio/wp-content/uploads/sites/12/2017/08/Back2School-504_D2.pdf&#34;&gt;504 plan&lt;/a&gt;s in the US)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automating&lt;/strong&gt; with AndroidAPS’s SMB (super-micro-bolus) and &lt;strong&gt;Remotely&lt;/strong&gt; controlling AAPS through &lt;a href=&#34;https://androidaps.readthedocs.io/en/latest/Children/SMS-Commands.html&#34;&gt;SMS commands&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This post will go into each briefly to hopefully help anyone else going through similar stress.#### Action and Management Plan&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to implement JavaScript String.length in Golang</title>
      <link>https://maori.geek.nz/posts/2023/2023-09-14_how-to-implement-javascript-string.length-in-golang/</link>
      <pubDate>Thu, 14 Sep 2023 02:24:06 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2023/2023-09-14_how-to-implement-javascript-string.length-in-golang/</guid>
      <description>&lt;p&gt;I needed to implement JavaScript &lt;code&gt;.length&lt;/code&gt; in Golang, the solution was pretty fun so I will tell you how.For some strings Golang’s &lt;code&gt;len&lt;/code&gt; function will do, e.g.
`&lt;/p&gt;
&lt;p&gt;&amp;ldquo;Hello World!&amp;rdquo;
.
length&lt;/p&gt;
&lt;p&gt;// JS     12&lt;/p&gt;
&lt;p&gt;len
(
&amp;ldquo;Hello World!&amp;rdquo;
)&lt;br&gt;
// Golang 12&lt;/p&gt;
&lt;p&gt;`&lt;/p&gt;
&lt;p&gt;The problems start when you include any unicode characters, e.g.
`&lt;/p&gt;
&lt;p&gt;&amp;ldquo;👍&amp;rdquo;
.
length&lt;/p&gt;
&lt;p&gt;// JS     2&lt;/p&gt;
&lt;p&gt;len
(
&amp;ldquo;👍&amp;rdquo;
)&lt;br&gt;
// Golang 4&lt;/p&gt;
&lt;p&gt;`&lt;/p&gt;
&lt;p&gt;This is because JavaScript is implemented in UTF-16 (or &lt;a href=&#34;https://mathiasbynens.be/notes/javascript-encoding&#34;&gt;UCS-2&lt;/a&gt;) and Golang is in UTF-8.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Omnipod Dash &#43; Dexcom G7 &#43; AndroidAPS</title>
      <link>https://maori.geek.nz/posts/2023/2023-08-13_omnipod-dash-dexcom-g7-androidaps/</link>
      <pubDate>Sun, 13 Aug 2023 09:18:31 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2023/2023-08-13_omnipod-dash-dexcom-g7-androidaps/</guid>
      <description>&lt;p&gt;I was asked by an &lt;a href=&#34;https://www.omnipod.com/about-insulet&#34;&gt;Insulet&lt;/a&gt; (manufacturers of Omnipod) representative if I would like to share our T1D story with &lt;a href=&#34;https://en.wikipedia.org/wiki/Pharmac&#34;&gt;Pharmac&lt;/a&gt; (the government organisation that decided which medicines and pharmaceutical products are subsidised) via &lt;a href=&#34;http://diabetes.org.nz&#34;&gt;Diabetes New Zealand&lt;/a&gt;. Pharmac recently put out a “&lt;a href=&#34;https://pharmac.govt.nz/news-and-resources/news/cgms/&#34;&gt;Request for Proposal&lt;/a&gt;s” to fund CGMs and insulin pumps. I love the Omnipod and our Dexcom CGM and wish all New Zealand T1D’s would have access to them.&lt;/p&gt;
&lt;p&gt;Below is the letter I wrote.To whomever will listen,&lt;/p&gt;</description>
    </item>
    <item>
      <title>GoLang &#43; SQLite on Fly.io with LiteFS: a Quick Benchmark</title>
      <link>https://maori.geek.nz/posts/2023/2023-07-17_golang-sqlite-on-fly.io-with-litefs-a-quick-benchmark/</link>
      <pubDate>Mon, 17 Jul 2023 02:39:37 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2023/2023-07-17_golang-sqlite-on-fly.io-with-litefs-a-quick-benchmark/</guid>
      <description>&lt;p&gt;I am thinking about using &lt;a href=&#34;https://go.dev/&#34;&gt;GoLang&lt;/a&gt; and &lt;a href=&#34;https://www.sqlite.org/index.html&#34;&gt;SQLite&lt;/a&gt; for a project. Looking around I found a &lt;a href=&#34;https://www.youtube.com/watch?v=XcAYkriuQ1o&#34;&gt;presentation&lt;/a&gt; by &lt;a href=&#34;https://github.com/benbjohnson&#34;&gt;Ben Johnson&lt;/a&gt; from &lt;a href=&#34;https://fly.io/&#34;&gt;Fly.io&lt;/a&gt; about &lt;a href=&#34;https://fly.io/blog/introducing-litefs/&#34;&gt;LiteFS&lt;/a&gt; which is working towards a more &lt;strong&gt;scalable&lt;/strong&gt; and &lt;strong&gt;reliable&lt;/strong&gt; SQLite. This post is just about me getting something working with these technologies and stressing them a little.&lt;/p&gt;
&lt;h4 id=&#34;benchmark&#34;&gt;Benchmark&lt;/h4&gt;
&lt;p&gt;I have a simple GoLang app with one route to inserts a row into a SQLite database. I want to test calling this endpoint when:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Moving to Android APS</title>
      <link>https://maori.geek.nz/posts/2023/2023-06-06_moving-to-android-aps/</link>
      <pubDate>Tue, 06 Jun 2023 04:46:26 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2023/2023-06-06_moving-to-android-aps/</guid>
      <description>&lt;p&gt;In this post I am going to discuss moving our Type 1 Diabetic (&lt;strong&gt;T1D&lt;/strong&gt;) 3yo son Sam from &lt;a href=&#34;https://camdiab.com/&#34;&gt;&lt;strong&gt;CamAPS&lt;/strong&gt;&lt;/a&gt; to &lt;a href=&#34;https://androidaps.readthedocs.io/en/latest/&#34;&gt;&lt;strong&gt;AndroidAPS&lt;/strong&gt;&lt;/a&gt;; Why we moved, the logistics of the the change, our current setup, and the results we are seeing.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2023/2023-06-06_moving-to-android-aps/images/1.jpeg#layoutTextWidth&#34;&gt;
Sam’s Bedroom door with phone mount&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: This is&lt;/em&gt; &lt;strong&gt;&lt;em&gt;not medical advice&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;or a recommendation, it is just our experience.&lt;/em&gt;#### Leaving CamAPS&lt;/p&gt;
&lt;p&gt;To manage my sons Type 1 Diabetes (&lt;strong&gt;T1D&lt;/strong&gt;) I need data. All the data I can get, and I need it to be &lt;strong&gt;accurate&lt;/strong&gt; and &lt;strong&gt;timely&lt;/strong&gt;. I need to know:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Layered Laser Cut Cardboard Art with Inkscape</title>
      <link>https://maori.geek.nz/posts/2022/2022-12-21_layered-laser-cut-cardboard-art-with-inkscape/</link>
      <pubDate>Wed, 21 Dec 2022 03:04:25 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-12-21_layered-laser-cut-cardboard-art-with-inkscape/</guid>
      <description>&lt;p&gt;I really love art by &lt;a href=&#34;https://www.martintomsky.com/&#34;&gt;Martin Tomsky&lt;/a&gt; that is created with layers. I wanted to try something similar.&lt;/p&gt;
&lt;p&gt;The source image:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2022/2022-12-21_layered-laser-cut-cardboard-art-with-inkscape/images/1.jpeg#layoutTextWidth&#34;&gt;
Tui by &lt;a href=&#34;https://www.flickr.com/photos/69029168@N00&#34;&gt;Matt Binns&lt;/a&gt; [&lt;a href=&#34;https://commons.wikimedia.org/wiki/File:Tui_on_flax.jpg&#34;&gt;source&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;The goal:&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2022/2022-12-21_layered-laser-cut-cardboard-art-with-inkscape/images/2.jpeg#layoutTextWidth&#34;&gt;
These are examples from previous attempts&lt;/p&gt;
&lt;h4 id=&#34;step-1-preprocess&#34;&gt;Step 1: Preprocess&lt;/h4&gt;
&lt;p&gt;First we take the source image and use cut out the subject and adjust the colour to be very vibrant.&lt;/p&gt;
&lt;p&gt;Note: &lt;code&gt;Copy Subject&lt;/code&gt; in the photos app and &lt;code&gt;New From Clipboard&lt;/code&gt; in macOS preview are useful here.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating my Son’s Pancreas with CamAPS and Dana-i Insulin Pump</title>
      <link>https://maori.geek.nz/posts/2022/2022-11-03_automating-my-sons-pancreas-with-camaps-and-danai-insulin-pump/</link>
      <pubDate>Thu, 03 Nov 2022 19:00:35 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-11-03_automating-my-sons-pancreas-with-camaps-and-danai-insulin-pump/</guid>
      <description>&lt;p&gt;This is the third post about my 2yo son’s Type 1 Diabetes (&lt;strong&gt;T1D&lt;/strong&gt;). Previously, I wrote about his &lt;a href=&#34;https://maori.geek.nz/the-unreasonable-math-of-type-1-diabetes-8c96bdf5b7fb&#34;&gt;initial management&lt;/a&gt; coming out of the hospital, then his &lt;a href=&#34;https://maori.geek.nz/6-months-as-a-full-time-pancreas-34ae09106293&#34;&gt;management with a Continuous Glucose Monitor (&lt;strong&gt;CGM)&lt;/strong&gt;&lt;/a&gt;. This post is about the last three months we have been using the &lt;a href=&#34;https://www.intuitivetherapeutics.co.nz/about/dana-i-insulin-pump&#34;&gt;Dana-i insulin pump&lt;/a&gt; with the &lt;a href=&#34;https://camdiab.com/&#34;&gt;CamAPS Hybrid-Closed-Loop&lt;/a&gt; (&lt;strong&gt;HCL&lt;/strong&gt;) algorithm.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Obligatory: nothing here is medical advice.&lt;/em&gt;### Insulin Pump&lt;/p&gt;
&lt;p&gt;The pump we chose was the &lt;a href=&#34;https://www.intuitivetherapeutics.co.nz/about/dana-i-insulin-pump&#34;&gt;Dana-i pump&lt;/a&gt;. I wrote about the reasons we picked that pump &lt;a href=&#34;https://maori.geek.nz/which-insulin-pump-to-choose-be57fc81a4ca&#34;&gt;here&lt;/a&gt;, but basically the Dana-i is small, remotely controllable and can be used with the CamAPS hybrid-closed-loop.&lt;/p&gt;</description>
    </item>
    <item>
      <title>6 Months as a Full Time Pancreas</title>
      <link>https://maori.geek.nz/posts/2022/2022-09-27_6-months-as-a-full-time-pancreas/</link>
      <pubDate>Tue, 27 Sep 2022 07:50:11 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-09-27_6-months-as-a-full-time-pancreas/</guid>
      <description>&lt;h4 id=&#34;managing-our-sons-type-1-diabetes-with-multiple-daily-injections-and-dexcom-g6-continuous-glucose-monitor&#34;&gt;Managing our Son’s Type 1 Diabetes with Multiple Daily Injections and Dexcom G6 Continuous Glucose Monitor&lt;/h4&gt;
&lt;p&gt;In a &lt;a href=&#34;https://maori.geek.nz/the-unreasonable-math-of-type-1-diabetes-8c96bdf5b7fb&#34;&gt;previous post&lt;/a&gt;, I wrote about my 18 month old son’s (Sam) Type 1 Diabetes &lt;strong&gt;(T1D)&lt;/strong&gt; diagnosis and the first month when we were learning as much as possible and struggling. That post was received with so much love and positivity, I have decided to follow up with a 6 month recap.&lt;/p&gt;
&lt;p&gt;Sam has now had diabetes for a quarter of his life (18–24 months). We have spent these first 6 months learning to be Sam’s pancreas using Multiple Daily Injections (&lt;strong&gt;MDI&lt;/strong&gt;) and the Dexcom G6 Continuous Glucose Monitor (&lt;strong&gt;CGM&lt;/strong&gt;). This post is about what we are doing and what we are focused on. It will hopefully be helpful for people in a similar situation and to serve as a reminder to ourselves how far we have come managing T1D.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What is HbA1c?</title>
      <link>https://maori.geek.nz/posts/2022/2022-09-19_what-is-hba1c/</link>
      <pubDate>Mon, 19 Sep 2022 01:42:52 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-09-19_what-is-hba1c/</guid>
      <description>&lt;h4 id=&#34;and-what-is-ngsp-ifcc-gmi-and-eag&#34;&gt;And what is NGSP, IFCC, GMI and eAG?&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;What is HbA1c?&lt;/strong&gt; Glucose in the bloodstream will sometimes randomly link (&lt;strong&gt;glycate&lt;/strong&gt;) with a red blood cell’s haemoglobin (&lt;strong&gt;Hb&lt;/strong&gt;) creating “&lt;strong&gt;Glycated haemoglobin”&lt;/strong&gt; or &lt;strong&gt;HbA1c&lt;/strong&gt;. The more glucose there is in the bloodstream the more likely this linking will happen. A red blood cell is in circulation for about 120 days, so the amount of HbA1c in the bloodstream can be used to approximate average blood glucose level over that time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Awesome Year (&#43;) At Clubhouse</title>
      <link>https://maori.geek.nz/posts/2022/2022-09-10_my-awesome-year-at-clubhouse/</link>
      <pubDate>Sat, 10 Sep 2022 00:41:42 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-09-10_my-awesome-year-at-clubhouse/</guid>
      <description>&lt;p&gt;While catching up with some friends in 2021, they &lt;a href=&#34;https://xkcd.com/356/&#34;&gt;nerd snipe&lt;/a&gt;d me by talking about all the interesting scaling problems they were having at Clubhouse. I quickly found myself in a meeting with the Rohan, Clubhouse’s cofounder, discussing all the other novel challenges that such an ambitious product has. Before I knew it, I was on the infra team at Clubhouse.&lt;/p&gt;
&lt;p&gt;I joined Clubhouse in June 2021 and have decided to leave in September 2022. This is a quick post about my work there.While at Clubhouse I mostly worked on:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Add a Dexcom Share Follower with curl</title>
      <link>https://maori.geek.nz/posts/2022/2022-08-03_add-a-dexcom-share-follower-with-curl/</link>
      <pubDate>Wed, 03 Aug 2022 07:23:19 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-08-03_add-a-dexcom-share-follower-with-curl/</guid>
      <description>&lt;p&gt;This is just a short set of commands that I used to add a dexcom share follower with curl. I am writing this mostly so I remember if I have to do it again, but also if someone else needs it.&lt;/p&gt;
&lt;p&gt;This is based off the commands that listed &lt;a href=&#34;https://gist.github.com/StephenBlackWasAlreadyTaken/adb0525344bedade1e25&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: use&lt;/em&gt; &lt;code&gt;_https://share1.dexcom.com_&lt;/code&gt; &lt;em&gt;if you have a US account and&lt;/em&gt; &lt;code&gt;_https://shareous1.dexcom.com_&lt;/code&gt; &lt;em&gt;for non-US account.&lt;/em&gt;&lt;strong&gt;Authenticate&lt;/strong&gt;
&lt;code&gt;SESSION_ID=$(curl -v -H &amp;quot;Accept: application/json&amp;quot; \   -H &amp;quot;Content-Type: application/json&amp;quot; \   -H &amp;quot;User-Agent: Dexcom Share/3.0.2.11 CFNetwork/672.0.2 Darwin/14.0.0&amp;quot; \   -X POST \   &amp;quot;https://shareous1.dexcom.com/ShareWebServices/Services/General/LoginPublisherAccountByName&amp;quot; -d &#39;{   &amp;quot;accountName&amp;quot;:&amp;quot;&amp;lt;username&amp;gt;&amp;quot;,   &amp;quot;applicationId&amp;quot;:&amp;quot;d8665ade-9673-4e27-9ff6-92db4ce13d13&amp;quot;,   &amp;quot;password&amp;quot;:&amp;quot;&amp;lt;password&amp;gt;&amp;quot;   }&#39; | tr -d &#39;&amp;quot;&#39;)&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Which Insulin Pump to Choose?</title>
      <link>https://maori.geek.nz/posts/2022/2022-06-03_which-insulin-pump-to-choose/</link>
      <pubDate>Fri, 03 Jun 2022 03:04:37 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-06-03_which-insulin-pump-to-choose/</guid>
      <description>&lt;h4 id=&#34;a-quick-guide-to-pumps-available-in-new-zealand&#34;&gt;A quick guide to pumps available in New Zealand&lt;/h4&gt;
&lt;p&gt;We are tired. Managing our 2 year old son’s (Sam) type 1 diabetes (&lt;strong&gt;T1D&lt;/strong&gt;) with Multiple Daily Injections (&lt;strong&gt;MDI&lt;/strong&gt;) is a lot of work. It’s normal to get up and give food or insulin multiple times a night, and it is necessary to give multiple injections at precise times during meals.&lt;/p&gt;
&lt;p&gt;We need a better tool! The best tool available is an &lt;strong&gt;insulin pump&lt;/strong&gt;. MDI is coarse, we give 8–10 giant doses of insulin per day. A pump, on the other hand, is fine grained, it can give hundreds of tiny doses a day.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Unreasonable Math of Type 1 Diabetes</title>
      <link>https://maori.geek.nz/posts/2022/2022-02-17_unreasonable-math-of-type-1-diabetes/</link>
      <pubDate>Thu, 17 Feb 2022 07:59:44 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2022/2022-02-17_unreasonable-math-of-type-1-diabetes/</guid>
      <description>&lt;p&gt;&lt;em&gt;This is not medical advice, don’t base any treatments on this.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In January 2022, our 18 month old son, Sam, was diagnosed with Type 1 Diabetes (T1D). This was stressful, sad, and scary as we spent 5 days in hospital with him while he recovered from Diabetic Keto Acidosis (DKA). Within an hour of him being diagnosed a wonderful diabetes nurse gave us a literal backpack filled with books and information we needed to learn to keep him alive. We started to read and try to understand what it takes to manage T1D. Immediately the massive cognitive overhead it takes to just survive with this condition hit us.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Troubles with Lua</title>
      <link>https://maori.geek.nz/posts/2021/2021-09-27_my-troubles-with-lua/</link>
      <pubDate>Mon, 27 Sep 2021 10:32:50 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-09-27_my-troubles-with-lua/</guid>
      <description>&lt;p&gt;I use Redis and Redis uses Lua as a scripting language. Today was my first day using Lua in anger, and I am still angry.My problem is that in Redis I have many sets of keys, e.g. &lt;code&gt;s1 = {1,2,3} s2 = {3,4}&lt;/code&gt; and keys &lt;code&gt;1=a, 2=b, 3=c, 4=d&lt;/code&gt;. I want to return all values of all keys in the union of given sets, e.g. &lt;code&gt;f(s1 s2) = a b c d&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Game Of Life: CUDA vs Golang</title>
      <link>https://maori.geek.nz/posts/2021/2021-08-16_game-of-life-cuda-vs-golang/</link>
      <pubDate>Mon, 16 Aug 2021 09:30:55 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-08-16_game-of-life-cuda-vs-golang/</guid>
      <description>&lt;p&gt;I got a new graphics card because I want to play around with some machine learning using tensorflow and pytorch. Before I jump into all those high level concepts, with layers and layers of abstractions, I want to understand a little bit more about CUDA and how it works. I usually learn by doing, so I decided to do something pretty easy, implement Game Of Life (GOL) using CUDA.&lt;/p&gt;
&lt;p&gt;GOL is good use case for CUDA. It is a simple mathematical operation that can be massively parallelised. In this post I get a pretty fast implementation of GOL working in CUDA, and compare it against another implementation in Golang. **TLDR: CUDA wins… by a lot.**CUDA lets you compile code to be run on a graphics card. You write in a C like language two types of functions, one for the CPU (&lt;code&gt;host&lt;/code&gt;) and one for graphics card (&lt;code&gt;device&lt;/code&gt;). The code starts with a &lt;code&gt;main&lt;/code&gt; function executed on the CPU and can call out to &lt;code&gt;device&lt;/code&gt; kernel functions declared with &lt;code&gt;__global__&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Get an Email if Someone SSHs into Your Box</title>
      <link>https://maori.geek.nz/posts/2021/2021-07-19_get-an-email-if-someone-sshs-into-your-box/</link>
      <pubDate>Mon, 19 Jul 2021 07:44:03 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-07-19_get-an-email-if-someone-sshs-into-your-box/</guid>
      <description>&lt;p&gt;There are a couple different types of security; &lt;strong&gt;preventative&lt;/strong&gt; will stop something bad from happening and &lt;strong&gt;detective&lt;/strong&gt; will alert you when something bad does happen.&lt;/p&gt;
&lt;p&gt;I have box that is SSH accessible on the internet that I want secure. There are lots of good sources for preventative SSH security (e.g. no passwords, tight config…) but not many for detective security. To be more secure (and decrease my paranoia) I want to be notified when someone SSH’s into that box from the wide internet, and I usually read my email.The first part is being able to send an email from a script. I could use any old SMPT server, but using an authorised one will decrease the chance my email goes straight to spam. I use Gmail’s SMTP server since it is pretty easy to setup.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Make Python’s DynamoDB client faster with this one simple trick</title>
      <link>https://maori.geek.nz/posts/2021/2021-07-11_make-pythons-dynamodb-client-faster-with-this-one-simple-trick/</link>
      <pubDate>Sun, 11 Jul 2021 22:13:26 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-07-11_make-pythons-dynamodb-client-faster-with-this-one-simple-trick/</guid>
      <description>&lt;p&gt;AWS DynamoDB is popular because it is super fast &amp;amp; scalable. However, when using the Python client &lt;code&gt;boto3&lt;/code&gt; to fetch a large number of documents we started to noticed some unexplained slowness. This was super annoying as some of our queries were taking 20s to process BUT the actual dynamo query returned in only 6s. So we wanted to find out where that 14s was going.Using &lt;a href=&#34;https://hub.docker.com/r/amazon/dynamodb-local&#34;&gt;dynamodb-local&lt;/a&gt; I &lt;code&gt;put&lt;/code&gt; 250,000 basic items:
&lt;code&gt;with table.batch_writer() as batch:   for i in range(250000):   batch.put_item(Item={   &#39;id&#39;: i,   &#39;updated_at&#39;: i,   &#39;name&#39;: &amp;quot;some data&amp;quot;,   &#39;status&#39;: &amp;quot;some other stuff&amp;quot;   })&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Python Decorator to Memoize Instance Methods</title>
      <link>https://maori.geek.nz/posts/2021/2021-06-30_python-decorator-to-memoize-instance-methods/</link>
      <pubDate>Wed, 30 Jun 2021 09:24:14 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-06-30_python-decorator-to-memoize-instance-methods/</guid>
      <description>&lt;p&gt;For the life of me I could not find a python decorator that memoizes methods on an instance. Something that replaces the pattern:
&lt;code&gt;class A:   def x(self):   if self._x is not None:   return self._x   self._x = something_difficult()   return self._x&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Sure there is &lt;code&gt;[functools](https://docs.python.org/3.9/library/functools.html)&lt;/code&gt; [] (&lt;a href=&#34;https://docs.python.org/3.9/library/functools.html%29%60%5B@cache%5D%28https://docs.python.org/3.9/library/functools.html%29%60&#34;&gt;https://docs.python.org/3.9/library/functools.html)`[@cache](https://docs.python.org/3.9/library/functools.html)`&lt;/a&gt; [and] (&lt;a href=&#34;https://docs.python.org/3.9/library/functools.html%29%60%5B@cached_property%5D%28https://docs.python.org/3.9/library/functools.html%29%60&#34;&gt;https://docs.python.org/3.9/library/functools.html)`[@cached_property](https://docs.python.org/3.9/library/functools.html)`&lt;/a&gt; but these use a global &lt;code&gt;lru_cache&lt;/code&gt; for everything. I want the cache to live and die with the instance.&lt;/p&gt;
&lt;p&gt;I am still pretty new to python, but slowly getting the hang of it. That being said I came up with this:
`class memoize:&lt;br&gt;
def &lt;strong&gt;init&lt;/strong&gt;(self, func):&lt;br&gt;
self.func = func&lt;/p&gt;</description>
    </item>
    <item>
      <title>Calling Golang functions from Python with Bazel</title>
      <link>https://maori.geek.nz/posts/2021/2021-06-20_calling-golang-functions-from-python-with-bazel/</link>
      <pubDate>Sun, 20 Jun 2021 09:01:42 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-06-20_calling-golang-functions-from-python-with-bazel/</guid>
      <description>&lt;p&gt;So I have been doing a lot of Python and Django lately, but I miss Go. As an experiment I wanted to see how difficult it would be to directly call Golang functions from Python using my favourite build tool Bazel.&lt;/p&gt;
&lt;p&gt;I found this post, which explains how to build and connect the two manually:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.ardanlabs.com/blog/2020/07/extending-python-with-go.html&#34;&gt;Python and Go : Part II - Extending Python With Go&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Great now I am like 90% there!&lt;/p&gt;</description>
    </item>
    <item>
      <title>5 Awesome Years at Coinbase</title>
      <link>https://maori.geek.nz/posts/2021/2021-04-03_5-awesome-years-at-coinbase/</link>
      <pubDate>Sat, 03 Apr 2021 04:51:27 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-04-03_5-awesome-years-at-coinbase/</guid>
      <description>&lt;p&gt;I joined Coinbase March 28th 2016; my last day is April 2nd 2021. This is a quick write up about my experience on joining and working in the infrastructure team for 5 years at Coinbase, growing from 100 to over 1000 employees, from 3.5 million users to more than 40 million, and from trading $3 billion &lt;strong&gt;total&lt;/strong&gt; to now often trading that in a single day.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2021/2021-04-03_5-awesome-years-at-coinbase/images/1.png#layoutTextWidth&#34;&gt;
Coinbase in March 2016&lt;/p&gt;</description>
    </item>
    <item>
      <title>Every Job I Have Had</title>
      <link>https://maori.geek.nz/posts/2021/2021-03-16_every-job-i-have-had/</link>
      <pubDate>Tue, 16 Mar 2021 18:58:51 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2021/2021-03-16_every-job-i-have-had/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2021/2021-03-16_every-job-i-have-had/images/1.jpeg#layoutTextWidth&#34;&gt;
Everyone has a different path to where they are today. At inflection points in my career I often think back to the jobs that have got me here. I just wanted to list all my paid jobs to reflect on that journey.&lt;strong&gt;&lt;em&gt;Candy Mixer at Four Square (1995–96):&lt;/em&gt;&lt;/strong&gt; A family friend owned a dairy (corner store for non-kiwis) and they needed someone to make the pre-packed $1–2 mixed candy bags. Paid $5 an hour and free candy.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How “go build” Works</title>
      <link>https://maori.geek.nz/posts/2020/2020-09-11_how-go-build-works/</link>
      <pubDate>Fri, 11 Sep 2020 17:17:24 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-09-11_how-go-build-works/</guid>
      <description>&lt;p&gt;How does &lt;code&gt;go build&lt;/code&gt; compile the simplest Golang program? This post is here to answer that question.&lt;/p&gt;
&lt;p&gt;The simplest go program (I can think of) is &lt;code&gt;main.go&lt;/code&gt;:
&lt;code&gt;package main``func main() {}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If we run &lt;code&gt;go build main.go&lt;/code&gt; it outputs an executable &lt;code&gt;main&lt;/code&gt; that is 1.1Mb &lt;strong&gt;and does nothing&lt;/strong&gt;. What did &lt;code&gt;go build&lt;/code&gt; do to do create such a useful binary?&lt;/p&gt;
&lt;p&gt;&lt;code&gt;go build&lt;/code&gt; has some args that are useful for seeing how it builds:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning to play Asteroids in Golang with NEAT</title>
      <link>https://maori.geek.nz/posts/2020/2020-08-29_learning-to-play-asteroids-in-golang-with-neat/</link>
      <pubDate>Sat, 29 Aug 2020 23:52:37 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-08-29_learning-to-play-asteroids-in-golang-with-neat/</guid>
      <description>&lt;p&gt;I am a huge fan of &lt;a href=&#34;https://www.youtube.com/channel/UC0e3QhIYukixgh5VVpKHH9Q&#34;&gt;CodeBullet&lt;/a&gt;, an educational YouTuber that makes game playing AI bots. That is because computer science education more than just conveying complex ideas, it is also getting people excited using those ideas to solve interesting problems, something CodeBullet does very well.&lt;/p&gt;
&lt;p&gt;Two years ago CodeBullet showed &lt;a href=&#34;https://www.youtube.com/watch?v=N1WRualRBOQ&#34;&gt;a bot learning to play Asteroids&lt;/a&gt;. I though I wonder if I can do that… in Golang. The first thing was &lt;a href=&#34;https://maori.geek.nz/golang-desktop-app-with-webview-lorca-wasm-and-bazel-3283813bf89&#34;&gt;build a desktop app in Golang&lt;/a&gt;, then it was to &lt;a href=&#34;https://maori.geek.nz/making-asteroids-game-with-golang-lorca-webview-and-wasm-9a8bed30cf72&#34;&gt;build an asteroids game&lt;/a&gt;. Finally, this post is about how I used the &lt;a href=&#34;https://github.com/yaricom/goNEAT&#34;&gt;goNEAT&lt;/a&gt; implementation of &lt;a href=&#34;https://www.cs.ucf.edu/~kstanley/neat.html&#34;&gt;NEAT&lt;/a&gt; to build an AI that can play my asteroids game.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Making Asteroids Game with Golang, Lorca/Webview and WASM</title>
      <link>https://maori.geek.nz/posts/2020/2020-08-20_making-asteroids-game-with-golang-lorcawebview-and-wasm/</link>
      <pubDate>Thu, 20 Aug 2020 19:54:36 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-08-20_making-asteroids-game-with-golang-lorcawebview-and-wasm/</guid>
      <description>&lt;p&gt;In my past few posts &lt;a href=&#34;https://maori.geek.nz/golang-desktop-app-webview-vs-lorca-vs-electron-a5e6b2869391&#34;&gt;[1]&lt;/a&gt;&lt;a href=&#34;https://maori.geek.nz/golang-desktop-app-with-webview-lorca-wasm-and-bazel-3283813bf89&#34;&gt;[2]&lt;/a&gt; I have written about building a desktop application using &lt;a href=&#34;https://golang.org/&#34;&gt;Golang&lt;/a&gt; with &lt;a href=&#34;https://github.com/zserge/lorca&#34;&gt;Lorca&lt;/a&gt;/&lt;a href=&#34;https://github.com/webview/webview&#34;&gt;Webview&lt;/a&gt; to run a &lt;a href=&#34;https://webassembly.org/&#34;&gt;WebAssembly&lt;/a&gt; (WASM) binary. Now, I want to actually try use these technologies in anger and produce a distributable desktop application.&lt;/p&gt;
&lt;p&gt;I have chosen to make the game Asteroids (&lt;a href=&#34;https://github.com/grahamjenson/asteroids&#34;&gt;code here&lt;/a&gt;). It is reasonably complicated, fun and lets me play and learn more about Golangs &lt;code&gt;[syscall/js](https://golang.org/pkg/syscall/js/)&lt;/code&gt; package and algorithms like &lt;a href=&#34;https://en.wikipedia.org/wiki/Hyperplane_separation_theorem#Use_in_collision_detection&#34;&gt;Separating Axis Theorem (SAT)&lt;/a&gt; for collision detection. The goal is using Golang to build a single binary that can be downloaded onto different platforms (macOS, windows, linux) to play a fun game.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GoLang Desktop App with webview/Lorca, WASM and Bazel</title>
      <link>https://maori.geek.nz/posts/2020/2020-08-11_golang-desktop-app-with-webviewlorca-wasm-and-bazel/</link>
      <pubDate>Tue, 11 Aug 2020 06:40:07 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-08-11_golang-desktop-app-with-webviewlorca-wasm-and-bazel/</guid>
      <description>&lt;p&gt;On my quest towards building a GoLang Desktop application I found some useful frameworks, &lt;a href=&#34;https://github.com/zserge/lorca&#34;&gt;Lorca&lt;/a&gt; and &lt;a href=&#34;https://github.com/webview/webview&#34;&gt;Webview&lt;/a&gt; (which I wrote about in &lt;a href=&#34;https://maori.geek.nz/golang-desktop-app-webview-vs-lorca-vs-electron-a5e6b2869391&#34;&gt;my previous post&lt;/a&gt;). These frameworks create a window which GoLang can inject HTML, CSS, and JavaScript to build the UI.&lt;/p&gt;
&lt;p&gt;But I don’t want to write JavaScript(!) and deal with all the complexities that comes with it like npm, webpack, typescript… Fortunately, I can just compile GoLang to &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/WebAssembly&#34;&gt;WebAssembly&lt;/a&gt; (WASM) and use that in place of JavaScript. WASM is a binary format that can be executed natively in &lt;a href=&#34;https://developer.mozilla.org/en-US/docs/WebAssembly&#34;&gt;most modern browsers&lt;/a&gt;. &lt;em&gt;My&lt;/em&gt; &lt;a href=&#34;https://maori.geek.nz/a-web-app-using-bazel-golang-wasm-and-proto-c020914f4341&#34;&gt;&lt;em&gt;previous post&lt;/em&gt;&lt;/a&gt; &lt;em&gt;showed how to build a WASM web-app with the Bazel.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Golang Desktop App: Webview vs. Lorca vs. Electron</title>
      <link>https://maori.geek.nz/posts/2020/2020-08-06_golang-desktop-app-webview-vs.-lorca-vs.-electron/</link>
      <pubDate>Thu, 06 Aug 2020 03:42:51 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-08-06_golang-desktop-app-webview-vs.-lorca-vs.-electron/</guid>
      <description>&lt;p&gt;I want to build a local desktop Golang app, there are a few ways to do this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://www.electronjs.org/&#34;&gt;Electron&lt;/a&gt;: bundled &lt;a href=&#34;https://nodejs.org/en/&#34;&gt;Node.js&lt;/a&gt; and the &lt;a href=&#34;https://www.chromium.org/&#34;&gt;Chromium&lt;/a&gt; browser to create a packaged local web-app. Usable with Golang frameworks like &lt;a href=&#34;https://github.com/maxence-charriere/go-app&#34;&gt;go-app&lt;/a&gt; or &lt;a href=&#34;https://github.com/asticode/go-astilectron&#34;&gt;go-astilectron&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/zserge/lorca&#34;&gt;Lorca&lt;/a&gt;: using the locally installed Chrome driving it using its d&lt;a href=&#34;https://chromedevtools.github.io/devtools-protocol/&#34;&gt;ev-tools communication protocol&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/webview/webview&#34;&gt;Webview&lt;/a&gt;: create a native window with &lt;a href=&#34;https://developer.apple.com/documentation/webkit/webview&#34;&gt;webview&lt;/a&gt; and render the app inside it using CGo bindings.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have already written about &lt;a href=&#34;https://maori.geek.nz/building-an-electron-app-with-bazel-d124ed550957&#34;&gt;building a simple electron app&lt;/a&gt;, so this post will go into how to build an app using Lorca and Webview, and then compare the three different options.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Building an Electron App with Bazel</title>
      <link>https://maori.geek.nz/posts/2020/2020-07-31_building-an-electron-app-with-bazel/</link>
      <pubDate>Fri, 31 Jul 2020 06:01:46 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-07-31_building-an-electron-app-with-bazel/</guid>
      <description>&lt;p&gt;I want to build a desktop app with:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://www.electronjs.org/&#34;&gt;Electron.js&lt;/a&gt;: A framework to build a desktop application using a &lt;a href=&#34;https://nodejs.org/en/&#34;&gt;Node.js&lt;/a&gt; and the &lt;a href=&#34;https://www.chromium.org/&#34;&gt;Chromium&lt;/a&gt; browser&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://bazel.build/&#34;&gt;Bazel&lt;/a&gt;: a build system to quickly build, test and run applications&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;They seem like they might go well together, so let’s see. &lt;em&gt;Note: we will be focusing on&lt;/em&gt; &lt;strong&gt;&lt;em&gt;macOS only&lt;/em&gt;&lt;/strong&gt; &lt;em&gt;for simplicity.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;All code is located at&lt;/em&gt;&lt;/strong&gt; &lt;a href=&#34;https://github.com/grahamjenson/bazel-electron&#34;&gt;&lt;strong&gt;&lt;em&gt;https://github.com/grahamjenson/bazel-electron&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id=&#34;the-electron-application&#34;&gt;The Electron Application&lt;/h4&gt;
&lt;p&gt;An electron app (in macOS) is a folder with the electron binaries (Node.js Chromium, and libraries downloaded from &lt;a href=&#34;https://github.com/electron/electron/releases&#34;&gt;https://github.com/electron/electron/releases&lt;/a&gt;) and three application files located at:
&lt;code&gt;electron/Electron.app/Contents/Resources/app/   ├── package.json   ├── main.js   └── index.html&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Longest Single Letter .com Domain Name</title>
      <link>https://maori.geek.nz/posts/2020/2020-07-22_longest-single-letter.com-domain-name/</link>
      <pubDate>Wed, 22 Jul 2020 00:19:46 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-07-22_longest-single-letter.com-domain-name/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2020/2020-07-22_longest-single-letter.com-domain-name/images/1.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;I was looking for a domain name, got bored at not finding any I liked, so started looking for other, more specific domain names. I tried &lt;code&gt;aaaaaa.com&lt;/code&gt; but this was taken, then &lt;code&gt;aaaaaaa.com&lt;/code&gt; , then &lt;code&gt;aaaaaaaa.com&lt;/code&gt; and so on. I was surprised by how many of these were registered.&lt;/p&gt;
&lt;p&gt;So I began to wonder how may &lt;code&gt;a&lt;/code&gt;’s it would take before there was a domain name that I could register. Then I expanded that to wonder about &lt;code&gt;b&lt;/code&gt; and &lt;code&gt;c&lt;/code&gt; …&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Web App Using Bazel Golang WASM and Proto</title>
      <link>https://maori.geek.nz/posts/2020/2020-04-01_web-app-using-bazel-golang-wasm-and-proto/</link>
      <pubDate>Wed, 01 Apr 2020 01:03:40 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2020/2020-04-01_web-app-using-bazel-golang-wasm-and-proto/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://destroyallsoftware.com/&#34;&gt;Gary Bernhardt&lt;/a&gt; at PyCon 2014 talked about &lt;a href=&#34;https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript&#34;&gt;“The Birth and Death of Javascript”&lt;/a&gt;. He predicted, among other things, a giant exclusion zone around San Francisco, a world altering event in 2020, and that WASM would eventually take over the web. Let’s ignore the prior two prescient predictions and focus on the third, &lt;strong&gt;WASM taking over&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;So, I want to build a simple web app by joining a bunch of new and fun technologies together:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bazel: Why people love/hate it</title>
      <link>https://maori.geek.nz/posts/2019/2019-08-05_bazel-why-people-lovehate-it/</link>
      <pubDate>Mon, 05 Aug 2019 13:04:44 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-08-05_bazel-why-people-lovehate-it/</guid>
      <description>&lt;p&gt;In Bazel you put &lt;strong&gt;files&lt;/strong&gt; into &lt;strong&gt;Rules&lt;/strong&gt; and get &lt;strong&gt;files&lt;/strong&gt; out, e.g:
&lt;code&gt;pkg_tar(   name = &amp;quot;package&amp;quot;,   extension = &amp;quot;tar.gz&amp;quot;,   srcs = [:file1, :file2]   )&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pkg_tar&lt;/code&gt; rule takes &lt;code&gt;:file1&lt;/code&gt; and &lt;code&gt;:file2&lt;/code&gt; and spits out the tarball &lt;code&gt;:package.tar.gz,&lt;/code&gt; which you can pass to another rule as input. So you input files into rules that output files into other rules, that output files into other rules&amp;hellip; until eventually you get the file you want. This is a graph that can look like:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git Log as JSON in Go</title>
      <link>https://maori.geek.nz/posts/2019/2019-07-23_git-log-as-json-in-go/</link>
      <pubDate>Tue, 23 Jul 2019 20:02:21 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-07-23_git-log-as-json-in-go/</guid>
      <description>&lt;p&gt;For reasons I wanted &lt;code&gt;git log&lt;/code&gt; to be parsed in Go and it looks like the easiest way to do that is to output it as JSON and parse into Go structs.&lt;/p&gt;
&lt;p&gt;First we need to define the format for the JSON (borrowed from &lt;a href=&#34;https://gist.github.com/varemenos/e95c2e098e657c7688fd&#34;&gt;here&lt;/a&gt;):
&lt;code&gt;var GITFORMAT string = &lt;/code&gt;&amp;ndash;pretty=format:{&lt;br&gt;
&amp;ldquo;commit&amp;rdquo;: &amp;ldquo;%H&amp;rdquo;,&lt;br&gt;
&amp;ldquo;parent&amp;rdquo;: &amp;ldquo;%P&amp;rdquo;,&lt;br&gt;
&amp;ldquo;refs&amp;rdquo;: &amp;ldquo;%D&amp;rdquo;,&lt;br&gt;
&amp;ldquo;subject&amp;rdquo;: &amp;ldquo;%s&amp;rdquo;,&lt;br&gt;
&amp;ldquo;author&amp;rdquo;: { &amp;ldquo;name&amp;rdquo;: &amp;ldquo;%aN&amp;rdquo;, &amp;ldquo;email&amp;rdquo;: &amp;ldquo;%aE&amp;rdquo;, &amp;ldquo;date&amp;rdquo;: &amp;ldquo;%ad&amp;rdquo; },&lt;br&gt;
&amp;ldquo;commiter&amp;rdquo;: { &amp;ldquo;name&amp;rdquo;: &amp;ldquo;%cN&amp;rdquo;, &amp;ldquo;email&amp;rdquo;: &amp;ldquo;%cE&amp;rdquo;, &amp;ldquo;date&amp;rdquo;: &amp;ldquo;%cd&amp;rdquo; }&lt;br&gt;
},``&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Digest a Docker Image</title>
      <link>https://maori.geek.nz/posts/2019/2019-07-11_how-to-digest-a-docker-image/</link>
      <pubDate>Thu, 11 Jul 2019 21:11:07 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-07-11_how-to-digest-a-docker-image/</guid>
      <description>How to calculate and manipulate Docker SHA Digests</description>
    </item>
    <item>
      <title>CloudFormation S3File and S3Zip Custom Resources</title>
      <link>https://maori.geek.nz/posts/2019/2019-06-21_cloudformation-s3file-and-s3zip-custom-resources/</link>
      <pubDate>Fri, 21 Jun 2019 08:26:38 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-06-21_cloudformation-s3file-and-s3zip-custom-resources/</guid>
      <description>&lt;h4 id=&#34;learnlog&#34;&gt;LearnLog&lt;/h4&gt;
&lt;h4 id=&#34;800amcleanup&#34;&gt;8:00am — CleanUp&lt;/h4&gt;
&lt;p&gt;Last time I was able to get the basics of custom resources in Fenrir working. Today I want to finish:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Uploading a S3File with custom resource.&lt;/li&gt;
&lt;li&gt;Create Custom Resource S3ZipFile which will extract the ZIP file.&lt;/li&gt;
&lt;li&gt;Also clean up some of the code.&lt;/li&gt;
&lt;li&gt;Test out multi-account deploys with custom resources.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Using the Bifrost standard to build deployers provides a framework for building deployers that can work across AWS accounts by simply creating an assumable role in an AWS account. This make onboarding new accounts super easy. CloudFormation custom resources complicates this a bit because I want to keep this simple onboarding, so I don’t want to deploy a lambda.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CloudFormation Custom Resources in Fenrir</title>
      <link>https://maori.geek.nz/posts/2019/2019-06-18_cloudformation-custom-resources-in-fenrir/</link>
      <pubDate>Tue, 18 Jun 2019 17:15:46 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-06-18_cloudformation-custom-resources-in-fenrir/</guid>
      <description>&lt;h4 id=&#34;learnlog&#34;&gt;Learnlog&lt;/h4&gt;
&lt;h4 id=&#34;950amfenrir-cloudformation&#34;&gt;9:50am — Fenrir CloudFormation&lt;/h4&gt;
&lt;p&gt;I am taking today off from learning Bazel and instead I am looking at how to build a CloudFormation static site deployer for Fenrir.&lt;/p&gt;
&lt;p&gt;Fenrir is a AWS SAM deployer that is basically &lt;code&gt;sam deploy&lt;/code&gt; but in a Step Function. I want Fenrir to be able to deploy “full-stack” applications, including front end resources which can sit in S3 as a static assets. This would make it much easier for Coinbase engineering to work with serverless, as currently they have to deploy front end code separately from the serverless API’s that power them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bazel Docker Tests</title>
      <link>https://maori.geek.nz/posts/2019/2019-06-17_bazel-docker-tests/</link>
      <pubDate>Mon, 17 Jun 2019 20:33:05 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-06-17_bazel-docker-tests/</guid>
      <description>&lt;h4 id=&#34;learnlog&#34;&gt;Learnlog&lt;/h4&gt;
&lt;h4 id=&#34;730amwhat-to-do-today&#34;&gt;7:30am — What to do today&lt;/h4&gt;
&lt;p&gt;In my previous &lt;a href=&#34;https://maori.geek.nz/bazel-docker-dependency-tree-learnlog-2e53bb3ece6c&#34;&gt;learnlog&lt;/a&gt; I built a tree of docker images able to be changed and rebuilt.&lt;/p&gt;
&lt;p&gt;What I want to try do today is write a tests on the built containers so that if they don’t meet some constraints the build will fail and their dependents won’t be built.&lt;/p&gt;
&lt;p&gt;Let’s boot up the previous days project and start reading.&lt;/p&gt;
&lt;h4 id=&#34;830amyak-shaving&#34;&gt;8:30am — Yak Shaving&lt;/h4&gt;
&lt;p&gt;Yak shaved by cleaning up some of the images by copying the build tree of the valid DockerHub images.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bazel Docker Dependency Tree: LearnLog</title>
      <link>https://maori.geek.nz/posts/2019/2019-06-15_bazel-docker-dependency-tree-learnlog/</link>
      <pubDate>Sat, 15 Jun 2019 07:29:09 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-06-15_bazel-docker-dependency-tree-learnlog/</guid>
      <description>&lt;h4 id=&#34;learnlog&#34;&gt;Learnlog&lt;/h4&gt;
&lt;h4 id=&#34;945-amwhat-i-want&#34;&gt;9:45 am — What I want&lt;/h4&gt;
&lt;p&gt;What I want to do is use Google’s build tool &lt;a href=&#34;https://bazel.build/&#34;&gt;Bazel&lt;/a&gt; to build a tree of Dockerfiles that are &lt;code&gt;FROM&lt;/code&gt; each other and use Bazels dependency engine to automatically rebuild docker containers if a container they depend on changes. This is currently a manual job at many companies, and as they grow this becomes more tedious and in need of automating.&lt;/p&gt;
&lt;p&gt;I already have Bazel installed from a previous failed spike using &lt;a href=&#34;https://github.com/bazelbuild/rules_docker&#34;&gt;https://github.com/bazelbuild/rules_docker&lt;/a&gt; which are a bit overcomplicated and difficult to use for someone who is just learning (like me).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Introducing Fenrir: How Coinbase is Scaling Serverless Applications</title>
      <link>https://maori.geek.nz/posts/2019/2019-04-11_introducing-fenrir-how-coinbase-is-scaling-serverless-applications/</link>
      <pubDate>Thu, 11 Apr 2019 13:08:59 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-04-11_introducing-fenrir-how-coinbase-is-scaling-serverless-applications/</guid>
      <description>Today we’re open sourcing Fenrir, an open source AWS SAM deployer. Learn how we’re using it to scale serverless applications at Coinbase.</description>
    </item>
    <item>
      <title>YAML Custom Tags in Ruby</title>
      <link>https://maori.geek.nz/posts/2019/2019-02-06_yaml-custom-tags-in-ruby/</link>
      <pubDate>Wed, 06 Feb 2019 11:30:10 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2019/2019-02-06_yaml-custom-tags-in-ruby/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2019/2019-02-06_yaml-custom-tags-in-ruby/images/1.jpeg#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;I wanted to parse an &lt;a href=&#34;https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md&#34;&gt;AWS SAM&lt;/a&gt; template file using Ruby. This format uses &lt;code&gt;[intrinsic](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html)&lt;/code&gt; functions which can be YAML &lt;a href=&#34;http://blogs.perl.org/users/tinita/2018/01/introduction-to-yaml-schemas-and-tags.html&#34;&gt;custom tags&lt;/a&gt;, e.g. &lt;code&gt;[!Ref](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)&lt;/code&gt; to reference a parameter or resource.&lt;/p&gt;
&lt;p&gt;How do I parse a YAML custom tag in ruby? There are two options &lt;code&gt;YAML.add_domain_type&lt;/code&gt; or &lt;code&gt;YAML.add_tag&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Domain types&lt;/strong&gt; are **** easier:
&lt;code&gt;require &amp;quot;yaml&amp;quot;``YAML.add_domain_type(&amp;quot;&amp;quot;, &amp;quot;Ref&amp;quot;) do |type, value|   value.upcase   end``out = YAML.safe_load(&amp;quot;test: !Ref value&amp;quot;)``puts out # {“test”=&amp;gt;”VALUE”}   puts out.to_yaml # test: VALUE&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hello SAM: AWS Golang Quickstart</title>
      <link>https://maori.geek.nz/posts/2018/2018-12-24_hello-sam-aws-golang-quickstart/</link>
      <pubDate>Mon, 24 Dec 2018 20:44:25 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-12-24_hello-sam-aws-golang-quickstart/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2018/2018-12-24_hello-sam-aws-golang-quickstart/images/1.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Pre-Req: Must have&lt;/em&gt; &lt;a href=&#34;https://docs.docker.com/docker-for-mac/install/&#34;&gt;&lt;em&gt;Docker for Mac installed&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wanted to play with AWS SAM to understand how it works and compare to other tech like &lt;a href=&#34;https://serverless.com/&#34;&gt;serverless&lt;/a&gt;.&lt;/p&gt;
&lt;h4 id=&#34;install-and-test-sam&#34;&gt;Install and Test SAM&lt;/h4&gt;
&lt;p&gt;Use &lt;code&gt;brew&lt;/code&gt; to install the &lt;code&gt;aws-sam-cli&lt;/code&gt;:
``brew upgrade&lt;br&gt;
brew update&lt;br&gt;
brew tap aws/tap&lt;br&gt;
brew install aws-sam-cli&lt;br&gt;
sam &amp;ndash;version&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;SAM CLI, version 0.10.0``&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Now init a &lt;a href=&#34;https://golang.org/&#34;&gt;go&lt;/a&gt; SAM project:
&lt;code&gt;cd $GOPATH/src/github.com/grahamjenson/   sam init --runtime go --name hello-sam    cd hello-sam&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This creates a folder with:
&lt;code&gt;hello-sam/   ├── Makefile                    &amp;lt;-- Make to automate build   ├── README.md                   &amp;lt;-- This instructions file   ├── hello-world                 &amp;lt;-- Source code for a lambda   │   ├── main.go                 &amp;lt;-- Lambda function code   │   └── main_test.go            &amp;lt;-- Unit tests   └── template.yaml&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS Step Functions, State Machines, Bifrost, and Building Deployers</title>
      <link>https://maori.geek.nz/posts/2018/2018-11-20_aws-step-functions-state-machines-bifrost-and-building-deployers/</link>
      <pubDate>Tue, 20 Nov 2018 11:01:01 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-11-20_aws-step-functions-state-machines-bifrost-and-building-deployers/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://docs.aws.amazon.com/step-functions/latest/dg/getting-started.html&#34;&gt;&lt;strong&gt;AWS Step Functions&lt;/strong&gt;&lt;/a&gt; are hosted state-machines defined according to the &lt;a href=&#34;https://states-language.net/spec.html&#34;&gt;Amazon States Language&lt;/a&gt;. To &lt;strong&gt;execute&lt;/strong&gt; a Step function you send it JSON data which is given to an initial state to process then pass the output to another state. States are processed until a &lt;em&gt;success&lt;/em&gt; or &lt;em&gt;failure&lt;/em&gt; state is reached.&lt;/p&gt;
&lt;p&gt;How a state processes its input and selects the next state depends on its &lt;code&gt;Type&lt;/code&gt;. For example, a &lt;code&gt;Task&lt;/code&gt; state can use a &lt;a href=&#34;https://aws.amazon.com/lambda/getting-started/&#34;&gt;Lambda function&lt;/a&gt; to process the input, and a &lt;code&gt;Choice&lt;/code&gt; state can select which state to go to next based on its input.&lt;/p&gt;</description>
    </item>
    <item>
      <title>AWS API to get EC2 Instance Prices</title>
      <link>https://maori.geek.nz/posts/2018/2018-11-03_aws-api-to-get-ec2-instance-prices/</link>
      <pubDate>Sat, 03 Nov 2018 21:46:49 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-11-03_aws-api-to-get-ec2-instance-prices/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2018/2018-11-03_aws-api-to-get-ec2-instance-prices/images/1.jpeg#layoutTextWidth&#34;&gt;
AWS provides an API for everything! This includes the &lt;a href=&#34;https://aws.amazon.com/blogs/aws/aws-price-list-api-update-new-query-and-metadata-functions/&#34;&gt;&lt;strong&gt;Pricing API&lt;/strong&gt;&lt;/a&gt; to find out how much you can spend via their other APIs. This API can be difficult to use to answer questions like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How much does an EC2 instance cost?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The difficulty comes because the API has a single endpoint &lt;code&gt;[GetProducts](https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_pricing_GetProducts.html)&lt;/code&gt; that returns all prices for every service and product. That is a ton of data that requires lots of filtering to get what you want. You can download all the EC2 price data at once from a file Amazon hosts &lt;a href=&#34;https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/index.json&#34;&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;. This file is 510Mb!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Assuming Roles in AWS with Go</title>
      <link>https://maori.geek.nz/posts/2018/2018-08-08_assuming-roles-in-aws-with-go/</link>
      <pubDate>Wed, 08 Aug 2018 14:46:19 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-08-08_assuming-roles-in-aws-with-go/</guid>
      <description>&lt;p&gt;So your organization has &lt;a href=&#34;https://engineering.coinbase.com/you-need-more-than-one-aws-account-aws-bastions-and-assume-role-23946c6dfde3&#34;&gt;many AWS accounts&lt;/a&gt;, but you have services (like monitoring, deploying, security) that require access to resources across many/all of those accounts.&lt;/p&gt;
&lt;p&gt;There are a few options for these services:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Deploy the service in each account&lt;/strong&gt;: to add an account you need to recreate the entire service with all its resources, and then maintain all of that infrastructure in perpetuity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deploy the service in one account with access keys to other accounts&lt;/strong&gt;: each account requires a user with a policy and access key that is given to the service. This can quickly get out of hand as the number of keys explode, both in maintaining the services access to them and security concerns around rolling them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Deploy the service in one account that can assume roles into other accounts&lt;/strong&gt;: the service requires a user, instance profile, or role that is trusted by roles in the other accounts. The service only needs to know the name of the role and the account ID to work.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The latter option has the least surface area to secure, requires the least amount of maintenance, and is the easiest to scale with the number of accounts. This post briefly goes over how to manage the assumed roles in a service written in Go.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GoLang- Raise Error if Unknown Field in JSON (with exceptions)</title>
      <link>https://maori.geek.nz/posts/2018/2018-07-24_golang-raise-error-if-unknown-field-in-json-with-exceptions/</link>
      <pubDate>Tue, 24 Jul 2018 14:51:44 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-07-24_golang-raise-error-if-unknown-field-in-json-with-exceptions/</guid>
      <description>&lt;p&gt;I want an Error to be raised during JSON unmarshalling if an undetected field is found. This is useful if you are trying to be extra careful, for example double checking the client has not mispeled any inputs. &lt;strong&gt;However&lt;/strong&gt; I want to exclude some fields from this that might be used elsewhere.&lt;code&gt;Model&lt;/code&gt; is the struct that we are unmarshalling. We must create a new type so that the unmarshalling function is not recursive (as explained below):
&lt;code&gt;type XModel Model&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Open Sourcing Coinbase’s Secure Deployment Pipeline</title>
      <link>https://maori.geek.nz/posts/2018/2018-05-22_open-sourcing-coinbases-secure-deployment-pipeline/</link>
      <pubDate>Tue, 22 May 2018 12:52:13 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-05-22_open-sourcing-coinbases-secure-deployment-pipeline/</guid>
      <description>&lt;p&gt;In 2017, &lt;a href=&#34;https://puppet.com/&#34;&gt;Puppet&lt;/a&gt; and &lt;a href=&#34;https://devops-research.com/&#34;&gt;DORA&lt;/a&gt; (DevOps research and assessment) published their annual &lt;a href=&#34;https://puppet.com/resources/whitepaper/state-of-devops-report&#34;&gt;State of DevOps Report&lt;/a&gt; that collates more that six years of survey data about the cultural and technical impacts of DevOps. Analyzing over 27,000 responses they found that high performing engineering organizations have:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;46x more frequent code deployments (on demand deployments)&lt;/li&gt;
&lt;li&gt;440x faster lead time from commit to deploy (less than one hour)&lt;/li&gt;
&lt;li&gt;96x faster mean time to recover from downtime (less than one hour)&lt;/li&gt;
&lt;li&gt;5x lower change failure rate (0%-15%)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That is, high performing teams:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Selecting an Editor</title>
      <link>https://maori.geek.nz/posts/2018/2018-05-15_selecting-an-editor/</link>
      <pubDate>Tue, 15 May 2018 12:09:09 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-05-15_selecting-an-editor/</guid>
      <description>&lt;p&gt;When writing blog posts I have a few requirements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Offline&lt;/strong&gt;: I travel and commute which means that I have no internet frequently which is a great time to write distraction free.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easy Publishing&lt;/strong&gt;: I moved all my blogging to medium because I spent far too much time doing things on the blog that were not writing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Syncing&lt;/strong&gt;: I like to write on my laptop, but sometimes it is more convenient on my phone, like when I am waiting for a train.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Formatting&lt;/strong&gt;: I like Markdown, Medium doesn’t use markdown. This is my biggest issue with Medium. Typically I will write a post in Markdown then manually convert it to Medium which is super annoying.Previously I have used &lt;strong&gt;Evernote&lt;/strong&gt; which is great offline and syncing, but it has a different format to both medium and markdown making which makes it difficult to publish with.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have also just used a plain text editor &lt;strong&gt;Sublime Text&lt;/strong&gt; with GFM markdown plugin, then wrote content in Notes in iOS and moved it manually to my laptop. This is a lot of manual syncing, and once completed I still have to convert it to mediums formatting.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Slowly Baking Bread with AWS Step Functions</title>
      <link>https://maori.geek.nz/posts/2018/2018-04-12_slowly-baking-bread-with-aws-step-functions/</link>
      <pubDate>Thu, 12 Apr 2018 18:28:43 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2018/2018-04-12_slowly-baking-bread-with-aws-step-functions/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2018/2018-04-12_slowly-baking-bread-with-aws-step-functions/images/1.jpeg#layoutTextWidth&#34;&gt;
AWS Bread, recipe below&lt;/p&gt;
&lt;p&gt;As developers we are pretty good at writing &lt;strong&gt;fast code&lt;/strong&gt; because we put a lot of emphasis on that skill (especially in job interviews). Where we have a little more trouble is writing &lt;strong&gt;slow code,&lt;/strong&gt; processes that don’t take milliseconds or seconds to run (e.g. a web request), but take minutes, hours, or days (e.g. data backup and migration) to complete.&lt;/p&gt;
&lt;p&gt;As a process takes longer to complete, some qualities become much more important:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Gamifying Security Culture with PwnBot</title>
      <link>https://maori.geek.nz/posts/2017/2017-12-28_gamifying-security-culture-with-pwnbot/</link>
      <pubDate>Thu, 28 Dec 2017 20:00:34 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2017/2017-12-28_gamifying-security-culture-with-pwnbot/</guid>
      <description>&lt;p&gt;Building security into your company culture is necessary but challenging. The first line of defense against most attacks are aware and vigilant people with an attitude of “see something, say something”.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2017/2017-12-28_gamifying-security-culture-with-pwnbot/images/1.jpeg#layoutTextWidth&#34;&gt;
&lt;em&gt;attr.&lt;/em&gt; &lt;a href=&#34;https://commons.wikimedia.org/wiki/File:If_you_see_something,_say_something_-_Grand_Central_Terminal_NYC_%2823185180069%29.jpg&#34;&gt;&lt;em&gt;Tony Webster&lt;/em&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Training employees on what is abnormal behavior and who to talk to when there is a potential problem can save your company from a lot of pain. For &lt;a href=&#34;https://blog.coinbase.com/on-phone-numbers-and-identity-423db8577e58&#34;&gt;example&lt;/a&gt;, alerting security when a co-worker makes an unusual request because one of their accounts has been compromised by a hacker.&lt;/p&gt;</description>
    </item>
    <item>
      <title>GitHub’s “Squash and Merge” doesn’t Squash and doesn’t Merge! Trade-offs with Merging</title>
      <link>https://maori.geek.nz/posts/2017/2017-12-26_githubs-squash-and-merge-doesnt-squash-and-doesnt-merge-tradeoffs-with-merging/</link>
      <pubDate>Tue, 26 Dec 2017 23:23:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2017/2017-12-26_githubs-squash-and-merge-doesnt-squash-and-doesnt-merge-tradeoffs-with-merging/</guid>
      <description>&lt;p&gt;At Coinbase we use a &lt;a href=&#34;https://help.github.com/articles/github-flow/&#34;&gt;GitHub-flow&lt;/a&gt;-ish workflow to collaborate on code and develop features:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a branch&lt;/li&gt;
&lt;li&gt;Create/Edit/Delete/Rename files on branch&lt;/li&gt;
&lt;li&gt;Create a Pull Request (PR) merging the branch into &lt;code&gt;master&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Get code reviewed and make requested changes&lt;/li&gt;
&lt;li&gt;Merge the PR&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;However, we are still having discussions around the final step. &lt;strong&gt;How should we merge pull requests&lt;/strong&gt;?&lt;/p&gt;
&lt;p&gt;The options are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Merge the pull request, &lt;code&gt;git merge&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Manually squash the branch with &lt;code&gt;git rebase&lt;/code&gt; or &lt;code&gt;git reset&lt;/code&gt; , force push, then merge&lt;/li&gt;
&lt;li&gt;Use the “Squash and Merge” function in GitHub, basically &lt;code&gt;git --squash merge branch&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The core differences between these methods is how much &lt;strong&gt;friction&lt;/strong&gt; it is for developers to use, and what &lt;strong&gt;historical&lt;/strong&gt; information is left behind.&lt;/p&gt;</description>
    </item>
    <item>
      <title>You need more than one AWS account: AWS bastions and assume-role</title>
      <link>https://maori.geek.nz/posts/2017/2017-10-17_you-need-more-than-one-aws-account-aws-bastions-and-assumerole/</link>
      <pubDate>Tue, 17 Oct 2017 21:21:52 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2017/2017-10-17_you-need-more-than-one-aws-account-aws-bastions-and-assumerole/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2017/2017-10-17_you-need-more-than-one-aws-account-aws-bastions-and-assumerole/images/1.jpeg#layoutTextWidth&#34;&gt;
Bastion at Castel Sant’Angelo&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You need more than one AWS account.&lt;/strong&gt; This is to isolate production resources, manage limits (especially API rate limiting), handle costs, simplify compliance and &lt;a href=&#34;https://aws.amazon.com/answers/account-management/aws-multi-account-security-strategy/&#34;&gt;security&lt;/a&gt; concerns, and restrict user access.&lt;/p&gt;
&lt;p&gt;However, managing multiple AWS accounts can be difficult. To help with this AWS has built many useful features like &lt;a href=&#34;https://aws.amazon.com/organizations/&#34;&gt;organizations&lt;/a&gt;, &lt;a href=&#34;https://aws.amazon.com/answers/account-management/aws-multi-account-billing-strategy/&#34;&gt;consolidated billing&lt;/a&gt;, &lt;a href=&#34;http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/vpc-peering.html&#34;&gt;VPC peering&lt;/a&gt;, and &lt;a href=&#34;http://docs.aws.amazon.com/IAM/latest/UserGuide/tutorial_cross-account-with-roles.html&#34;&gt;descriptive IAM policies&lt;/a&gt;. Using these features effectively to structure and connect AWS accounts, a variety of patterns have been developed. One such pattern used by Coinbase is the &lt;strong&gt;AWS Bastion&lt;/strong&gt; account.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Proof of Human</title>
      <link>https://maori.geek.nz/posts/2017/2017-09-13_proof-of-human/</link>
      <pubDate>Wed, 13 Sep 2017 14:01:24 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2017/2017-09-13_proof-of-human/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2017/2017-09-13_proof-of-human/images/1.jpeg#layoutTextWidth&#34;&gt;
I am pretty sure that I am human. I am also pretty sure that my wife, my friends, my colleagues, and other people I have met in real life are also human.&lt;/p&gt;
&lt;p&gt;I am less sure about disembodied entities on the internet, like &lt;strong&gt;you&lt;/strong&gt;. If you are human, then welcome to this post and I would like to hear what you think about it in the comments. Before you post anything though, I need you to prove to me that you are human because I don’t want to read comments posted by evil-spammy-bots.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Turtles All The Way Down: Building Simple and Powerful Ruby DSLs</title>
      <link>https://maori.geek.nz/posts/2017/2017-02-17_turtles-all-the-way-down-building-simple-and-powerful-ruby-dsls/</link>
      <pubDate>Fri, 17 Feb 2017 23:34:34 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2017/2017-02-17_turtles-all-the-way-down-building-simple-and-powerful-ruby-dsls/</guid>
      <description>&lt;p&gt;A Domain Specific Language (DSL) is a specialized way to clearly describe a problem domain. Ruby is a great language for creating DSLs because it lets developers decide how the language looks and is used. For example:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/rspec/rspec&#34;&gt;&lt;strong&gt;RSpec&lt;/strong&gt;&lt;/a&gt; for writing tests:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/thoughtbot/factory_girl&#34;&gt;&lt;strong&gt;FactoryGirl&lt;/strong&gt;&lt;/a&gt; for mocking objects:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/coinbase/geoengineer&#34;&gt;&lt;strong&gt;GeoEngineer&lt;/strong&gt;&lt;/a&gt; for defining cloud resources:&lt;/p&gt;
&lt;p&gt;This post will briefly describe how to use Ruby to create DSLs like the examples above.&lt;/p&gt;
&lt;h3 id=&#34;building-blocks&#34;&gt;Building Blocks&lt;/h3&gt;
&lt;p&gt;Ruby DSLs typically use functions that take a block given as an argument to build an instance of an domain object:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Treating Infrastructure Like Code</title>
      <link>https://maori.geek.nz/posts/2017/2017-01-10_treating-infrastructure-like-code/</link>
      <pubDate>Tue, 10 Jan 2017 14:16:18 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2017/2017-01-10_treating-infrastructure-like-code/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2017/2017-01-10_treating-infrastructure-like-code/images/1.jpeg#layoutTextWidth&#34;&gt;
Zion National Park’s amazing geology&lt;/p&gt;
&lt;p&gt;The goal of the infrastructure team at Coinbase is to provide self-service tooling to our engineers to empower them to rapidly develop, monitor, and optimize services with low risk. With this mission in mind, we are currently in the process of building a workflow for creating and managing our &lt;a href=&#34;https://en.wikipedia.org/wiki/Infrastructure_as_Code&#34;&gt;codified infrastructure resources&lt;/a&gt; that looks like:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Pull Request&lt;/strong&gt;: an engineer submits a pull request to a repository with a new codified resource they want.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Validation&lt;/strong&gt;: the new resource is automatically validated and follows our company standards for naming, tagging, and security.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan and Review&lt;/strong&gt;: a plan describing the actions needed to be taken to apply a change is presented alongside the code change to be reviewed by an infrastructure team member.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Merge then Apply&lt;/strong&gt;: if the plan is good, then the pull request can be merged and automatically applied to the cloud.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This workflow manages our codified infrastructure the same way we manage our code with &lt;a href=&#34;https://guides.github.com/introduction/flow/&#34;&gt;&lt;em&gt;GitHub flow&lt;/em&gt;&lt;/a&gt;; i.e. open a pull request, ensure the change is valid with tests, merge the change into the master branch, then apply the changes to the necessary environments. The main idea of this workflow is to improve collaboration between the infrastructure and engineering teams. This will also speed up the development and deployment of resources, and make sure we deliver what is actually needed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Podcasts</title>
      <link>https://maori.geek.nz/posts/2016/2016-11-26_podcasts/</link>
      <pubDate>Sat, 26 Nov 2016 16:56:58 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2016/2016-11-26_podcasts/</guid>
      <description>&lt;p&gt;While running or driving I enjoy listening to podcasts as they are a great way to passively learn and keep up with various technologies and trends, as well as be entertained. This post is a list of the podcasts I enjoy (or have enjoyed) listening to.&lt;/p&gt;
&lt;h4 id=&#34;programming&#34;&gt;Programming&lt;/h4&gt;
&lt;h4 id=&#34;devchat-podcasts&#34;&gt;DevChat podcasts&lt;/h4&gt;
&lt;p&gt;&lt;a href=&#34;https://devchat.tv/ruby-rogues&#34;&gt;&lt;strong&gt;Ruby Rogues&lt;/strong&gt;&lt;/a&gt;: Ruby and programming focused panel podcast, I find the earlier episodes with the original crew were the the best and worth going back for a listen.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Keystone Metrics in DevOps: The 30 Day Project @ Coinbase</title>
      <link>https://maori.geek.nz/posts/2016/2016-10-07_keystone-metrics-in-devops-the-30-day-project-coinbase/</link>
      <pubDate>Fri, 07 Oct 2016 21:16:06 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2016/2016-10-07_keystone-metrics-in-devops-the-30-day-project-coinbase/</guid>
      <description>&lt;h4 id=&#34;alcoa-keystone&#34;&gt;Alcoa Keystone&lt;/h4&gt;
&lt;p&gt;Charles Duhigg in his book &lt;a href=&#34;http://amzn.to/2cXb0Oa&#34;&gt;Power of Habit&lt;/a&gt; discussed how &lt;a href=&#34;https://en.wikipedia.org/wiki/Paul_H._O%27Neill&#34;&gt;Paul O’Neil&lt;/a&gt;, the CEO of Alcoa (Aluminum Company of America), was able to increase his company’s value by 27 billion by focusing on a goal unrelated the main company objectives, &lt;strong&gt;no workplace injuries&lt;/strong&gt;. This is a &lt;em&gt;keystone metric (habit)&lt;/em&gt;, a broad goal for the entire company, not directly related to the company’s main goal but impactful and actionable. O’Neil chose safety as the single most important aspect because:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Self-Service DevOps @ Coinbase</title>
      <link>https://maori.geek.nz/posts/2016/2016-09-29_selfservice-devops-coinbase/</link>
      <pubDate>Thu, 29 Sep 2016 18:28:59 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2016/2016-09-29_selfservice-devops-coinbase/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2016/2016-09-29_selfservice-devops-coinbase/images/1.jpeg#layoutTextWidth&#34;&gt;
A bad way to implement a currency exchange would be to have the customer pass their order to an employee who then manually checks the customer balances, decides whether the order is valid, then writes down the order in a big order book (a la the old New York stock exchange). This method would be slow, prone to human error, not scalable, and more customers would require more employees. A better way would be to give the tools to the customer (with appropriate validations and security) to create the orders themselves, making the exchange more efficient and less expensive to run.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why are Ultrasound Machines So Expensive?</title>
      <link>https://maori.geek.nz/posts/2016/2016-02-22_why-are-ultrasound-machines-so-expensive/</link>
      <pubDate>Mon, 22 Feb 2016 23:00:06 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2016/2016-02-22_why-are-ultrasound-machines-so-expensive/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2016/2016-02-22_why-are-ultrasound-machines-so-expensive/images/1.jpeg#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;Name a technology that is more useful, more educational, more interesting, and more overpriced than a ultrasound machine. You can look inside of living things without the need for a powerful magnets or radioactivity and it is basically made from a speaker and microphone outputting to a screen.&lt;/p&gt;
&lt;p&gt;Why doesn’t every high school biology class room have an ultrasound to show how muscles work, and hearts beat? Why don’t doctors have them immediately handy like a stethoscope or thermometer? Why can I not get one just because I am interested in how my injuries are healing? Probably because &lt;a href=&#34;http://www.ncl.ac.uk/eee/about/news/item/low-cost-design-makes-ultrasound-imaging-affordable-to-the-world-copy&#34;&gt;“a £20,000 [$30,000USD] scanner is generally classed as low cost.”&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>9 Things that Recommender Systems Should Do</title>
      <link>https://maori.geek.nz/posts/2015/2015-12-21_9-things-that-recommender-systems-should-do/</link>
      <pubDate>Mon, 21 Dec 2015 21:36:52 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-12-21_9-things-that-recommender-systems-should-do/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://recommender.strands.com/&#34;&gt;Strands&lt;/a&gt; published a great vision paper about &lt;a href=&#34;http://www.aaai.org/ojs/index.php/aimagazine/article/viewFile/2360/2232&#34;&gt;&lt;strong&gt;The Big promise of recommender systems&lt;/strong&gt;&lt;/a&gt;. In this post I break down the paper into a few useful requirements; Recommender systems should:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;be easy to integrate and &lt;em&gt;easy to remove&lt;/em&gt;. Vendor lock-in is a negative so having a minimal impact on the clients system is a big plus&lt;/li&gt;
&lt;li&gt;complete with internal marketing teams. Generated recommendations will compete for space and resources with internal marketing departments as their core goals are identical. So reuse the marketing metrics and methods in recommender systems to measure and drive real business value&lt;/li&gt;
&lt;li&gt;first collect enough data to avoid the cold start problem. Don’t release the recommender systems functions till there is enough data to provide good recommendations&lt;/li&gt;
&lt;li&gt;scale to the businesses needs, number of users and number of items&lt;/li&gt;
&lt;li&gt;be a hybrid of approach as these create a robust solution that solves many problems of exclusive algorithms&lt;/li&gt;
&lt;li&gt;be a balance between algorithms and UX. Focusing entirely on algorithms or UX will not create value, it must be a mixture of both&lt;/li&gt;
&lt;li&gt;use implicit instead of explicit feedback. Explicit ratings or reviews can be manipulated, however implicit (e.g. if they actually bought or watched the item) are more difficult to manipulate and will provide better data&lt;/li&gt;
&lt;li&gt;differentiate their products as recommender systems have become commoditized. If a system if difficult to evaluate and looks similar to other systems it will fail&lt;/li&gt;
&lt;li&gt;have contextual awareness of where the recommendations are being shown. For example, recommendations on mobile are different to web and different to email&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;Check out my&lt;/em&gt; &lt;a href=&#34;https://github.com/grahamjenson/ger&#34;&gt;&lt;em&gt;Good Enough Recommender (GER)&lt;/em&gt;&lt;/a&gt; &lt;em&gt;to see how it can be used to implement the requirements in this list and check out the&lt;/em&gt; &lt;a href=&#34;https://github.com/grahamjenson/list_of_recommender_systems&#34;&gt;&lt;em&gt;List of Recommender Systems&lt;/em&gt;&lt;/a&gt; &lt;em&gt;and see how they implement these requirements&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>What We Learned Living in AirBnB’s for 6 months</title>
      <link>https://maori.geek.nz/posts/2015/2015-11-13_what-we-learned-living-in-airbnbs-for-6-months/</link>
      <pubDate>Fri, 13 Nov 2015 11:00:29 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-11-13_what-we-learned-living-in-airbnbs-for-6-months/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2015/2015-11-13_what-we-learned-living-in-airbnbs-for-6-months/images/1.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;Over the last 6 months my wife and I have been working and travelling around Europe using Brighton U.K. as a base. Before we left we looked at a few different ways of getting a roof over our head while travelling, our ideal solution would be low hassle, low responsibility, low liability, and easy to set up.&lt;/p&gt;
&lt;p&gt;The original idea was to rent an apartment in Brighton but this can be very expensive, difficult to find and organise from overseas, and requires signing contracts, putting up bonds and other legal arrangements. In addition to these problems, the local law also puts a stupid paradox in the way of any traveller renting an apartment; &lt;strong&gt;To rent a British apartment you need British bank account and to get a British bank account you need a British address.&lt;/strong&gt; From the &lt;a href=&#34;https://financialplanning.hsbc.co.uk/article/89/things-to-consider-before-you-move-to-uk?HBEU_dyn_lnk=Planning_MovingToUK_UsefulArticles_Link1&#34;&gt;HSBC site&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Version of HapiGER Recommender System</title>
      <link>https://maori.geek.nz/posts/2015/2015-10-13_new-version-of-hapiger-recommender-system/</link>
      <pubDate>Tue, 13 Oct 2015 10:24:52 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-10-13_new-version-of-hapiger-recommender-system/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2015/2015-10-13_new-version-of-hapiger-recommender-system/images/1.png#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://www.hapiger.com/&#34;&gt;HapiGER&lt;/a&gt;, the Happy (Good Enough) Recommender System, has a new version!&lt;/p&gt;
&lt;p&gt;This version:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;is &lt;strong&gt;Simpler&lt;/strong&gt;: with a smaller, better defined API&lt;/li&gt;
&lt;li&gt;is &lt;strong&gt;More Configurable&lt;/strong&gt;: can better define how to generate recommendations giving more control over quality and speed&lt;/li&gt;
&lt;li&gt;has &lt;strong&gt;Added Functionality&lt;/strong&gt;: can now generate &lt;em&gt;similar things&lt;/em&gt; recommendations to find items that are similar to other items&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Links:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;http://www.hapiger.com/&#34;&gt;HapiGER&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.npmjs.com/package/hapiger&#34;&gt;HapiGER on npm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/grahamjenson/hapiger&#34;&gt;HapiGER source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/grahamjenson/ger&#34;&gt;GER Source&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/grahamjenson/list_of_recommender_systems&#34;&gt;List of Recommender Systems&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
    </item>
    <item>
      <title>A Dodo Developer Doesn’t Want To Learn New Things</title>
      <link>https://maori.geek.nz/posts/2015/2015-10-08_dodo-developer-doesnt-want-to-learn-new-things/</link>
      <pubDate>Thu, 08 Oct 2015 13:35:22 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-10-08_dodo-developer-doesnt-want-to-learn-new-things/</guid>
      <description>&lt;p&gt;Why should you learn new things?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Because you can’t predict the future, and knowing is better than not knowing.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;What you learn doesn’t need to be applicable, you don’t have to put it on your CV, it doesn’t need to be measured and quantified, you don’t need to tell anyone.&lt;/p&gt;
&lt;p&gt;Learn anything; learn a toy, a gimmick, something too new or too old, something that is popular or something that is niche. It doesn’t matter if it is not supported, not serious or not professional. Learning is an exercise, so the worst that can happen is you get faster at learning the next time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>3 Optimisations that Improve Recommendations</title>
      <link>https://maori.geek.nz/posts/2015/2015-08-20_3-optimisations-that-improve-recommendations/</link>
      <pubDate>Thu, 20 Aug 2015 15:01:38 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-08-20_3-optimisations-that-improve-recommendations/</guid>
      <description>&lt;p&gt;In this post I will briefly describe three optimisations that &lt;a href=&#34;https://github.com/grahamjenson/ger&#34;&gt;GER (Good Enough Recommendations)&lt;/a&gt; uses to improve recommendations. These optimisations could be useful for other recommender systems as they have increased the quality of GER’s recommendations.&lt;/p&gt;
&lt;h4 id=&#34;separated-data&#34;&gt;Separated Data&lt;/h4&gt;
&lt;p&gt;The two fundamental steps in recommender systems like GER are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;find a neighbourhood of similar people&lt;/li&gt;
&lt;li&gt;recommend things that those people like&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The similarity between people can vary widely from one set of items to another. For example, my friend and I have very similar tastes in action movies, but we don’t like the same drama movies. If all the data was combined, our similarity would be very weak. However, if we separated the data based on movie genre we would be very similar in the “action” genre, and dissimilar in the “drama” genre, now I can get some good “action movie” recommendations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CoreOS: Fleet Service to Manage /etc/hosts</title>
      <link>https://maori.geek.nz/posts/2015/2015-07-11_coreos-fleet-service-to-manage-etchosts/</link>
      <pubDate>Sat, 11 Jul 2015 22:02:23 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-07-11_coreos-fleet-service-to-manage-etchosts/</guid>
      <description>&lt;p&gt;I want to run an application on my CoreOS clusters that uses hostnames to communicate between machines. This is a problem, because out of the box CoreOS machines cannot resolve hostnames of other machines in the cluster. So, I wrote a small &lt;a href=&#34;https://github.com/coreos/fleet&#34;&gt;fleet&lt;/a&gt; service that manages the /etc/hosts files on all the machines so they can correctly resolve each others hostnames. In this post I will briefly describe that service.&lt;/p&gt;
&lt;h4 id=&#34;the-hosts-service&#34;&gt;The Hosts Service&lt;/h4&gt;
&lt;p&gt;The hosts.service:
&lt;code&gt;# hosts.service   [Unit]   Description=Hosts Manager   After=etcd2.service``[Service]   EnvironmentFile=/etc/environment   Restart=always``ExecStartPre=-/usr/bin/etcdctl mkdir /hosts``ExecStart=/bin/sh -c &#39;while true; do etcdctl watch --recursive /hosts; \   sleep 1;\   echo &amp;quot;127.0.0.1 localhost&amp;quot; &amp;gt; /etc/hosts; \   for i in $(etcdctl ls /hosts); do \   echo $(etcdctl get $i) $(echo $i | cut -c 8-); \   done &amp;gt;&amp;gt; /etc/hosts; \   done&#39;``ExecStartPost=/usr/bin/etcdctl set /hosts/%H $PRIVATEIP   ExecStopPost=/usr/bin/etcdctl rm /hosts/%H``[X-Fleet]   Global=true&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Testing Microservices with pmux and TravisCI</title>
      <link>https://maori.geek.nz/posts/2015/2015-06-09_testing-microservices-with-pmux-and-travisci/</link>
      <pubDate>Tue, 09 Jun 2015 14:44:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-06-09_testing-microservices-with-pmux-and-travisci/</guid>
      <description>&lt;p&gt;Separating an application into many small independently developed and deployed &lt;strong&gt;microservices&lt;/strong&gt; that communicate over a thin layer (like http) has many benefits (see &lt;a href=&#34;http://martinfowler.com/articles/microservices.html&#34;&gt;Fowler’s article&lt;/a&gt;). However, one of the main drawbacks of this architecture is the difficulty automating &lt;strong&gt;end-to-end&lt;/strong&gt; tests for the application.&lt;/p&gt;
&lt;p&gt;Newman’s &lt;a href=&#34;http://www.amazon.com/gp/product/1491950358/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=1491950358&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&amp;amp;amp;linkId=F4GKBWUK22ZTVWB6&#34;&gt;Building Microservices&lt;/a&gt; asks two questions when end-to-end testing a microservices application:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Which versions of the services should we test?&lt;/li&gt;
&lt;li&gt;Where are the tests written, to not to duplicate the effort for each service?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;His solution is to have an external end-to-end test suite that can be run against many configurations of microservice versions. In this post, I present an implementation of Newman’s end-to-end microservices testing solution that uses the tool &lt;a href=&#34;https://github.com/LoyaltyNZ/pmux&#34;&gt;pmux&lt;/a&gt; and the continuous integration service &lt;a href=&#34;https://travis-ci.org&#34;&gt;TravisCI&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Dysfunctional Fear of Code</title>
      <link>https://maori.geek.nz/posts/2015/2015-06-03_dysfunctional-fear-of-code/</link>
      <pubDate>Wed, 03 Jun 2015 13:59:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-06-03_dysfunctional-fear-of-code/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2015/2015-06-03_dysfunctional-fear-of-code/images/1.jpeg#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I want you to think how deeply dysfunctional it is for you to be afraid of what you created — &lt;strong&gt;Uncle Bob Martin&lt;/strong&gt; &lt;a href=&#34;https://www.youtube.com/watch?v=WpkDN78P884&#34;&gt;Architecture the Lost Years&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;When I sit down to some code that I haven’t touched in a while, I hesitate. This is weird; I wrote it, I created it, so why am I afraid of changing it? Because, the code works &lt;em&gt;now&lt;/em&gt; and if I change something it might break.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Embeeded Javascript on the Tessel; Building a Modular Security Camera</title>
      <link>https://maori.geek.nz/posts/2015/2015-04-29_embeeded-javascript-on-the-tessel-building-a-modular-security-camera/</link>
      <pubDate>Wed, 29 Apr 2015 12:22:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-04-29_embeeded-javascript-on-the-tessel-building-a-modular-security-camera/</guid>
      <description>&lt;p&gt;I previously wrote an introduction to the &lt;a href=&#34;https://tessel.io/&#34;&gt;Tessel&lt;/a&gt; &lt;a href=&#34;http://www.maori.geek.nz/post/testing_out_the_tessel_with_project_1_twitter_to_morse_code&#34;&gt;here&lt;/a&gt; where I described a program that blinked out tweets in morse code. For my second project with the Tessel I wanted to use some of the modules that came with it to create a basic security device/camera to take pictures and alert me when something bad is happening.&lt;/p&gt;
&lt;h3 id=&#34;modules&#34;&gt;Modules&lt;/h3&gt;
&lt;p&gt;The Tessel has 4 different ports to plug modules into, each labeled A, B, C and D. The four modules I decided to use for this project were:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Embedded Javascript on the Tessel; Twitter to Morse Code</title>
      <link>https://maori.geek.nz/posts/2015/2015-03-21_embedded-javascript-on-the-tessel-twitter-to-morse-code/</link>
      <pubDate>Sat, 21 Mar 2015 20:15:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-03-21_embedded-javascript-on-the-tessel-twitter-to-morse-code/</guid>
      <description>&lt;p&gt;I borrowed a &lt;a href=&#34;https://tessel.io/&#34;&gt;Tessel&lt;/a&gt; from a friend &lt;a href=&#34;https://twitter.com/leighghunt&#34;&gt;@leighghunt&lt;/a&gt; to play with some embedded node.js. My first project is to listen to a twitter stream and blink it out as &lt;a href=&#34;http://en.wikipedia.org/wiki/Morse_code&#34;&gt;Morse code&lt;/a&gt; on the Tessel’s LEDs.&lt;/p&gt;
&lt;h3 id=&#34;getting-started&#34;&gt;Getting Started&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;npm install -g tessel&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Initialising the project:
&lt;code&gt;npm init&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I like CoffeeScript, so to test the Tessel out I adapted the demo code from &lt;a href=&#34;http://start.tessel.io/blinky&#34;&gt;here&lt;/a&gt; to a file called twitter_morse_code.coffee:
&lt;code&gt;tessel = require(&#39;tessel&#39;)``led1 = tessel.led[0].output(1)   led2 = tessel.led[1].output(0)``setInterval( -&amp;gt;   console.log(&amp;quot;I&#39;m blinking! (Press CTRL + C to stop)&amp;quot;)   led1.toggle()   led2.toggle()   , 100)&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>List of Recommender Systems</title>
      <link>https://maori.geek.nz/posts/2015/2015-03-16_list-of-recommender-systems/</link>
      <pubDate>Mon, 16 Mar 2015 07:52:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-03-16_list-of-recommender-systems/</guid>
      <description>&lt;p&gt;&lt;strong&gt;NOTE: I am also maintaining this&lt;/strong&gt; &lt;a href=&#34;https://github.com/grahamjenson/list_of_recommender_systems&#34;&gt;&lt;strong&gt;post on github&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt;. This way I can accept pull requests for changes and additions :)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Recommender systems (or recommendation engines) are useful and interesting pieces of software. I wanted to compare other recommender systems to mine (&lt;a href=&#34;http://www.hapiger.com/&#34;&gt;HapiGER&lt;/a&gt;) but couldn’t find a decent list of them, so I decided to create one. In this post I will list the recommender systems that I have come across with links and some basic information about them. &lt;em&gt;I intend on keeping this list up-to-date, so comment below if I am missing one or tweet me @grahamjenson.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Boot 2 Docker: How to set up Postgres, Elasticsearch and Redis on Mac OS X</title>
      <link>https://maori.geek.nz/posts/2015/2015-02-14_boot-2-docker-how-to-set-up-postgres-elasticsearch-and-redis-on-mac-os-x/</link>
      <pubDate>Sat, 14 Feb 2015 06:27:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-02-14_boot-2-docker-how-to-set-up-postgres-elasticsearch-and-redis-on-mac-os-x/</guid>
      <description>&lt;p&gt;In my &lt;a href=&#34;http://www.maori.geek.nz/post/vagrant_with_docker_how_to_set_up_postgres_elasticsearch_and_redis_on_mac_os_x&#34;&gt;previous post&lt;/a&gt; about using &lt;a href=&#34;http://www.vagrantup.com/&#34;&gt;Vagrant&lt;/a&gt; to run &lt;a href=&#34;http://www.docker.com/&#34;&gt;Docker&lt;/a&gt; containers, I recommended not to use &lt;a href=&#34;http://boot2docker.io/&#34;&gt;Boot2Docker&lt;/a&gt;. Since then my issues with Boot2Docker have been resolved and now it is my preferred way to use Docker in OSX.&lt;/p&gt;
&lt;p&gt;Here is a quick tutorial on how to set up &lt;a href=&#34;http://www.postgresql.org/&#34;&gt;Postgres&lt;/a&gt;, &lt;a href=&#34;http://www.elasticsearch.org/&#34;&gt;Elasticsearch&lt;/a&gt;, and &lt;a href=&#34;http://redis.io/&#34;&gt;Redis&lt;/a&gt; as Docker containers using Boot2Docker on Mac OS X.&lt;/p&gt;
&lt;h3 id=&#34;boot2docker-for-osx&#34;&gt;Boot2Docker for OSX&lt;/h3&gt;
&lt;p&gt;If you are using OSX and want to use Docker, then &lt;a href=&#34;http://boot2docker.io/&#34;&gt;Boot2Docker&lt;/a&gt; is the recommended tool. It works by using a virtual machine to host Docker and letting the OSX command line ‘remotely’ call it with the docker command.&lt;/p&gt;</description>
    </item>
    <item>
      <title>HapiGER: Recommendations Made Easy</title>
      <link>https://maori.geek.nz/posts/2015/2015-02-07_hapiger-recommendations-made-easy/</link>
      <pubDate>Sat, 07 Feb 2015 01:01:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-02-07_hapiger-recommendations-made-easy/</guid>
      <description>&lt;p&gt;I am proud to announce the beta version of &lt;a href=&#34;http://www.hapiger.com&#34;&gt;HapiGER&lt;/a&gt; an open-source, easy to use, easy to integrate recommendations engine. It is built using the &lt;a href=&#34;https://github.com/grahamjenson/ger&#34;&gt;Good Enough Recommendations (GER)&lt;/a&gt; engine and the &lt;a href=&#34;http://hapijs.com&#34;&gt;Hapi.js&lt;/a&gt; framework.&lt;/p&gt;
&lt;p&gt;In this post I will describe how you can use HapiGER to generate recommendations for your users.&lt;/p&gt;
&lt;h4 id=&#34;install-hapiger&#34;&gt;Install HapiGER&lt;/h4&gt;
&lt;p&gt;Install with npm
&lt;code&gt;npm install -g hapiger&lt;/code&gt;&lt;/p&gt;
&lt;h4 id=&#34;start-hapiger&#34;&gt;Start HapiGER&lt;/h4&gt;
&lt;p&gt;By default it will start with an in-memory event store (events are not persisted)
&lt;code&gt;hapiger&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>accepts_nested_attributes_for is Creating New Records; Gotcha!</title>
      <link>https://maori.geek.nz/posts/2015/2015-01-29_acceptsnestedattributesfor-is-creating-new-records-gotcha/</link>
      <pubDate>Thu, 29 Jan 2015 00:08:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-01-29_acceptsnestedattributesfor-is-creating-new-records-gotcha/</guid>
      <description>&lt;p&gt;accepts_nested_attributes_for is a really powerful method in Rails because it allows a model to alter related models through itself. However, it has a pretty big &lt;em&gt;gotcha&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;An example using accepts_nested_attributes_for is where a user model which belongs_to an alias model, i.e.
&lt;code&gt;#user.rb   class User &amp;lt; ActiveRecord::Base   end``#alias.rb   class Alias &amp;lt; ActiveRecord::Base   belongs_to :user   accepts_nested_attributes_for :user   end&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This allows the Alias model to change the user by passing a hash key user_attributes i.e.
`Alias.first.user.name&lt;/p&gt;</description>
    </item>
    <item>
      <title>Scalable Architecture DR CoN: Docker, Registrator, Consul, Consul Template and Nginx</title>
      <link>https://maori.geek.nz/posts/2015/2015-01-21_scalable-architecture-dr-con-docker-registrator-consul-consul-template-and-nginx/</link>
      <pubDate>Wed, 21 Jan 2015 06:53:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-01-21_scalable-architecture-dr-con-docker-registrator-consul-consul-template-and-nginx/</guid>
      <description>&lt;p&gt;Docker is great fun when you start building things by plugging useful containers together. Recently I have been playing with &lt;a href=&#34;https://www.consul.io/&#34;&gt;Consul&lt;/a&gt; and trying to plug things together to make a truly horizontally scalable web application architecture. Consul is a &lt;strong&gt;Service Discovery and Configuration&lt;/strong&gt; application, made by &lt;a href=&#34;https://hashicorp.com/&#34;&gt;HashiCorp&lt;/a&gt; the people who brought us &lt;a href=&#34;http://www.maori.geek.nz/post/vagrant_with_docker_how_to_set_up_postgres_elasticsearch_and_redis_on_mac_os_x&#34;&gt;Vagrant&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Previously I experimented using Consul by using SRV records (&lt;a href=&#34;http://www.maori.geek.nz/post/docker_web_services_with_consul&#34;&gt;described here&lt;/a&gt;) to create a scalable architecture, but I found this approach a little complicated, and I am all about simple. Then I found &lt;a href=&#34;https://hashicorp.com/blog/introducing-consul-template.html&#34;&gt;Consul Template&lt;/a&gt; which links to Consul to update configurations and restart application when services come up or go down.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Big-Data: Quantity has a Quality All Its Own</title>
      <link>https://maori.geek.nz/posts/2015/2015-01-20_bigdata-quantity-has-a-quality-all-its-own/</link>
      <pubDate>Tue, 20 Jan 2015 03:02:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2015/2015-01-20_bigdata-quantity-has-a-quality-all-its-own/</guid>
      <description>&lt;p&gt;I am not sure where the boundary between &lt;strong&gt;Data&lt;/strong&gt; and &lt;strong&gt;Big Data&lt;/strong&gt; exists, but I must be getting close. As the amount of data I deal with grows, my tools and processes have had to significantly adapt to many new challenges. This caused me to start to think about the qualities of working with &lt;strong&gt;Big Data&lt;/strong&gt; as compared to physical laws.&lt;/p&gt;
&lt;p&gt;In this post I will explore the challenges of working with &lt;strong&gt;Big Data&lt;/strong&gt; using some analogies with &lt;strong&gt;scale&lt;/strong&gt;, &lt;strong&gt;malleability&lt;/strong&gt; and &lt;strong&gt;gravity&lt;/strong&gt;. &lt;em&gt;As with all analogies, these are not exact and just exploring a different way of thinking about a problem&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Yeah, Nah: Movie Recommender Service</title>
      <link>https://maori.geek.nz/posts/2014/2014-12-15_yeah-nah-movie-recommender-service/</link>
      <pubDate>Mon, 15 Dec 2014 07:17:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-12-15_yeah-nah-movie-recommender-service/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Yeah, Nah: New Zealand slang for yes, or possibly no &lt;a href=&#34;http://www.sayyeahnah.org.nz/&#34;&gt;e.g.&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href=&#34;http://yeahnah.maori.geek.nz/&#34;&gt;&lt;strong&gt;Yeah, Nah&lt;/strong&gt;&lt;/a&gt; is a movie recommendation application built with the &lt;a href=&#34;https://github.com/grahamjenson/ger&#34;&gt;Good Enough Recommendation engine (GER)&lt;/a&gt;, using &lt;a href=&#34;https://www.themoviedb.org/documentation/api&#34;&gt;themoviedb.org’s API&lt;/a&gt; for movie information, &lt;a href=&#34;http://hapijs.com/&#34;&gt;Hapi.js&lt;/a&gt; as its web framework, and &lt;a href=&#34;https://angularjs.org/&#34;&gt;Angular.js&lt;/a&gt; for front end code.&lt;/p&gt;
&lt;p&gt;Source &lt;a href=&#34;https://github.com/grahamjenson/yeahnah&#34;&gt;here&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>GER’s Anatomy: How to Generate Good Enough Recommendations</title>
      <link>https://maori.geek.nz/posts/2014/2014-12-03_gers-anatomy-how-to-generate-good-enough-recommendations/</link>
      <pubDate>Wed, 03 Dec 2014 20:20:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-12-03_gers-anatomy-how-to-generate-good-enough-recommendations/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/grahamjenson/ger&#34;&gt;&lt;strong&gt;GER&lt;/strong&gt; (Good Enough Recommendations)&lt;/a&gt; is a recommendations engine that could directly add value and increase user engagement for many existing applications. GER is an open source &lt;a href=&#34;http://npmjs.org/package/ger&#34;&gt;npm module&lt;/a&gt; that you could download and start using &lt;strong&gt;right now&lt;/strong&gt;. However, you probably want to know how GER works and how to use it to get good recommendations out of it.&lt;/p&gt;
&lt;p&gt;In this post I describe GER’s core model, its practical features and its limitations to help you use GER to get good enough recommendations.&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Search Box is a Single Question Survey; “What Do You Want?”</title>
      <link>https://maori.geek.nz/posts/2014/2014-11-10_search-box-is-a-single-question-survey-what-do-you-want/</link>
      <pubDate>Mon, 10 Nov 2014 18:56:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-11-10_search-box-is-a-single-question-survey-what-do-you-want/</guid>
      <description>&lt;p&gt;Search boxes are &lt;em&gt;useful&lt;/em&gt; so they are &lt;strong&gt;everywhere&lt;/strong&gt;! Yet they are treated with disdain, as secondary class elements, hidden away in the corners and pushed to the side of other &lt;em&gt;‘more important’&lt;/em&gt; content. Only put there as a last resort for frustrated users who cannot navigate to their destination. As if to try and make users feel like they failed when they have to use the search box.&lt;/p&gt;
&lt;p&gt;If you treat it your search box this badly it will never provide you its full potential value. The search box gives your users a way to tell you, &lt;strong&gt;in their own words&lt;/strong&gt;, what they want and what they &lt;strong&gt;expect you to have&lt;/strong&gt;. You do not need to guess these things, just read what they typed &lt;strong&gt;no further analysis required&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Testing Javascript with Mocha, Chai, and Sinon</title>
      <link>https://maori.geek.nz/posts/2014/2014-10-30_testing-javascript-with-mocha-chai-and-sinon/</link>
      <pubDate>Thu, 30 Oct 2014 06:54:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-10-30_testing-javascript-with-mocha-chai-and-sinon/</guid>
      <description>&lt;p&gt;These are some of the tools I use to test my Node.js code:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;http://mochajs.org/&#34;&gt;&lt;strong&gt;Mocha&lt;/strong&gt;&lt;/a&gt; is a testing framework for describing and running tests&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://chaijs.com/&#34;&gt;&lt;strong&gt;Chai&lt;/strong&gt;&lt;/a&gt; is an assertion library&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://sinonjs.org/&#34;&gt;&lt;strong&gt;Sinon&lt;/strong&gt;&lt;/a&gt; is a mocking and stubbing library&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In this post I will give a brief introduction to each of these, with some basic examples and tips.&lt;/p&gt;
&lt;h3 id=&#34;mocha&#34;&gt;Mocha&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;http://mochajs.org/&#34;&gt;Mocha.js&lt;/a&gt; is a test running framework. Install Mocha with npm install -g mocha. Run mocha to execute all the javascript test files in the test directory.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Docker Web Services with Consul</title>
      <link>https://maori.geek.nz/posts/2014/2014-09-29_docker-web-services-with-consul/</link>
      <pubDate>Mon, 29 Sep 2014 03:26:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-09-29_docker-web-services-with-consul/</guid>
      <description>&lt;p&gt;Do you need a solution to scale your web services both vertically and horizontally, with load balancing and health checking? &lt;a href=&#34;http://www.consul.io/&#34;&gt;Consul&lt;/a&gt; with &lt;a href=&#34;https://www.docker.com/&#34;&gt;Docker&lt;/a&gt; and &lt;a href=&#34;http://nginx.org/&#34;&gt;Nginx&lt;/a&gt; can help!&lt;/p&gt;
&lt;p&gt;In this post I will describe how to use &lt;a href=&#34;http://www.consul.io/&#34;&gt;Consul&lt;/a&gt; (a service registry) and &lt;a href=&#34;http://nginx.org/&#34;&gt;Nginx&lt;/a&gt; (with &lt;a href=&#34;https://github.com/vlipco/srv-router&#34;&gt;srv-router&lt;/a&gt;) running in &lt;a href=&#34;https://www.docker.com/&#34;&gt;Docker&lt;/a&gt; containers to load balance across multiple services.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: For OSX users&lt;/em&gt; &lt;a href=&#34;http://boot2docker.io/&#34;&gt;&lt;em&gt;boot2docker&lt;/em&gt;&lt;/a&gt; &lt;em&gt;is required&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;consul&#34;&gt;Consul&lt;/h3&gt;
&lt;p&gt;Consul is a service registry that uses the DNS protocol to return a list of healthy services, in a random order (for load balancing).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Replacing an Attribute with a One-to-Many Relationship in Rails</title>
      <link>https://maori.geek.nz/posts/2014/2014-09-24_replacing-an-attribute-with-a-onetomany-relationship-in-rails/</link>
      <pubDate>Wed, 24 Sep 2014 01:43:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-09-24_replacing-an-attribute-with-a-onetomany-relationship-in-rails/</guid>
      <description>&lt;p&gt;A common change to make to a Rails application is to extract an attribute from a model into a one-to-many relationship. This change can be made without causing a large amount of downtime, even if there a significant amount of records needing to be changed.&lt;/p&gt;
&lt;p&gt;In this post, I will describe how to change a model to replace an attribute with a one-to-many relationship while minimising downtime and emphasising continuous deployment.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Smallest Docker Web Service That Could</title>
      <link>https://maori.geek.nz/posts/2014/2014-09-08_smallest-docker-web-service-that-could/</link>
      <pubDate>Mon, 08 Sep 2014 06:57:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-09-08_smallest-docker-web-service-that-could/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://www.docker.com/&#34;&gt;Docker&lt;/a&gt; is a great tool to test out new application architectures. To make sure that my architectures routed the right calls to the right places, I needed to have a simple containerised web service that just logged when it was called.&lt;/p&gt;
&lt;p&gt;In this post, I am going to describe how to create a simple web service with Docker and Python, it is even small enough to fit in a &lt;a href=&#34;https://twitter.com/GrahamJenson/status/508428481454034944&#34;&gt;tweet&lt;/a&gt;. This post will be brief.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Streaming directly into Postgres with Hapi.js and pg-copy-stream</title>
      <link>https://maori.geek.nz/posts/2014/2014-08-28_streaming-directly-into-postgres-with-hapi.js-and-pgcopystream/</link>
      <pubDate>Thu, 28 Aug 2014 07:07:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-08-28_streaming-directly-into-postgres-with-hapi.js-and-pgcopystream/</guid>
      <description>&lt;p&gt;When implementing the &lt;a href=&#34;http://maori.geek.nz/post/good_enough_recomendations_with_ger&#34;&gt;Good Enough Recommendations&lt;/a&gt; (GER) engine, a core requirement was to let users insert large amounts of data quickly in order to bootstrap the recommendations engine. Additionally, this bootstrapping should be available over HTTP, as this will become the primary channel for interaction with GER.&lt;/p&gt;
&lt;p&gt;PostGres (which GER uses) has the &lt;a href=&#34;http://www.postgresql.org/docs/9.3/static/sql-copy.html&#34;&gt;COPY&lt;/a&gt; command that is &lt;em&gt;“optimised for loading large numbers of rows”&lt;/em&gt; in various formats, and npm has the package &lt;a href=&#34;https://www.npmjs.org/package/pg-copy-streams&#34;&gt;pg-copy-streams&lt;/a&gt; that pass Node.js streams to COPY. This would work well with the &lt;a href=&#34;http://hapijs.com/&#34;&gt;Hapi.js&lt;/a&gt; web application framework which can turn an uploaded file into a Node.js stream without having to hold the entire file in memory or create a temporary file on disk.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Postgres Upsert (Update or Insert) in GER using Knex.js</title>
      <link>https://maori.geek.nz/posts/2014/2014-08-04_postgres-upsert-update-or-insert-in-ger-using-knex.js/</link>
      <pubDate>Mon, 04 Aug 2014 10:40:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-08-04_postgres-upsert-update-or-insert-in-ger-using-knex.js/</guid>
      <description>&lt;p&gt;While developing the &lt;strong&gt;G&lt;/strong&gt;ood &lt;strong&gt;E&lt;/strong&gt;nough &lt;strong&gt;R&lt;/strong&gt;ecommendations (&lt;a href=&#34;http://maori.geek.nz/post/good_enough_recomendations_with_ger&#34;&gt;GER&lt;/a&gt;) engine, I needed to &lt;a href=&#34;http://en.wikipedia.org/wiki/Merge_%28SQL%29&#34;&gt;&lt;strong&gt;Upsert&lt;/strong&gt;&lt;/a&gt; a record in Postgres. Upsert is a function that updates a record if it exists, or inserts the record if it doesn’t. However, Postgres doesn’t come with upsert out-of-the-box, so I had to find out how best to implement it.&lt;/p&gt;
&lt;p&gt;In this post, I will describe two methods to upsert records in Postgres, multi-query and single-statement. Then I will describe how I compared them to select a method for GER to use.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Good Enough Recommendations with GER</title>
      <link>https://maori.geek.nz/posts/2014/2014-07-25_good-enough-recommendations-with-ger/</link>
      <pubDate>Fri, 25 Jul 2014 09:01:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-07-25_good-enough-recommendations-with-ger/</guid>
      <description>&lt;p&gt;Recommendation engines could be beneficial for many applications as they can directly add value and lead to greater engagement for users. However, there is significant overhead in implementing a custom solution and many off-the-shelf engines have &lt;a href=&#34;http://easyrec.sourceforge.net/wiki/index.php?title=REST_API_v0.98#view&#34;&gt;overcomplicated APIs&lt;/a&gt;, or try to be &lt;a href=&#34;https://mahout.apache.org/&#34;&gt;infinitely scalable&lt;/a&gt; which is not needed by most applications.&lt;/p&gt;
&lt;p&gt;In this post I introduce the &lt;a href=&#34;https://github.com/grahamjenson/ger&#34;&gt;&lt;strong&gt;G&lt;/strong&gt;ood &lt;strong&gt;E&lt;/strong&gt;nough &lt;strong&gt;R&lt;/strong&gt;ecommendation (&lt;strong&gt;GER&lt;/strong&gt;)&lt;/a&gt; engine. GER (pronounced like &lt;a href=&#34;https://www.youtube.com/watch?v=Cw00jTxHlMk&amp;amp;amp;t=53s&#34;&gt;this&lt;/a&gt;) is built to be easily usable through a simple API, as well as being reasonably fast and scalable, to let developers focus on their applications and not a recommendation engine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Waterfall to Agile: An Introduction to the Waterfall, Scrum and Kanban Software Method(ologies)</title>
      <link>https://maori.geek.nz/posts/2014/2014-07-07_waterfall-to-agile-an-introduction-to-the-waterfall-scrum-and-kanban-software-methodologies/</link>
      <pubDate>Mon, 07 Jul 2014 04:11:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-07-07_waterfall-to-agile-an-introduction-to-the-waterfall-scrum-and-kanban-software-methodologies/</guid>
      <description>&lt;p&gt;There was this time, known as the bad old days, where programmers were seen as the assembly line workers and mechanics. The perception was that programmers didn’t &lt;em&gt;create&lt;/em&gt;, they were the people who merely put together and fixed software systems, systems that were really &lt;em&gt;‘created by’&lt;/em&gt; people who wrote the specifications.&lt;/p&gt;
&lt;p&gt;Giant requirements documents were dumped onto programmers desks, then they were told that most of the work had been done already and &lt;strong&gt;all&lt;/strong&gt; they had to do was put it together. Then after slaving away building a system for months or years, they would find the thing they created was not what the customer wanted, and was essentially useless and/or fundamentally flawed, e.g. &lt;a href=&#34;http://en.wikipedia.org/wiki/INCIS&#34;&gt;INCIS&lt;/a&gt; or &lt;a href=&#34;http://en.wikipedia.org/wiki/Novopay&#34;&gt;Novapay&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Vagrant with Docker: How to set up Postgres, Elasticsearch and Redis on Mac OS X</title>
      <link>https://maori.geek.nz/posts/2014/2014-07-02_vagrant-with-docker-how-to-set-up-postgres-elasticsearch-and-redis-on-mac-os-x/</link>
      <pubDate>Wed, 02 Jul 2014 00:45:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-07-02_vagrant-with-docker-how-to-set-up-postgres-elasticsearch-and-redis-on-mac-os-x/</guid>
      <description>&lt;p&gt;After some time spent looking at &lt;a href=&#34;http://www.docker.com/&#34;&gt;Docker&lt;/a&gt; from afar, hearing everyone talk about how awesome it is and how all the cool kids are &lt;a href=&#34;http://techcrunch.com/2014/06/10/google-bets-big-on-docker-with-app-engine-integration-open-source-container-management-tool/&#34;&gt;&lt;strong&gt;already&lt;/strong&gt;&lt;/a&gt; **** &lt;a href=&#34;https://speakerdeck.com/teddziuba/docker-at-ebay&#34;&gt;&lt;strong&gt;using&lt;/strong&gt;&lt;/a&gt; **** &lt;a href=&#34;http://aws.amazon.com/about-aws/whats-new/2014/04/23/aws-elastic-beanstalk-adds-docker-support/&#34;&gt;&lt;strong&gt;it&lt;/strong&gt;&lt;/a&gt;. I decided to test drive Docker out by using it in my development environment. In this post I will describe how to set up &lt;a href=&#34;http://www.postgresql.org/&#34;&gt;Postgres&lt;/a&gt;, &lt;a href=&#34;http://www.elasticsearch.org/&#34;&gt;Elasticsearch&lt;/a&gt;, and &lt;a href=&#34;http://redis.io/&#34;&gt;Redis&lt;/a&gt; as Docker containers with &lt;a href=&#34;http://www.vagrantup.com/&#34;&gt;Vagrant&lt;/a&gt; on Mac OS X.&lt;/p&gt;
&lt;h3 id=&#34;what-is-docker&#34;&gt;What is Docker?&lt;/h3&gt;
&lt;p&gt;Docker uses lightweight &lt;em&gt;containers&lt;/em&gt; to separate an application from the operating system it is running in. It puts the application in an isolated box that only exposes selected folders or ports required for that application to be used.&lt;/p&gt;</description>
    </item>
    <item>
      <title>D3.js: Tips, Tricks and Tools for Creating and Working with Maps</title>
      <link>https://maori.geek.nz/posts/2014/2014-06-22_d3.js-tips-tricks-and-tools-for-creating-and-working-with-maps/</link>
      <pubDate>Sun, 22 Jun 2014 10:25:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-06-22_d3.js-tips-tricks-and-tools-for-creating-and-working-with-maps/</guid>
      <description>&lt;p&gt;Creating maps to be used in visualisations can be a very difficult task. Although I have written about &lt;a href=&#34;http://maori.geek.nz/post/d3_js_geo_fun&#34;&gt;creating visualisations using maps&lt;/a&gt;, I have not yet written how I created those maps which can be just as important.&lt;/p&gt;
&lt;p&gt;In this post I will describe how to use a few tools (&lt;a href=&#34;https://koordinates.com/&#34;&gt;koordinates&lt;/a&gt;, &lt;a href=&#34;http://www.gdal.org/ogr2ogr.html&#34;&gt;QGIS&lt;/a&gt;, &lt;a href=&#34;http://www.gdal.org/ogr2ogr.html&#34;&gt;ogr2ogr&lt;/a&gt; and &lt;a href=&#34;https://github.com/mbostock/topojson&#34;&gt;TopoJSON&lt;/a&gt;) to generate, edit and transform maps to be used in visualisations.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: TopoJSON command line tool has implemented much of the ogr2ogr functionality described in this post. There is also a free online tool&lt;/em&gt; &lt;a href=&#34;http://www.mapshaper.org/&#34;&gt;&lt;em&gt;mapshaper&lt;/em&gt;&lt;/a&gt; &lt;em&gt;that can be used instead as well.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Marketing by being Useful: How You can be Yousful with Youtility</title>
      <link>https://maori.geek.nz/posts/2014/2014-06-15_marketing-by-being-useful-how-you-can-be-yousful-with-youtility/</link>
      <pubDate>Sun, 15 Jun 2014 08:27:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-06-15_marketing-by-being-useful-how-you-can-be-yousful-with-youtility/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2014/2014-06-15_marketing-by-being-useful-how-you-can-be-yousful-with-youtility/images/1.jpg#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;I recently picked up a copy of &lt;a href=&#34;http://www.amazon.com/gp/product/1591846668/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=1591846668&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&#34;&gt;&lt;strong&gt;Youtility: why smart marketing is about help not hype&lt;/strong&gt;&lt;/a&gt; by Jay Baer and found it interesting enough to blog about.&lt;/p&gt;
&lt;p&gt;Youtility is about how to engage your customer by being useful to them, thus gaining the limited and valuable resource — their attention. In this post I will highlight the interesting parts of the book, and also try to convey the overall themes and content.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Become a Publisher with Redis and Ruby</title>
      <link>https://maori.geek.nz/posts/2014/2014-05-06_become-a-publisher-with-redis-and-ruby/</link>
      <pubDate>Tue, 06 May 2014 09:30:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-05-06_become-a-publisher-with-redis-and-ruby/</guid>
      <description>&lt;p&gt;Lately I have been learning &lt;a href=&#34;http://redis.io/&#34;&gt;Redis&lt;/a&gt; and experimenting with the features it provides. One such feature is its &lt;a href=&#34;http://redis.io/topics/pubsub&#34;&gt;&lt;strong&gt;publisher/subscriber&lt;/strong&gt;&lt;/a&gt; functionality that allows a &lt;em&gt;publisher&lt;/em&gt; to push messages to many &lt;em&gt;subscribers&lt;/em&gt;. This functionality is deceptively easy to use and a very handy tool to know, so in this post I will describe how to use the this Redis functionality in Ruby.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: If you want to learn about Redis&lt;/em&gt; &lt;a href=&#34;http://www.amazon.com/gp/product/1617290858/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=1617290858&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&amp;amp;amp;linkId=OCCKGZ6G3K575DMS&#34;&gt;&lt;strong&gt;&lt;em&gt;Redis in Action&lt;/em&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;sending-messages&#34;&gt;Sending Messages&lt;/h3&gt;
&lt;p&gt;There are many problems that can be simplified to the &lt;a href=&#34;http://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern&#34;&gt;publish subscribe pattern&lt;/a&gt; (&lt;strong&gt;pub/sub&lt;/strong&gt;). Twitter is a great example of a massive publish and subscribe service, where someone &lt;em&gt;publishes&lt;/em&gt; or tweets a message to many &lt;em&gt;subscribers&lt;/em&gt; or followers.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Enterprise Software and Building Infinite Staircases</title>
      <link>https://maori.geek.nz/posts/2014/2014-04-23_enterprise-software-and-building-infinite-staircases/</link>
      <pubDate>Wed, 23 Apr 2014 23:29:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-04-23_enterprise-software-and-building-infinite-staircases/</guid>
      <description>&lt;p&gt;Being new to an enterprise organisation, I found that reading Martin Fowlers book &lt;a href=&#34;http://www.amazon.com/gp/product/0321127420/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=0321127420&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&#34;&gt;Patterns of Enterprise Application Architecture&lt;/a&gt; (&lt;strong&gt;PoEAA&lt;/strong&gt;) a cathartic exercise. It described the confusing and often frustrating world I found myself in, and prescribed solutions without claiming to be a panacea.&lt;/p&gt;
&lt;p&gt;Enterprise systems are difficult, and not only because they can be technically challenging. In this post I will briefly look at two problems of enterprise systems (illogical requirements and modelling objects across teams) and try to describe ways to mitigate them.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Scrolling Elasticsearch using Node.js and Promises</title>
      <link>https://maori.geek.nz/posts/2014/2014-04-14_scrolling-elasticsearch-using-node.js-and-promises/</link>
      <pubDate>Mon, 14 Apr 2014 01:28:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-04-14_scrolling-elasticsearch-using-node.js-and-promises/</guid>
      <description>&lt;p&gt;Elasticsearch is a great way to store lots of documents that need to be quickly searched and retrieved. In addition to a broad query API, Elasticsearch also provides &lt;a href=&#34;http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-request-scroll.html&#34;&gt;scrolling&lt;/a&gt; functionality that lets you query the server and incrementally download the results. This can be really useful for processing any large result set, e.g. for &lt;a href=&#34;http://euphonious-intuition.com/2012/08/reindexing-your-elasticsearch-data-with-scanscroll/&#34;&gt;reindexing&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using this scrolling, however, can be difficult because it first requires setting up then repeatedly calling the server to access the results. In order to simplify scrolling, I have implemented a package called &lt;a href=&#34;https://www.npmjs.org/package/elasticscroll&#34;&gt;ElasticScroll&lt;/a&gt; using &lt;a href=&#34;http://nodejs.org/&#34;&gt;Node.js&lt;/a&gt; with the &lt;a href=&#34;https://github.com/kriskowal/q&#34;&gt;Q&lt;/a&gt; promises library. In this post I will describe how ElasticScroll works and how to use it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>D3.js Tutorial using HTML, Scales and Chili Peppers</title>
      <link>https://maori.geek.nz/posts/2014/2014-04-07_d3.js-tutorial-using-html-scales-and-chili-peppers/</link>
      <pubDate>Mon, 07 Apr 2014 07:52:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-04-07_d3.js-tutorial-using-html-scales-and-chili-peppers/</guid>
      <description>&lt;p&gt;If you want to create visualisations for the web, the tool you will want to learn is &lt;a href=&#34;http://d3js.org/&#34;&gt;D3.js&lt;/a&gt;. It helps you build powerful visualisations that can express your data while remaining light-weight and flexible. However, D3 is one of those tools that has its own way of doing things that is a little bit different from other visualisation libraries. It has a philosophy that focuses on data and functions, and not visual elements. This may make it difficult to learn because to wrap your head around it you need an epiphany, where you just &lt;strong&gt;get how to use it&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lessons from Science on How to Test your Code</title>
      <link>https://maori.geek.nz/posts/2014/2014-03-30_lessons-from-science-on-how-to-test-your-code/</link>
      <pubDate>Sun, 30 Mar 2014 18:57:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-03-30_lessons-from-science-on-how-to-test-your-code/</guid>
      <description>&lt;p&gt;The motto for the &lt;a href=&#34;http://en.wikipedia.org/wiki/Royal_Society&#34;&gt;Royal Society&lt;/a&gt; is &lt;em&gt;Nullius in verba&lt;/em&gt;, which translates to &lt;strong&gt;Take nobody’s word for it&lt;/strong&gt;. This comes from a scientific culture of scepticism that does not care how renowned, well known, popular, or respected someone is, you should always demand evidence for &lt;strong&gt;any&lt;/strong&gt; claim put forward.&lt;/p&gt;
&lt;p&gt;I have been thinking about how scientific ideas like this are analogous in software engineering when writing tests. These days it is common to write tests to demonstrate that your code is working, no matter how good a programmer you claim to be. I think this is the software community rediscovering that they should &lt;strong&gt;Take nobody’s word for it&lt;/strong&gt;, not even your own.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Q and JQuery Promises to Compose Complex Animations</title>
      <link>https://maori.geek.nz/posts/2014/2014-03-23_using-q-and-jquery-promises-to-compose-complex-animations/</link>
      <pubDate>Sun, 23 Mar 2014 00:42:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-03-23_using-q-and-jquery-promises-to-compose-complex-animations/</guid>
      <description>&lt;p&gt;I recently created a visualisation that showed &lt;a href=&#34;http://maori.geek.nz/post/the_difference_between_rich_and_poor_schools_in_new_zealand&#34;&gt;the difference between rich and poor schools in New Zealand&lt;/a&gt;. This visualisation used a series of relatively complex animations to introduce and convey information to the viewer.&lt;/p&gt;
&lt;p&gt;In this post I will describe how I used &lt;a href=&#34;https://github.com/kriskowal/q&#34;&gt;Q&lt;/a&gt; and &lt;a href=&#34;http://maori.geek.nz/post/i_promise_this_will_be_short&#34;&gt;JQuery&lt;/a&gt; promises to compose the complex animations and give examples of how using promises can be beneficial for such a visualisation.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Note: I am going to use CoffeeScript in this post for reasons described&lt;/em&gt; &lt;a href=&#34;http://maori.geek.nz/post/why_should_you_use_coffeescript_instead_of_javascript&#34;&gt;&lt;em&gt;here&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. To learn CoffeeScript perhaps you could try&lt;/em&gt; &lt;a href=&#34;http://www.amazon.com/gp/product/1449321054/ref=as_li_qf_sp_asin_il?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=1449321054&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&#34;&gt;&lt;em&gt;The Little Book on CoffeeScript&lt;/em&gt;&lt;/a&gt;&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>When to be a Software Architect</title>
      <link>https://maori.geek.nz/posts/2014/2014-03-17_when-to-be-a-software-architect/</link>
      <pubDate>Mon, 17 Mar 2014 06:55:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-03-17_when-to-be-a-software-architect/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2014/2014-03-17_when-to-be-a-software-architect/images/1.jpg#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;Many of the constraints I have in my day-to-day job as a developer come from this mysterious world of the &lt;em&gt;software architect&lt;/em&gt;. After listening to Martin Fowler on the &lt;a href=&#34;http://rubyrogues.com/097-rr-book-club-patterns-of-enterprise-architecture-with-martin-fowler/&#34;&gt;Ruby Rogues&lt;/a&gt; podcast talk about his book &lt;a href=&#34;http://www.amazon.com/gp/product/0321127420/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=0321127420&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&#34;&gt;Patterns of Enterprise Application Architecture&lt;/a&gt; (&lt;strong&gt;PoEAA&lt;/strong&gt;), I decided to pick up a copy (i.e. I ordered it from Amazon) and read a bit more into architecture. Not understanding the domain very well, I also watched a few talks and read a few different articles trying to get a feeling for the important aspects.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Why should you use CoffeeScript instead of JavaScript?</title>
      <link>https://maori.geek.nz/posts/2014/2014-03-12_why-should-you-use-coffeescript-instead-of-javascript/</link>
      <pubDate>Wed, 12 Mar 2014 04:03:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-03-12_why-should-you-use-coffeescript-instead-of-javascript/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;image&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2014/2014-03-12_why-should-you-use-coffeescript-instead-of-javascript/images/1.jpeg#layoutTextWidth&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;http://coffeescript.org/&#34;&gt;CoffeeScript&lt;/a&gt; is currently my favourite language to write in! That is because CoffeeScript contains three things that I like in a language:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;easy function and lambda definitions&lt;/li&gt;
&lt;li&gt;syntactically significant whitespace&lt;/li&gt;
&lt;li&gt;straight forward class definitions&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;However, for all its benefits, CoffeeScript is complicated by its intertwined relationship with Javascript. This is because CoffeeScript is a language that doesn’t compile to binary or VM code, but it is &lt;a href=&#34;http://en.wikipedia.org/wiki/Source-to-source_compiler&#34;&gt;transpiled&lt;/a&gt; to Javascript. So, to understand why you should use CoffeeScript you should probably understand why you should use it &lt;strong&gt;instead&lt;/strong&gt; of Javascript.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Difference Between Rich and Poor Schools in New Zealand</title>
      <link>https://maori.geek.nz/posts/2014/2014-03-06_difference-between-rich-and-poor-schools-in-new-zealand/</link>
      <pubDate>Thu, 06 Mar 2014 10:33:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-03-06_difference-between-rich-and-poor-schools-in-new-zealand/</guid>
      <description>&lt;p&gt;In New Zealand we split our schools into 10 groups called &lt;a href=&#34;http://en.wikipedia.org/wiki/Socio-Economic_Decile&#34;&gt;&lt;strong&gt;Socio-economic Deciles&lt;/strong&gt;&lt;/a&gt; that each represent 10% of schools ranked by the relative poverty of the students family. That is, &lt;em&gt;Decile 1&lt;/em&gt; contains 10% of our schools where the poorest students attend up to &lt;em&gt;Decile 10&lt;/em&gt; that contains 10% of our schools where the wealthiest students attend.&lt;/p&gt;
&lt;p&gt;New Zealand uses this measure to target funding to more needy schools and try and ensure that compulsory education is equal for all students, some of which may not be as privileged as others.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What is Ruby? It is fun and makes you happy!</title>
      <link>https://maori.geek.nz/posts/2014/2014-03-03_what-is-ruby-it-is-fun-and-makes-you-happy/</link>
      <pubDate>Mon, 03 Mar 2014 04:23:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-03-03_what-is-ruby-it-is-fun-and-makes-you-happy/</guid>
      <description>&lt;p&gt;I have been working as a &lt;a href=&#34;http://en.wikipedia.org/wiki/Ruby_%28programming_language&#34;&gt;Ruby&lt;/a&gt; Programmer for over a year. Now I am thinking about how much I have learnt and how happy it has made me.&lt;/p&gt;
&lt;p&gt;In this post I will briefly go over the history and community of Ruby, then give a small example that I think demonstrates why Ruby is made for developer happiness. This is not a tutorial, more like an introduction to Ruby.&lt;/p&gt;
&lt;h3 id=&#34;history&#34;&gt;History&lt;/h3&gt;
&lt;p&gt;&lt;img alt=&#34;Matz!&#34; loading=&#34;lazy&#34; src=&#34;https://maori.geek.nz/posts/2014/2014-03-03_what-is-ruby-it-is-fun-and-makes-you-happy/images/1.jpg#layoutTextWidth&#34;&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Graham’s Ph.D. Thesis: A Study of Software Component System Evolution</title>
      <link>https://maori.geek.nz/posts/2014/2014-02-22_grahams-ph.d.-thesis-a-study-of-software-component-system-evolution/</link>
      <pubDate>Sat, 22 Feb 2014 06:48:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-02-22_grahams-ph.d.-thesis-a-study-of-software-component-system-evolution/</guid>
      <description>&lt;p&gt;Since I spent &lt;strong&gt;4.5 years&lt;/strong&gt; completing my Ph.D. at Massey University, I have decided &lt;strong&gt;1 year on&lt;/strong&gt; to give an overview of what I actually did.&lt;/p&gt;
&lt;p&gt;If you want my full thesis, you can download it &lt;a href=&#34;https://s3-ap-southeast-2.amazonaws.com/maorigeek/documents/GrahamJensonThesis.pdf&#34;&gt;here&lt;/a&gt;. Be warned, it is really long, really dense and an academic document. I am trying to make this post a bit more reader friendly.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;So here it goes…&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;introduction-to-components-and-evolution&#34;&gt;Introduction to Components and Evolution&lt;/h3&gt;
&lt;blockquote&gt;
&lt;p&gt;In order to agree to talk, we just have to agree we are talking about roughly the same thing. &lt;a href=&#34;http://www.amazon.com/gp/product/0465023827/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=0465023827&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&#34;&gt;&lt;em&gt;The Feynman Lectures on Physics&lt;/em&gt;&lt;/a&gt;&lt;em&gt;, Motion, Richard Feynman, 1961.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Testing promises in Node.js with Mocha, Chai and Sinon</title>
      <link>https://maori.geek.nz/posts/2014/2014-02-15_testing-promises-in-node.js-with-mocha-chai-and-sinon/</link>
      <pubDate>Sat, 15 Feb 2014 22:34:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-02-15_testing-promises-in-node.js-with-mocha-chai-and-sinon/</guid>
      <description>&lt;p&gt;To test my Rails projects I typically use &lt;a href=&#34;http://rspec.info/&#34;&gt;rspec&lt;/a&gt;. I really enjoy the way it helps me layout and describe my tests.&lt;/p&gt;
&lt;p&gt;So when I started writing my first node.js package (&lt;a href=&#34;https://www.npmjs.org/package/back-on-promise&#34;&gt;back-on-promise&lt;/a&gt;), I wanted a similar way in which to write my tests when testing promises. I decided to use &lt;a href=&#34;http://visionmedia.github.io/mocha/&#34;&gt;mocha&lt;/a&gt; for running the tests, &lt;a href=&#34;http://chaijs.com/&#34;&gt;chai&lt;/a&gt; for test assertions, and &lt;a href=&#34;http://sinonjs.org/&#34;&gt;sinon&lt;/a&gt; to mock and stub objects. In this post I will describe how to test with these tools in node.js, specifically looking at promises.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Envisioning Information with Edward R. Tufte</title>
      <link>https://maori.geek.nz/posts/2014/2014-02-07_envisioning-information-with-edward-r.-tufte/</link>
      <pubDate>Fri, 07 Feb 2014 20:09:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-02-07_envisioning-information-with-edward-r.-tufte/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.amazon.com/gp/product/0961392118/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=0961392118&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&#34;&gt;Envisioning Information&lt;/a&gt; was recommended to me by a &lt;a href=&#34;https://twitter.com/PrototypeAlex&#34;&gt;friend&lt;/a&gt; as a way to improve how I think about and design visualisations. Although less popular than his other work &lt;a href=&#34;http://www.amazon.com/gp/product/0961392142/ref=as_li_qf_sp_asin_tl?ie=UTF8&amp;amp;amp;camp=1789&amp;amp;amp;creative=9325&amp;amp;amp;creativeASIN=0961392142&amp;amp;amp;linkCode=as2&amp;amp;amp;tag=maor01-20&#34;&gt;Visual Display Quantitative Information&lt;/a&gt; (which is still on my to-read list), this book has many interesting examples and ideas on how to present complex information. Of particular interest to me, this book gives a large discussion on how cartographers design and present geographical maps. It also gives practical rules on how to design, colour and layout data in a visualisation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>JQuery Promises and Deferreds: I promise this will be short</title>
      <link>https://maori.geek.nz/posts/2014/2014-01-31_jquery-promises-and-deferreds-i-promise-this-will-be-short/</link>
      <pubDate>Fri, 31 Jan 2014 11:13:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-01-31_jquery-promises-and-deferreds-i-promise-this-will-be-short/</guid>
      <description>&lt;p&gt;I am always looking for beautiful solutions to complex problems, and recently I have been experimenting with promises to solve the ugly problem of asynchronous actions in javascript. Promises are a simple metaphor that make complex operations easy to understand. In this post I will describe what promises are, why they are beneficial, how to use them, and a project I have been working on called &lt;a href=&#34;https://npmjs.org/package/back-on-promise&#34;&gt;Back-on-Promise&lt;/a&gt; which integrates promises into &lt;a href=&#34;http://backbonejs.org/&#34;&gt;backbone.js&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>RPython: Compiling Python to C (for the speed)</title>
      <link>https://maori.geek.nz/posts/2014/2014-01-12_rpython-compiling-python-to-c-for-the-speed/</link>
      <pubDate>Sun, 12 Jan 2014 21:37:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-01-12_rpython-compiling-python-to-c-for-the-speed/</guid>
      <description>&lt;h4 id=&#34;sat-solver&#34;&gt;SAT Solver&lt;/h4&gt;
&lt;p&gt;Last night decided that I am going to write a SAT solver. But I had some conflicting requirements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I want it to be fast (SAT solvers are very resource heavy)&lt;/li&gt;
&lt;li&gt;I want it to be modular (Easily replace parts for more efficiency)&lt;/li&gt;
&lt;li&gt;I want the code to be very understandable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&#34;http://www.sat4j.org/&#34;&gt;SAT4J&lt;/a&gt; is the SAT solver I am most familiar with. It is as efficient as Java lets it be, it is very modular, and it is reasonably understandable on the surface, but the lower you get the more it is obfuscated.&lt;/p&gt;</description>
    </item>
    <item>
      <title>RPython is not a Language: An introduction to the RPython language</title>
      <link>https://maori.geek.nz/posts/2014/2014-01-12_rpython-is-not-a-language-an-introduction-to-the-rpython-language/</link>
      <pubDate>Sun, 12 Jan 2014 20:41:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-01-12_rpython-is-not-a-language-an-introduction-to-the-rpython-language/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The exact definition is “RPython is everything that our translation toolchain can accept” :)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The above quote is from the &lt;a href=&#34;http://doc.pypy.org/en/latest/coding-guide.html&#34;&gt;coding guidelines&lt;/a&gt; for RPython. RPython is not a typical language, in that it is not described by a syntax, but is defined by whether or not a tool chain can compile the code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;RPython&lt;/strong&gt; is a subset of the Python language. That is, any RPython code can run in a Python interpreter. The difference is that you can compile RPython code, with the RPython tool-chain down to C code. So the advantage of RPython is speed after compilation, and the disadvantage is that you cannot use all of Python’s features.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Deploy Mahara on Heroku</title>
      <link>https://maori.geek.nz/posts/2014/2014-01-12_how-to-deploy-mahara-on-heroku/</link>
      <pubDate>Sun, 12 Jan 2014 20:26:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-01-12_how-to-deploy-mahara-on-heroku/</guid>
      <description>&lt;p&gt;Recently, I was in need of a testing environment for &lt;a href=&#34;https://mahara.org&#34;&gt;Mahara&lt;/a&gt;’s functionality. For those that do not know, Mahara is an ePortfolio and social networking system, written in PHP, and developed right here in New Zealand.&lt;/p&gt;
&lt;p&gt;To test Mahara, I came up with three possible approaches:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;download&amp;amp;install mahara from apt-get (with all its dependencies). Then setup and configure a local environment in which I would be working, as described &lt;a href=&#34;https://wiki.mahara.org/index.php/System_Administrator%27s_Guide/Installing_Mahara/How_to_install_Mahara_in_Ubuntu&#34;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Download a virtual machine (maybe from &lt;a href=&#34;http://www.turnkeylinux.org/mahara&#34;&gt;here&lt;/a&gt;) and configure it to host Mahara.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Or&lt;/strong&gt; create and deploy Mahara to my favourite app server, Heroku.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I tried for an hour or so to install Mahara locally, however I just ended up where I always do, Apache config hell.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Drawing Maps with D3.js and Other Geographical Fun</title>
      <link>https://maori.geek.nz/posts/2014/2014-01-12_drawing-maps-with-d3.js-and-other-geographical-fun/</link>
      <pubDate>Sun, 12 Jan 2014 06:21:00 +0000</pubDate>
      <guid>https://maori.geek.nz/posts/2014/2014-01-12_drawing-maps-with-d3.js-and-other-geographical-fun/</guid>
      <description>&lt;p&gt;I recently decided to create some mapping visualisations. Mostly because using a map is an awesome way to present many data sets, and creating such visualisation is a skill I lacked.&lt;/p&gt;
&lt;p&gt;So I looked around and found that &lt;a href=&#34;http://d3js.org/&#34;&gt;&lt;strong&gt;D3.js&lt;/strong&gt;&lt;/a&gt; has geographical features.&lt;/p&gt;
&lt;p&gt;I had used D3.js in the past on projects like &lt;a href=&#34;http://100companies.co.nz/&#34;&gt;100 companies&lt;/a&gt;, so I understood how to use it and could apply that knowledge to make visualisations with maps.&lt;/p&gt;
&lt;p&gt;In this post I will go over a few examples of how to use D3’s geographical API to create visualisation with maps.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
