-
DNS resolution issue in Alpine Linux
I recently ran into a weird issue after switching an application’s container base image from Debian to Alpine Linux. Things worked out fine in staging and sandbox environments, but suddenly in production (of course!) the application failed to resolve a service it needs to talk to.
-
Single file Rails applications - serving requests
Last time we packed a Rails application into a single file so that we can isolate bugs and easily share reproduction steps on GitHub or in a gist.
-
Single file Rails applications (for fun and bug reporting)
As you might know from previous posts, I keep a Rails playground project around. That’s a small application with a bunch of models, controllers and accompanying tests. It allows me to quickly try out a new gem that was mentioned in a blog post, see the effects of a configuration flag, or quickly prototype other ideas.
-
How to automatically review your PRs for style violations with Pronto and RuboCop
Is sloppy written code slowly creeping into your codebase? Finding tabs in your source files, but the team is using spaces? You research on a freshly merged PR, but the code has zero comments on classes or modules?
-
Adding custom types to your ActiveRecord models with the Attributes API
In a previous blog post I’ve written about value objects and their benefits. Today I want to see how we can make use of those value objects within our ActiveRecord models.
-
Study Notes for the Value Object pattern
In the last couple of weeks I’ve repeatedly stumbled over a smell in a project I’m working on: the classifier of an object was inflected by the prefix of its name. As an analogy, think of the ISBN code, where groups of numbers have a special meaning.