RSSAmplifier

Blog

Zach Ahn

RSS feed ↗10 posts

Latest posts

Integrating Vite (Vue) with Rails

Today I extracted and released PetiteViteRails , a small library that integrates Ruby and Vite. I’ve been developing this idea for nine months now, specifically for a site that’s built on Vue and TypeScript. It’s really lightweight. I am a bit biased, but I’ve found this pretty easy to maintain. PetiteVite largely works via having a shared config (JSON), updating Vite’s config to read a few…

Improving type-safety of Rails' `belongs_to` with PolymorphicBelongsTo

I just released PolymorphicBelongsTo , a Ruby gem to safely define polymorphic belongs_to associations. It relies on Sorbet + Tapioca. Currently, without this gem, Tapioca returns T.untyped on polymorphic associations. This gem wraps belongs_to with some custom behavior, some validations, and a Tapioca compiler. It’s brand new, literally created this today, but I’m already using it in a Rails…

Sequencing background jobs

I often have to build a sequence of background jobs. For example, I’m working on a personal project where a third party, Plaid , hits a webhook, and the webhook queues a job to pull data from Plaid, then queues another job to parse and save that data. Here’s a diagram of a real example: Plaid | Notifies server when data is ready | --> Webhook | Verifies payload and queues the job | -->…

Recurse Center - Return statement

I spent six weeks at a free (and unpaid) programming retreat at the Recurse Center (RC) at the beginning of this year. I had a really good time. Before I continue, I want to point out that it felt like a special time. RC has been on my radar for many years, and I wanted to attend almost as soon as I heard about it. It’s a huge investment (and risk) to spend six weeks learning, and not working. I…

Chasing the total solar eclipse of 2024

Long story short—my wife and I decided to rent a car and drive to wherever the skies would be clear enough to see the eclipse. In addition to all the logistical headaches, I had a fortune-telling headache— where exactly should we go to optimize our chances to see the eclipse? I read Eclipsophile to get some tips and to get a rough idea of what to expect. A few days before the eclipse, I found an…

An easier quicksort

Embarrassing story—I implemented a bunch of sorting algorithms for an assignment a long time ago, but quicksort ended up being one of the slowest ones I wrote. I’m redoing that exercise now, and I’m happy to say I have a better understanding of it. But I’m writing this because I think it’s a slightly novel variation. At least, it’s not an implementation I’ve ever seen before. I doubt it’s faster,…

Automerge is Beautiful

Automerge is a library provides conflict-free replicated data types—data structures that make it convenient to sync data. The team behind it hopes to enable software that can adhere to seven ideals . To paraphrase: You should be able to have instantaneous access to your data. You should be able to work with your data when you’re offline. You should be able to sync data when you’re online. You…

Starting to build a notes app

I was recently using a note-taking app. I liked it, but I got pretty frustrated by its syncing feature—it kept on deleting and overwriting my notes as I was switching between my computer and phone! So I started wondering to myself, what’ll it take to make a something that syncs a little better? I decided to investigate Automerge , a CRDT library. I briefly considered Yjs , but disqualified it as…

Recurse Center - Midpoint

This past Monday marked the midway point of my time at the Recurse Center (RC). RC has been nice, and I’ve been learning a lot. I was going to write a lengthy post about my time here and what I’ve been learning, but I think I’ll split it up into a few posts. There’s too much for me to verify and review otherwise. This post will lean towards my experiences and thoughts. I mentioned this in my last…

Recurse Center - Day 1

Today was the first day of the Winter 2, 2024 batch at Recurse Center (RC). I was recently admitted and will be participating for six weeks—a half batch. When I was applying, I thought six weeks sounded long, but now that I’m starting, it feels a bit short and kinda wish I could be here for the full 12. Interviewing team—thank you so much for getting me through the process so quickly! I have a few…