#​661 — July 6, 2023

Read on the Web

Together with  Memetria

Ruby Weekly

Revisiting Garbage Collection in Ruby — First published in 2020 but now almost entirely rewritten for 2023, Ruby internals expert Peter Zhu takes us on a technical, but reasonably easy to follow, tour through Ruby 3.2’s GC implementation, its data structures, and how the phases of its lifecycle operate.

Peter Zhu

Deploying Rails Apps with Dokku — If you like the convenience of platforms like Heroku but want to run things on your own server, Dokku is a mature, open-source PaaS worth trying. The author has “tried to put together the ultimate Dokku + Ruby on Rails guide” and has done a good job IMHO, including adding Redis, Sidekiq, and deploying to ARM-based servers with Docker. (Much of it can be adapted to non-Rails apps, too.)

Harrison Broadbent

Memetria: Secure, Scalable Redis 7 Hosting — High performance Redis hosting with large key tracking, detailed metrics, and a superior uptime record.

Memetria sponsor

Pattern Matching on Ruby Objects — Introduced experimentally in Ruby 2.7 and becoming more established in Ruby 3.x, pattern matching is one of Ruby’s most intriguing syntax additions in recent years. It allows you to deeply match against values in structures and other objects and to do so depending on the shape of said objects..

Brad Gessler

🎙️ JRuby's co-lead developer, Charles Nutter, was recently interviewed about the state of JRuby, how it survived the pandemic, and its CRuby-compatibility story.

🇯🇵 Kaigi on Rails 2023 is a Japanese language Rails event taking place both online and offline (in Tokyo) this October. You can submit a talk proposal until the end of this month, but you'll need to brush up on your Japanese.

📅 No Rails World ticket? No problem. Michael Buckbee suggests many other Ruby events to consider.

💡 Greg Molnar shares his latest Rails tip of the week by demonstrating how to run bundle audit and yarn audit on every PR and once each day to stay up to date with vulnerable dependencies.

🏎 Rails creator ▶️ DHH went on the Software Defined Talk podcast to talk about all sorts of things including DHH's background, how 37signals works, programming books DHH likes, 37signals' "leaving the cloud" journey, MRSK, and, oh, motor racing.

📕 Tutorials, Articles, and Videos

A Comparison of AI Tools for Writing Rails Code — Can ChatGPT, Phind, Cody, Rix, or GitHub Copilot turn a simple bit of HTML into a helper for a Rails app? Mostly, yes, but it's still best to think of such tools as more like an eager intern rather than an expert pair programmer..

Lucian Ghinda

An Example of Type-Checking in Ruby 3 using RBS — RBS has hardly set the Ruby world on fire, but if you want to remind yourself that RBS was a thing that was introduced with Ruby 3, this is a quick explainer with an example.

Navaneeth Krishnan P

Rails' Hidden Gems: ActiveSupport Cache Increment and Decrement — Read an article from our series spotlighting Rails’ lesser-known gems. Check it out and level-up your Rails brain! 🧠

Honeybadger sponsor

How a Year-Long LeetCode Habit Upped My Game — It’s not for everyone, but I admit I’ve enjoyed quite a few of the LeetCode problems. Ruby is one of their supported languages, too.

Nina Torgunakova (Evil Martians)

▶  Broadcasting Progress from Background Jobs — Keeping users updated on the progress of asynchronous background jobs can be challenging, but Turbo and Stimulus make it easier than you might think in a Rails app. (22 minutes.)

David Kimura (DriftingRuby)

Creating a Basic Ruby GUI App with GlimmerGlimmer is a DSL and framework for building GUI apps in Ruby that began in the JRuby world but is now happy with CRuby too (running atop LibUI). This is one developer’s slightly scrappy intro that may whet your appetite (full code).

Mattias Velamsson

▶  Discussing the Case for Not Taking a Management Path
Remote Ruby podcast

Rails Generators, Templates and How They Work
Garrett Dimon

🛠 Code & Tools

Minitest::Snapshots 1.0: Jest-Style Snapshot Testing“Think of it as VCR, but for any value,” says Matt. It’s a Minitest plugin that saves values encountered during the first run, saves them (if they can be serialized as YAML), then uses those as fixtures (in a sense) for future runs. It’s a curious idea.

Matt Brictson

🎶  WahWah 1.4: A Library for Reading Audio Metadata — For reading things like MP3 IDv3 tags, embedded images, and similar metadata in formats including MP3, M4A, OGG, OGA, OPUS, WAV, FLAC, etc. Pure Ruby too, with no dependencies.

Aidewoode

Fixed Price Monthly Code Maintenance for Rails Apps — No time to do those small but critical updates and features? CodeCare will take care of necessary tweaks, bug fixes, upgrades and ongoing improvements for your app.

reinteractive / CodeCare sponsor

CarrierWave 3.0: File Uploads for Ruby and Rack-Based Webapps — Sinatra, Rails.. it’s not too fussy. v3.0 is essentially a big 'bug fixes and tweaks' release, with a breaking change to be aware of.

CarrierWave

ActualDbSchema: Keep a Rails DB Schema Consistent When Switching Branches — Migrations can get messy if you’re switching branches in a Rails app. The job of this project is to clean up that mess.

Andrei Kaleshka

Magic Numbers: A RuboCop Cop That Detects Magic Numbers — Most apps have constant values of some kind and defining them as constants is a good idea. This plugin for RuboCop detects such values in instance methods and brings them to your attention.

Cleo AI

YouPlot: CLI to Draw Plots on the Terminal — The underlying plotting library is Unicode Plot if you want to do similar things in your own code.

Red Data Tools

Jobs

Server Engineer (Ruby on Rails) — Want to make a difference in kids’ lives? We create AI products for life-changing earlier diagnosis and care of autism.
Cognoa

Find Ruby Jobs with Hired — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now.
Hired