Notes on code, tech, startups, health and music.

New App Alpha!

Putting it out there When I wrote about the app I’ve been working on last month it was really good to step back a bit from coding and take stock enough to document and share my thoughts and progress. I wasn’t really sure what to expect in terms of feedback though. Despite having shown it quite a few folks I happened to meet in person, and had lots of positive comments, I’d not had the...

Reflections on Writing

Reflection I don’t really remember why I decided to start publishing articles on this site, but it’s been 10 months now and 20 posts later so I thought it would be interesting to reflect. My real motivation was to write up some technical notes purely for my own use. I tend to document things and take notes in BBEdit, and end up with a ramshackle bunch of un-named snippets of code, links and thoughts, and...

New App Sneak Peek

What’s New? I’ve written before about my weight loss journey last year where I lost 50kg through mostly watching what I ate and starting to exercise. The main “trick” I uncovered is simply to plan meals ahead. It sounds boring, it sounds annoying, but really its such a tiny effort for such outsized and life changing rewards that it should be a no-brainer. The existing tools I found were more focused on tracking after eating...

Spectacular Rails World

Rails World 2023 I’m just home from the inaugural Rails World conference in Amsterdam, and the word that keeps popping in my head to describe it is simply “Spectacular”. In my role at Cookpad I’ve been fortunate to be the driving force behind our sponsorship and support of over 50 Ruby and Rails events around the world in the last ~10 years, and it’s something I’m immensely proud of, but what I just experienced was...

Get Started with Strada! A First Look on iOS

Tada! I mean, Strada! If you’ve been following along, you may know I’ve been getting quite interested in Turbo Native iOS for Rails. If you haven’t been following along.. why not! Anyhow, to recap, Turbo Native enables rapid development of hybrid apps, by wrapping a Rails 7 turbo-enabled webapp in a native iOS or Android shell. It really is fantastic and exposes so much more than just a simple web browser. The big news yesterday...

Active Storage CDN with Cloudfront and Subdomain in Rails

What we will be doing This post assumes you’re using Active Storage in a Rails app and want to switch to using a CDN. I’m writing it down because I spent all day figuring this out yesterday, and couldn’t find a definitive “how-to” article anywhere! In this article we will: Switch Active Storage to “Proxy Mode” Get an SSL cert for your sub-domain if you need one. Add a Cloudfront distribution in front of your...

Password-less SwiftUI Native Auth with Turbo iOS

Overview This post continues on from my last, where we implemented Password-less Authentication in Rails, which powers the backend to the app in this post. You can get the finished Source Code on GitHub or if you prefer, follow along below from scratch. What we’ll build In this article we’ll build a Turbo Native iOS app in Swift that wraps our Password-less Authentication Rails app from Part 1, enhancing it with native Swift UI authentication...

Password-less Auth with Rails

Overview I much prefer websites and apps that offer a way to sign in without needing a password purely from a usability standpoint, but there are some great benefits for developers too, for example: automatically confirm the user’s email address no need for sign in and sign up flows no need to implement “forgot password” Based on this, for a recent project I implemented password-less authentication for the web. Since this project benefits from HealthKit...

iOS Development Diary Part 2

Recap I’ve had a lot more free time in the last few weeks so really doubled down on my iOS adventures with Swift, Rails 7 and Turbo Native! In my first article about this journey, I left off somewhere deep in a quagmire of confusion and architectural patterns MVC, MVVM, MVVM-C patterns, and to be honest, it wasn’t too fruitful. Emerging from the Rabbit Hole In the end I was looking for something that didn’t...

Commitments vs Goals

Commitments vs Goals Recently a friend shared a blog post with me that resonated so strongly I wanted to highlight it here. The article focuses on the “words” we use and how they shape behaviour. This really fits how I’ve been thinking and achieving my goals on my weight loss and health journey over the last 18 months. When we say “my goal is to lose 20 kilos” or whatever it may be, it really...

Hollywood Calling - Vampires Anonymous

Another post from a distant memory of my time as a sound engineer, tour manager and musician in the 90’s Setting the Scene Way back in 1999 I was still living in California, having moved there while working with legendary british band The Specials, and after they split I kept working with their singer and good friend Neville Staple. He wanted to keep touring and to stay in Long Beach, so had formed a band...

iOS Development Diary Part 1

How Did We Get Here? I’ve been obsessed with writing computer programs since I was 12, and been gainfully employed doing so professionally for the last 20+ years using the likes of C, PHP, Perl, Java, JSPs and Ruby. I’ve really settled on my preferred toolkit and platforms, and what I enjoy the most is building products and services for the web, bringing them to life and to global audiences. I’ve gotten pretty good at...

Learning to Fly... with Fly.io

Deploying a Rails app I’ve historically always reached for Heroku to deploy little apps and side projects when I wanted to push them out for others to see and use. When Heroku ended their “free” plan, several new platforms seemed to emerge or old alternatives gained renewed interest, such as render, hatchbox, fly, digital ocean and many others. In this post I’m going to focus on Fly.io which I’ve used a couple of times and...

Three Mics for Ray Charles

Posts in #music are from my previous career as a live and studio sound engineer in the 90’s. Feel free to skip ahead if you’re only here for the tech :) The Sun Theatre, Anaheim, CA. June 4th 1999 Way back in 1999/2000 I was the House Sound Engineer at the Sun Theatre in Anaheim California (now called “The Grove of Anaheim”). It was pretty new, launched in 1998 as what WikiPedia calls the “ill-fated”...

Turbo Native Quick Start

Rails 7 and Hotwire As I mentioned in a previous post, Rails 7 is a real inflection point in terms of capabilities out of the box, the efficiencies and frankly a joyful development experience. You truly can get the speed and interactivity of a single-page web application without having to write any JavaScript. High-fidelity hybrid apps Turbo Native is a further part of the Hotwire ecosystem that enables development of hybrid apps, by wrapping a...

Dynamic Search with Hotwire

Hotwire is an incredible framework for making rich, responsive, and snappy client experiences with the minimum of complexity. It leans on Rails standard concepts of convention over configuration and omakase to deliver a simple developer experience without any trade off to performance or capabilities. In this example I’ll describe how I added a very simple dynamic search feature to a side project I’ve been working on, with a trivial amount of code and effort. The...

The World's First Alexa Widget

With the public release of Alexa Widgets announced for developers this week, I thought it would be a good time to write a little about my experience working with the fine folks at Amazon on the world’s first third party Alexa widget that we developed and deployed at Cookpad 16 months before this public release back in December 2021. Update: Amazon published an interview I did with them about widgets on their blog Three questions...

How I lost 110 pounds (50kg) in 9 Months!

First an important caveat: I’m obviously not a doctor, so before you make any drastic changes to diet or exercise, talk to yours. It all started with the results of a health check. I was really overweight after years of sitting behind my computer every day, not exercising, eating biscuits. I learned I was “pre-diabetic” with an HbA1c of 43 mmol/mol but I could turn this around completely if I lost a lot of weight....

Couch to 700k... and Counting

I’d seen the Couch to 5k program recommended a few times while working on improving my diet, and got as far as downloading the app (iOS/ Android) more than once. It took a couple of weeks to actually try it, and I have to admit, the first week or two were gruelling. It really seemed impossible that I would ever be able to run 5k, given how I felt after the 60 second runs of...

Rails 7 - Talk about a Revolution

Love, Love Me Do I loved Rails the instant I watched DHH’s “How to build a blog in 15 minutes with Rails” around 2005. To set the scene, at the time I was working at a ringtone startup in San Francisco (remember ringtones?!). The business was doing amazingly well - our first million dollar ringtone was 50 Cent P.I.M.P. in all its polyphonic glory - and we had a small dev team delivering a pretty...

Alexa Custom OAuth Account Linking with Rails

Custom skills with Amazon Echo devices provide a great way for users to interact with your product or service by voice. This is something particularly true at Cookpad where users are cooking, so their hands are often busy or messy with ingredients. Voice provides an excellent way to interact with a recipe while cooking. Conversely, searching by voice is really not a great experience. We’re all used to searching websites and perusing lists of results,...

Enhancing Your Alexa Skill with GPT

Alexa and GPT There are a myriad of possibilities that seem to be available with the explosion of Chat GPT, and like everyone else, I wanted to see what I could do with it as soon as I got access to the API. Use Case My first idea was to try and implement a way to ask Alexa for substitutions in the currently selected recipe. This is a really useful feature and simple enough to...