~/devreads

Hashrocket

https://hashrocket.com/blog · 10 posts · history since 2025 · active

17 Mar

4 min read

I was working with a readonly model in Rails the other day and ran into an issue whilst testing it. Here's what I ran into and the solution I came up with. Readonly models are a great way to signal that, well, you should only ever read them, not write them. Maybe you have some external system that connects to…

testingruby on rails

20 Jan

11 min read

In my time as a developer, I have noticed that one of the most common ways my coworkers spend time coding outside of work is by developing little code snippets or apps that solve problems in their everyday lives. From household budgeting, to managing workouts on rowing machines, to generating a Taco Bell order, these projects allow devs to explore…

ruby

9 Dec 2025

2 min read

Here's a simple and responsive search form I put together for a recent side project, using Hotwire's Stimulus framework and Rails with Turbo. The Form Here's how the search input looks. It's a simple search form connected to a Stimulus controller. The input triggers the search function upon every input event. The debounce logic occurs in the Stimulus controller to…

railshotwireturbostimulus

4 Dec 2025

5 min read

Picture this: you find a charming old board game at a garage sale, bring it home, gather some friends—and snap. The 50-year-old plastic components break instantly. You search the web for help to replace this fun and unique game mechanic but there’s nothing to be found. So naturally, you roll up your sleeves and build your own mobile version. No…

rubymobilerailsboard game app

2 Dec 2025

3 min read

It's the most wonderful time of the year - Christmas Advent of Code time! Advent of Code is an Advent Calendar style series of programming puzzles put out each year, starting on December 1st leading up to Christmas. The puzzles are super festive and ramp up in difficulty over the course of the month. Programmers of every level can participate,…

ruby

27 Nov 2025

4 min read

Shipping new features on legacy Rails applications requires deep codebase context. The rails-mcp-server gem closes the gap between AI agents and your Rails projects, enabling more relevant code analysis and context aware refactoring suggestions. Whether you're dealing with tech debt in a brownfield application or building new greenfield features, this tool can help you move faster with confidence. The Model…

rubyrailsmcpai

25 Nov 2025

12 min read

We’ve been working with MCP servers for a while, and this use case was a perfect opportunity to build out another one. What is an MCP Server? A very simple way to put it is that Model Context Protocol is an "API" that your AI tooling can use to get external data or perform actions by interacting with your application.…

elixirprocessdevelopmentai

20 Nov 2025

6 min read

N+1 queries are one of the most common performance killers in Rails apps, but also one of the easiest to fix. In this post, we'll see how a single line of code can reduce 1,101 database queries down to 3. N+1s occur in rails when you have associated ActiveRecord models, and iterate over one model while accessing fields on the…

activerecordperformanceruby on rails

18 Nov 2025

4 min read

Claude code is a powerful AI toolset that runs right in your terminal. While providing a lot of impressive utility, it also suffers from the issues that arise from similar AI toolings with the addition of an expensive pricing model. Context is Important To me, the main selling point for Claude Code is its ability to read through your entire…

rubyworkflowrailsai

13 Nov 2025

4 min read

How Nativewind can speed up your React Native Development If you're anything like me, after working on a few web projects with Tailwind, it can feel like a drag to return to stacks that use other styling libraries. Tailwind has become, for myself, and many other developers, a standard styling paradigm. When starting my most recent React Native project, I…

mobilereact native