Notes about writing and running software

Laptop

I use an Apple Silicon laptop. A laptop.sh script symlinks dotfiles to $HOME and sets up my text editor, programming languages, language servers, and CLIs.

Git

At work, I prefer a monorepo and a workflow with a kanban board, GitHub code review, and CI/CD.

Neovim

My text editor is Neovim in a Kitty terminal. My Leader key is mapped to Space. Leader+r runs code. Leader+t and Leader+s run tests. I fix code on file save. \ searches projects.

Postgres

These steps help me debug slow queries.

I happily run Postgres-backed job queues in production.

I try to create indexes concurrently to avoid locking writes to a table.

I like concat_ws instead of concat() to avoid ugly output.

Tests

To better see cause and effect, I use a four-phase test structure, avoid mystery guests, and use stubs and spies instead of mocks.

HTML

There are many ways to put static HTML on the internet but I've been happiest with a custom Go script that runs on GitHub Actions when I merge changes and deploys to Deno Deploy.

Unix

I like SSH keys with Ed25519 instead of RSA for good security, performance, and aesthetics.

HTTP

I don't point DNS directly to an origin server. I point DNS to a CDN that pulls content from the origin.

I prefer writing thin HTTP clients rather than using a third-party SDK.

Ruby

Heroku Postgres has a great feature they call "dataclips" which let users enter SQL queries into a textarea, run them against a read replica, and export to CSV. I wrote a Heroku dataclips clone for fun.

Heroku

I restore my development database from a production copy daily.

When my production app processes change state, I send Slack notifications with AWS Lambda.

If needed, I configure Heroku Postgres read replicas with Rails to scale read traffic and free primary database connections for writes.

Fly.io

Even better is to serve a web app from multiple Fly.io regions and route read-only queries to same-region Postgres replicas.

Growth

Growth is a discipline that blends design, marketing, and engineering to help users get value from products. When I've worked on growth for SaaS products, a north star metric and retention curves have been helpful inputs to the roadmap.