Appreciation by doing

There’s an old saying that pretty much every one knows:

If you could just put yourself in his shoes for a moment, perhaps you would understand why it is not as easy as you seem to think.

But it’s often forgotten or not realised until it’s too late.

I don’t cook very often. In fact, when asked “can you cook?”, I often jokingly reply “I’m pretty good at making toast”. Growing up around chefs and spending years in Asia where a good meal costs less than $2 didn’t help. Also, I’m pretty lazy.

But tonight I cooked something. It doesn’t matter what it was or how it tasted but it did involve more than a toaster and took more than a minute to prepare.

It reminded me how hard cooking is. The simple act of combining several ingredients to make something tasty is really not that simple at all. Much like tech, there’s more to it than meets the eye.

When building an app, combining two services (like Instagram & Twitter) seems easy enough – but there’s an art to making it seem easy, and 100 ways to complete that same task.

Only after years of trial & error, painstaking rewrites and a deep understanding of your art – be it programming, cooking or cleaning – do you become a master.

This is more a reminder to me than anything else. Things always seem easier on the outside (and on the inside). It’s only through doing that thing that you can truly appreciate the finesse and years of experience required to do it well.

Introducing MagicPress

Introducing MagicPress

The other day I saw Aaron Rutley tweet about a tool he’d built called ValetPress:

It combined two of my favourite things – WordPress & Laravel Valet. If you’re reading my blog, you likely already know what WordPress is but may not know about Valet.

Valet is a Laravel development environment for Mac minimalists. No Vagrant, No Apache, No Nginx, No /etc/hosts file. You can even share your sites publicly using local tunnels. Yeah, we like it too.

Laravel Valet configures your Mac to always run Caddy in the background when your machine starts. Then, using DnsMasq, Valet proxies all requests on the *.dev domain to point to sites installed on your local machine.

In other words, a blazing fast Laravel development environment that uses roughly 7mb of RAM. Valet isn’t a complete replacement for Vagrant or Homestead, but provides a great alternative if you want flexible basics, prefer extreme speed, or are working on a machine with a limited amount of RAM.

It’s not for everyone, but I’ve found it to be sufficient for quickly prototyping new things and keeping my MBP’s battery alive more than a couple hours.

Aaron’s solution is awesome – he’s introduced a new command that allows you to quickly spin up new Valet powered WordPress sites using WP-CLI.

I wanted to try make the install process a little bit easier, have always wanted to build a Node CLI app and selfishly, wanted some specific commands for making WooCommerce development sites, so I got inspired and put together MagicPress.

If you’ve already got Valet and WP-CLI installed, you just need one more command to get started with MagicPress.

npm install magicpress -g

For the rest, check the docs. You may need to configure the MySQL username/password if yours isn’t rootroot. To do that, just run:

sudo mp config

At this point, you’re ready to to create new WordPress development sites! The good news? It’s almost instant:

mp new sitename is now a functioning WordPress installation with a DB and everything!

Check out the docs as things have likely changed since I wrote this, but one of my favourite optional commands is –woocommerce. Append it to the end of your mp new command and the new site will have a copy of WooCommerce installed, along with the Storefront theme.

mp new woo --woocommerce

There’s also the –dev command that I highly recommend using, which will install a bunch of useful developer-friendly plugins like Query Monitor. I hope to add some more commands and delete functionality soon, but for now, I’m interested to see if others find this as useful as I have!

PS. It’s MIT-licensed, so you can pretty much do whatever you want with it (except blame me if something breaks).:)

Photo by Thomas Kelley

The Bot Future

Screen Shot 2016-04-15 at 10.49.21 AM.png

If you’re hearing the news about Facebook’s new Messenger Platform and all you’re thinking is:

This is just hype. It’s not that big of a deal.

You’re missing the bigger picture. The future of our interaction with technology will be completed automated – and bots will play a big part in getting us there.

The significant thing about Facebook now taking part is the 900 million users they bring to the game.

I get excited thinking about the possible applications of this technology.

Customer service – no longer apprehensive to approach a company – no need for the anxiety that comes with making a complaint.

Learning a language – your own private teacher that is only a message away – can message you throughout the day to help you learn.

Discovery – the effort to find new content and stay up to date with the world will be reduced. Acquiring new information will no longer be an active but passive.

Over the last few years I’ve watched brands adjust to the trend in message-orientated customer service. A company that you once had to interact with my phone is now just a message away.

This isn’t groundbreaking. Email has been around for decades, and it was long ago that the first contact form was introduced. But there’s something special about a message.

Emails and phone calls these days tend to be reserved for work and interactions with businesses (besides for the occasional parent phone call). Messages are intimate. They provide an eternal log of our relationships and conversations – an always-available means to contact friends, not prohibited by time or location or feeling.

Businesses picked up on this. They’re now easily contactable through any social media platform. I’ve started a conversation with a business through tweets and ended up getting a DM (direct message) from them soon after. Recently my home internet cut out so I just sent the business a message through Facebook Messenger on my phone and got it resolved. Months ago, I was trying to find a shop in Melbourne that had a special variety of Thai basil needed to make my favourite Thai dish. I messaged a local Thai grocery’s Facebook page and had a bunch of the basil reserved for me just moments later.

I’m yet to find a reputable and established business that isn’t just a message away. In fact, the only exception seems to be with government organisations and traditionally terrible companies that are no better on the phone.

And yes, while it’s true that messages are more intimate and usually just for friends, I’ll gladly allow a business into that intimate space if it means my problem gets resolved quickly and asynchronously.

But phone calls can still be quicker. And when you have a serious issue, like a missed flight or internet emergency, you suck it up and make the phone call, speak to another human and get your problem fixed. It’s awkward and time-consuming and exhausting but sometimes it’s the better choice, purely because it doesn’t involve waiting for your message to be replied to.

So the fact that there is now a means for developers to automate messages – to eliminate the one thing that was keeping phone support alive – is exciting.

Good bots won’t try to be magical interpreters of user will and intent. They’ll listen, ask questions with structured answers and evolve naturally.

An example of this is the interaction here between Danny and the 1800 Flowers bot. The bot doesn’t try to be intelligent and have a conversation with Danny. It determines what he wants, gets the answers it needs by asking simple questions and uses predictable buttons to get user choices.

We’re on the brink of a bot revolution. The bot future won’t be obvious. It’ll slowly creep up on us and steadily improve every business interaction we have. But once it’s here, you won’t want to go back.

eCommerce-powered 3D printing

eCommerce-powered 3D printing

This post talks about using WooCommerce, a free and open-source ecommerce plugin for WordPress, but the same principles could be applied to any ecommerce software.

A couple short weeks ago, you allowed me to take a risk and show you several WooCommerce API powered demos live on stage at WooConf 2016.

It went well for the most part, with attendees (both in the audience and online) getting to see a variety of integrations, like sales appearing on a LaMetric display:

To an autonomous drone that took flight when a WooCommerce sale was made:

Side note: How good are David’s GIF skills?!

And while I’m relieved, to be honest, that I don’t have to prepare and perfect that talk any longer, I made a promise on stage. One of my final slides teased at the idea of WooCommerce-powered 3D printing.


I mentioned on stage that this was completely possible and that the only reason I didn’t do a live demo is that a 3D printer doesn’t really fit in carry-on.

Continue reading “eCommerce-powered 3D printing”

Code & Jazz

For me, programming is a lot like jazz, and writing a good app, program, function, is like writing a good jazz piece.

In some jazz pieces, there’ll be several instruments played simultaneously, each on their own path, each with their own tone, own focus, all taking a different approach to the same beat, same goal, eventually ending up together in the same place.

Programming seems to be the same. There are several parts of every app that get built simultaneously, be it the frontend or API, structure or architecture, each contributing in their own way – some taking the lead at times while others are there as support, eventually ending up together in the same place.

Installing a free Let’s Encrypt SSL certificate on Server Pilot

I recently needed to create a live WooCommerce site for testing the API. But I needed SSL. And up until now, a proper SSL certificate cost money. Money I didn’t want to spend for a test site. But Let’s Encrypt recently entered public beta. And you know what’s cool about Let’s Encrypt? It’s a new certificate authority that is completely free – for anybody.

I couldn’t get the automated setup to run on my Server Pilot-powered Digital Ocean droplet (get $25 free credit with that link and I get $10 – win/win), so I had to do it manually. The good news is that it’s actually pretty easy. I’ll take you through it.


Screen Shot 2016-01-07 at 4.36.20 PM

Start by SSHing into your server. You may need to first ssh with the serverpilot user and then update the password for the root user, as at least in my case I needed to use root to create the certificate. So if you have any permission issues, try the root user.

Let’s say your server’s IP is

ssh serverpilot@

You then need to download Let’s Encrypt.

sudo git clone

If you’re using the serverpilot user, Let’s Encrypt will now be in the serverpilot user’s directory – /srv/users/serverpilot/letsencrypt.

You now need to stop nginx running.

sudo service nginx-sp stop

Time to create your free certificate!

./letsencrypt-auto certonly --standalone

It’ll update itself and then ask you for the domain name(s).


Screen Shot 2016-01-07 at 4.48.23 PM

You could enter multiple domains, like if you wanted www and non-www certificates for your site, you’d enter:,

It may also ask you some other info.

A moment later and you’ll be the proud owner of some new SSL certificates! Time to start nginx again:

sudo service nginx-sp start

You now need to modify your nginx configuration to use these certificates. First go to the folder that contains them.

cd /etc/nginx-sp/vhosts.d/

You then need to create a new file for it. If your app name is mysite for example, and when running ls in that folder you see a file called mysite.conf, you’ll want to type the following:

nano mysite.ssl.conf

Add the following to that file, changing mysite to your app name.

Save it, with ctrl + o and then exit with ctrl + x.

Restart nginx:

sudo service nginx-sp restart

And you’re done! Congratulations. You just beat the system. Sort of.

The one negative is that the SSL certificates expire every 3 months. I believe you’ll just need to follow the first couple steps and create a new SSL certificate with Let’s Encrypt. That should be all though, and I’m sure there will be auto-installation soon so it’s completely automated. You could also write a script and cron job to automate renewal. If you do, please let me know and I’ll share it here.


Updated 21/03/2016 – Well, the original certificates that inspired this post were about to expire, and Let’s Encrypt kept emailing me to warn me, so I thought I better figure out how to renew them. Good news. It’s pretty easy and will take you just a moment.

Start by SSHing into your server. Go to where we installed Let’s Encrypt before, likely possibly by doing the following:

cd ~/srv/users/serverpilot/letsencrypt

You now need to stop nginx running.

sudo service nginx-sp stop

Then run through the certificate creation again. This will open up the Let’s Encrypt setup – just enter your domains like you did before.

./letsencrypt-auto certonly --standalone

Once that’s done, your certificates are valid for another 3 months.

But wait! You need to restart nginx or nothing will work.

sudo service nginx-sp start

I still haven’t bothered to try write a script to auto renew it. There should be some floating around by now, so if you’re desperate / have a lot certificates, search around and you should find something.