Ruby on Rails

📝 Common Table Expressions in Ruby on Rails

Published on .

A practical look at Common Table Expressions in Ruby on Rails. Covers writing CTEs as raw SQL in Rails 7.0 and below, the N+1 query problem that raw SQL results introduce (because ActiveRecord's preload cannot be used), a workaround that calls the preloader directly, and the cleaner approach added in Rails 7.1 — the ActiveRecord-native "with" method, which generates the CTE and restores full preload support.

📝 From WordPress to Rails

Published on .

An account of rebuilding this blog in Ruby on Rails after three years away from writing. Covers the decision to move from WordPress and PHP, going static to remove the database entirely, consolidating several hosting services into one with automated deployments, adopting ViewComponent and Lookbook to build a design system, and adding comprehensive automated testing with RSpec and GitHub Actions.

📝 New Job, New Programming Language

Published on .

Practical advice on switching programming languages mid-career, drawn from ten years of PHP and a move into Ruby. Covers approaching the job hunt honestly, how core engineering principles translate across languages — comparing PHP interfaces with Ruby duck typing — making the most of code reviews as a learning tool, and why comments matter more than ever when you're new to a codebase.