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!
Rémi Mercier – Freelance Ruby on Rails Developer
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!
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!
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 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.
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!
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.
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.
A small mistake sent me on an overly long investigation into Minitest hooks, and how Rails integrates with these.
Time to recap a good year.
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.
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.
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.
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.
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.
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!
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.
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.
Today, I want to share a different type of post. Nothing polished. Just me goofing around with PostgreSQL's full-text search capabilities.
Interacting with third-party APIs is common practice in applications. This is where the structural design pattern called facade comes into play.
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 extra documentation to your columns attributes with this one weird trick.
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…
Why would you spend your cognitive capacity on useless choices?
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.
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?
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.
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.
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.
Today, I would like to try something different. No polished new entries, just me sharing my day-to-day looking for a new job.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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...
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.
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.
Time to level up your debugging game with frames, adding breakpoints on the fly, and some handy shortcuts.
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).
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.
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.
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.
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!
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!
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.
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.