RSSAmplifier

Blog

Rémi Mercier

Rémi Mercier – Freelance Ruby on Rails Developer

remimercier.comRSS feed ↗67 posts

Latest posts

Let's talk about tools (Ruby Stained Glass Notes #04)

This is episode #04 of the Ruby Stained Glass Notes, a pop-up newsletter in which I write about the process of building a stained glass panel celebrating Ruby. Today, I talk about tools!

Square? Or freeform? (Ruby Stained Glass Notes #03)

This is episode #03 of the Ruby Stained Glass Notes, a pop-up newsletter in which I write about the process of building a stained glass panel celebrating Ruby. Today, I riff on the drawing and ask you which version you prefer!

Ideas are cheap. But glass? Not so much. (Ruby Stained Glass Notes #02)

This is episode #02 of the Ruby Stained Glass Notes, a pop-up newsletter in which I write about the process of building a stained-glass panel celebrating Ruby. Today, we talk about how to choose glass, and how stained glass windows should follow the open-closed principle too.

This idea cost me an ice cream (Ruby Stained Glass Notes #01)

This is episode #01 of the Ruby Stained Glass Notes, a pop-up newsletter in which I write about the process of building a stained-glass panel celebrating Ruby.

I'm making a collectible limited-edition Ruby stained glass panel

After talking with Jeremy Smith and Jess Brown on the IndieRails podcast about stained glass and how I transitioned to programming in Ruby, I’ve had this crazy idea that I could tie the two together in a weird project. Well, here goes nothing!

An impromptu lightning talk at Rubycon

Last week, I spent an extended weekend in Rimini, Italy, for the first edition of Rubycon where I gave a lightning talk connecting my reconversion story with the current trend of throwing junior developers under the bus for the sake of (AI) productivity.

IndieRails Podcast Interview

I joined Jeremy Smith and Jess Brown on the IndieRails podcast to talk about how I managed the transition from stained-glass master to freelance software engineer.

Using Minitest::Spec in Rails? Watch out for the lifecycle hooks!

A small mistake sent me on an overly long investigation into Minitest hooks, and how Rails integrates with these.

Reflecting on 2025

Time to recap a good year.

More Minitest::Spec shenanigans

While I already covered the basics of `Minitest::Spec`, I forgot to discuss a few aspects of the spec flavor. This post serves as a complement to the previous one and digs a bit deeper into some extra `Minitest::Spec` shenanigans.

What is Minitest::Spec?

In my previous post, I talked a lot about how Minitest comes in various syntax flavors. One flavor I did not cover much is Minitest's spec extension.

Marketing Haikus

Just a list of haikus, mostly written when I was working (and being bored out of my wits) in marketing. Making fun as a tool to push through.

Lost in Minitest? Start here!

I have a confession to make: I have never used Minitest in the seven years I've been a professional programmer. Lured by the promise of speed and wide adoption, I decided to try Minitest. Then I hit an unexpected roadblock.

Finally learning a new language

For years, people around me have been telling me to learn new programming languages—that I shouldn’t corner myself with Ruby (and Rails). And for years, I couldn’t muster the mental energy to do it.

Build a minimal decorator with Ruby in 30 minutes

A while ago, I needed to add some view-related instance methods to a model. Decorators are my go-to pattern to handle this kind of logic. So, I built a minimal decorator from scratch, added a bunch of extra behaviors, only to end up abstracting all of that away. Follow along!

Speed up RSpec tests: understand lifecycle and execution

One of RSpec's strengths is the legibility of its behavior-based DSL. The other side of this coin is that the proliferation of small example blocks introduces a performance overhead.

How I use git add --patch for reviewing my work

When working on features, I strive to preserve my flow, which means, that after a few hours, I'll have a bunch of untracked files waiting for me in git. I use `git add --patch` to effectively bundling my work into separate commits.

Poking around PostgreSQL full-text search: a beginners primer

Today, I want to share a different type of post. Nothing polished. Just me goofing around with PostgreSQL's full-text search capabilities.

Interfacing with external APIs: the facade pattern in Ruby

Interacting with third-party APIs is common practice in applications. This is where the structural design pattern called facade comes into play.

What if your private method was a public method? A practical tip to identify bad design

Where I share a badly designed piece of code, think about what process I can use to reveal its flaws, and how to make it better.

Add comments to your tables columns

Add extra documentation to your columns attributes with this one weird trick.

Delegated types in Rails: a real-life application

Delegated types are a modelization pattern introduced in Rails in 2020. And developers have mostly been scratching their head for a few years trying to use them in their applications. Today, I want to share a real-world use case. I'll walk you through my pre-existing domain architecture, my initial requirements, my mistakes, how I eventually used delegated types, what I learned and my open…

Pick a standard and move on

Why would you spend your cognitive capacity on useless choices?

Domain complexity vs applicative complexity

For years, code would fall into two categories: easy (good!) and hard (bad!). Recently, I've realized that not every piece of _hard_ code is created equal. Complex code often encompasses two kinds of complexity: domain complexity and applicative complexity. And I often failed to identify which is which.

Growing old as a programmer

I’ll be turning 40 this year, and I’ve started to wonder about my professional life in the next two decades. Not a lot of 60-year-old developers, hey?

Refactoring in practice: moving toward convention

A few months ago, I had to write a Rails micro-service that synchronizes data between two versions of an application. I'll show you the successive steps I used to refactor this piece of code, from shameless-green to convention.

Technical tests in 2023: were they any good?

As I'm reaching the end of this recruiting cycle, I wanted to reflect on the recruiting processes I've completed. Some were good, some not so much.

Algorithms are fun... I guess?

Something happened to me last week I didn't expect: I enjoyed working my way through algorithms. You may find me overly dramatic, but remember, I'm from the art world. Algorithm is a fancy term to describe the act of painting rectangles of colour in a specific pattern.

Looking for a job: handling fatigue and loneliness

Today, I would like to try something different. No polished new entries, just me sharing my day-to-day looking for a new job.

How to write better specifications for your features

For years, I've worked without thinking much about feature specifications. Many teams endure empty Trello cards, neglected Jira tickets, and misaligned communication. So today, I want to share how to write better specifications for your features.

How to test your Rails models with RSpec

Today, I want to share how to test your Rails models with RSpec. Testing your models is a no-brainer strategy when building your applications. It gives you the confidence to make changes without regressions. We'll cover the fundamental testing strategies with RSpec's built-in features. And for fun, we'll check some extra tools to amp up your models' coverage.

The never-ending days of DEI's importance

A few weeks back, the creator of Ruby on Rails wrote a pamphlet rejoicing on - what appears to him as - the waning days of DEI's dominance. This rebuttal talks about how diversity, equity, and inclusion were, are, and will always be essential to workers.

From stained-glass master to software engineer: it starts with a mess

Changing careers is a long, often-overlooked process. But I want to share both the (linear) story and the (messy) history of how I became a software engineer. And as a lot of good stories, mine always starts with a lie.

Build a minimal feature flags manager in under an hour

Feature flags (or feature toggles) are a neat way to hide in-progress features from your users. For those who need a simple on-and-off system, here's a minimal feature flag manager that'll take less than an hour to build, using plain Ruby objects, the Rails configuration, and some neat variables organization.

Exploring dependency injection in Ruby

Classes depend on each other all the time. But the way you tie those classes together will determine how hard it is to change your code. Dependency injection can help you reduce that coupling and reduce your cost of change.

Introduction to Git Bisect: travel through time and bugs

No matter how thorough your test coverage is, you can't test everything. So when you introduce a bug in your application, git bisect will help you zero in on your regression's origin.

Upgrading Ruby on Rails: a beginner's guide

You're about to upgrade your application to the newest version of Ruby on Rails. And you've never done it before? Fear not! Here's my battle-tested companion to migrating Rails.

Building large features: my process for branches, requests and reviews

Working on large features can be tricky. I've spent the last few months refining a process that makes it easy to keep in touch with the main branch, to make reviews more manageable, and with little GIT overhead.

Introduction to RSpec: the syntax

In this second part of my introduction to RSpec, I want to focus on the syntax. Here's a glossary of the keywords you'll use the most when testing with RSpec: describe, subject, let vs let!, it, context, etc...

An introduction to RSpec: how to install RSpec, naming convention and basic files structure

When you start programming, it's not easy to know what to test, how to test, and why should you test? So let's start with an introduction to RSpec: how to install RSpec, RSpec naming convention and and RSpec files structure.

Always serving someone

It's easy to tell yourself it's not your job to provide a great service to your users. But taking time to write beautiful code will bring joy and value to you and your teammates.

Debugging with pry-byebug: moving in the stack frame

Time to level up your debugging game with frames, adding breakpoints on the fly, and some handy shortcuts.

Get started with ActiveRecord scoped associations

Active Record Associations are a great feature of Rails. But I never thought of using scopes with has_one or has_many associations until recently! So let me show you a neat little trick that'll make your code much much more expressive (and keep your N+1 queries in check).

How to wrap your head around a new codebase

For the last eighteen months, I've spent my time trying to understand bits of code I'd never seen before. Eighteen months later, I still don't know every corner of the codebase, but what I do know, is how to get efficiently familiar with new parts of a codebase.

How not to live stream your code

This week, I did my first live stream on Twitch and it didn't turn out so well (to say the least). Here's a recap of my rookie mistakes, what I liked about it anyway, and what I'm planning on doing.

Asynchronous HTTP requests in Rails

Let's look at how we can update parts of our app's pages with asynchronous HTTP requests. This is a step-by-step how-to with some good ol' Javascript fetch() method, and Rails native server-side partial rendering.

A hands-on tutorial to debugging your code with pry-byebug

Like most new developers, I started as a puts developer. Then, I discovered pry-byebug and debugging things got a lot easier. This is a beginner-level, hands-on, introduction to debbuging your code with pry-byebug. Behold the power of binding.pry!

Going remote: a live documentation on transitioning out of the office

Last week, I started the process of transitioning from an on-site position to a full remote one. I'll publicly document what happens as it happens here. Interested in remote working? Join in!

Don't sell yourself short

You've just graduated from university. Maybe you're in your first two years as a developer. You are, what the market calls, a junior developer. And you're a burden to companies. That's what you're being told. Well, this is bullshit.

Working with tempfiles in Ruby

A while back, I needed to create XML files, send them to a distant server and delete them once the transfer completed. This is when I discovered Tempfiles and rejoiced in using Ruby.