Five Ruby Links #2

Find out everything about frozen string literals from Jean Boussier, parsing Ruby code from Pat Shaughnessy, code highlighting in Rails from Avo, single-purpose classes from Szymon Fiedler, and a zero-downtime database migration from Denis Lifanov

If I were to recommend five articles published last week to read, here is what I would recommend:

1️⃣ Jean Boussier published an article about Frozen String Literals: Past, Present, Future?

This is a very good deep dive into frozen strings, the history of the feature, and how it got implemented in Ruby, and what the possible future plans are with it.

Make sure to also read this amazing Gist “Ruby: The future of frozen string literals” written by Xavier Noria. If you read these 2 resources, should know everything there is to know about frozen string literals in Ruby.

2️⃣ Pat Shaughnessy published an article about Parsing: How Ruby Understands Your Code

This is a great article that shows how the Ruby parser is going through the source code and it takes you through a journey about how Ruby makes sense of the syntax and the internal representation of it.

3️⃣ Avo published a new article about Code highlighting with Rails

Again a very good tutorial from Avo about how to configure code highlighting in Rails. A lot of projects/organisations have technical blogs that can be built using Rails and it is great to see various ways of how to show good syntax highlighting:

4️⃣ Szymon Fiedler published a new article about The Joy of a Single-Purpose Class: From String Mutation to Message Composition

Szymon here discusses fixing deprecation messages related to string mutations and demonstrates an OOP refactoring focused on simplicity and efficiency.

5️⃣ Denis Lifanov published a new article about Migrating Whop from PostgreSQL to PlanetScale MySQL with 0 downtime

Denis from Evil Martians writes a very good article about migrating from PostgreSQL to PlanetScale MySQL for Whop. It shows the step by step process of migrating 750GB of production data while also keeping the development of new features running and without any downtime to the users.

You can find a lot more articles to read in the full edition of Short Ruby Newsletter at https://newsletter.shortruby.com/p/edition-155

Reply

or to participate.