Tag: #tech

Deploying with Kamal

Intro I’ve been hosting 1500cals.com on fly.io as I wrote about previously, and frankly, its really great. Particularly to get a Rails app up and hosted in minutes, harkening back to the old Heroku days when it was the defacto answer for almost instant free Rails hosting. However, last year when DHH introduced Kamal my interest was piqued! He described it as A simple yet battle-tested deployment tool extracted from our cloud exit, which features...

A First Look at Solid Queue and Mission Control Jobs

Background Jobs Background jobs are something most web developers need to start reaching for whenever there’s a long running task, or something outside the scope of a typical web request. One classic example, and the one we’ll use as an example today, is sending email. Of course Rails makes it easy to send emails with ActionMailer, and you can send an email asynchronously to a user in response to them clicking a ‘forgot email’ link...

Rails - The One Person Framework

History I’ll make no bones about it. I love Ruby and I love Rails! I was lucky to see DHH’s seminal Ruby on Rails demo video How to build a blog engine in 15 minutes in 2005 while I was working at a startup in San Francisco. At the time I was leading a team building J2ME, Brew and WAP mobile ringtone apps, with the backend all implemented with Java Servlets and JSP running on...

From Idea to App Store in 2 hours!

OK, I’ll admit it, “From Idea to App Store in 2 hours” was mainly to get you to click and a riff on my friend - and Turbo Native expert - Joe Masilotti’s excellent post “Idea to App Store in 7 days”, but hear me out. This is a true story about the power of Ruby on Rails and Turbo Native apps which was made even more apparent to me this weekend! Since my little...

Looking back on 2023

2023 was a big year. I built and launched an app, continued focus on a healthy diet, kept up with running 3 times a week, started a new job, learned a lot, traveled a lot, met lots of great people, old and new friends… a great year all in all! Here are some highlights, mainly for me to reminisce and remember. 1. Maintain focus on health Having totally changed my diet in 2022 and lost...

1500cals in the iOS App Store!

1500cals is now in the iOS App Store! Quick Announcement: I’m thrilled to announce that just in time for those New Years resolutions, 1500cals passed certification with Apple first time, and is now available to all for FREE in the iOS App Store! Check it our and download it here: https://apps.apple.com/us/app/1500cals/id6470238113 I started building this just for myself to solve the annoyances I had with other calorie counting weight loss apps on my journey to...

1500cals iOS App Launched!

New iOS App Very excited to announce 1500cals for iOS is now available via Test Flight! I previously wrote about my journey to lose 50kg (110lbs) last year, the tools I used and then about the new app I was building to help plan meals and track exercise. I built this app for myself as I really wanted to use all the great features in Rails 7, Stimulus and Hotwire. The other key piece in...

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...

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...

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...

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...