#​675 — October 26, 2023

Read on the Web

Together with  FastRuby.io

Ruby Weekly

The Performance Impact of Memoization on Modern Ruby — A fantastic introduction to the ‘object shapes’ optimization introduced in Ruby 3.2, before looking at how a common memoization technique adversely affects it, as well as the ways both implementers and developers can begin to mitigate the issue.

Jean Boussier

▶  All the Talks from Rails World 2023They’re heeeere. Taking place three weeks ago, the Rails World conference was a success, and they didn’t fail in the video department. This is a fantastic array of talks, whether it’s Eileen Uchitelle looking at Rails’ magic (and why she loves working on it), the always-entertaining 'tenderlove', Peter Zhu going deep on Ruby garbage collection, or the Rails core team answering attendee questions.

The Rails Foundation

🚀 Need an Action Plan to Upgrade Your App to Rails 7.1 and Ruby 3.2? — Get a roadmap by @FastRubyIO! Discover the work and effort needed for your upgrade, assess budget, and see potential roadblocks. Your effortless upgrade journey begins here. Know how long it will take before you begin.

FastRuby.io | Upgrade Services sponsor

Tanakai: A Web Scraping Framework for RubyKimurai was a scraping framework that seemingly hibernated a few years ago, but Tanakai is an up-to-date fork that supports Ruby 3+, Cuprite, and lets you work with headless browsers to scrape and interact with modern sites, even those rendered with JavaScript.

Glauco Custódio

Effects of Pitchfork Reforking on Shopify’s MonolithA year ago, we featured Pitchfork, a new HTTP server from Shopify focusing on low latency and memory use. One way it accomplishes this is through reforking; this post shares metrics showing off how much Shopify has benefitted.

Jean Boussier

📕 Articles & Tutorials

The Future of Full-Stack Rails: Turbo Morph Drive — The forthcoming Turbo 8 will include DOM “morphing,” a way to more elegantly take a DOM tree from one state to another, providing a smoother UX. This article (and its sequel) implements morphing in a Rails 7.1/Turbo 7 app to give you a feel for the future.

Vladimir Dementyev

37signals' Jorge Manrubia has also written on this topic in Exploring server-side diffing in Turbo, showing how doing the morphing on the server was also considered, before deciding to go with client-side morphing instead.

Better Forms with SuperformSuperform is another customizable form helper for Rails, but this one is built on Phlex, so the forms should be easier to test. Superform offers a lot, including a better way to handle strong parameters that will prevent errors because you forgot to update the controller.

Brad Gessler

Wasting Time and Budget Interviewing the Wrong Candidates? — Or worse—wrong hire for a critical role? It doesn’t have to be that way—placement services customized to what you need.

Test Double sponsor

How to Skip All Callbacks for All Models in Rails — Using ActiveRecord::Suppressor, conditional callbacks, or patch ApplicationRecord to skip Rails callbacks.

Lucian Ghinda

Advanced Usages of Action Policy for Rails — A follow-up to a post we linked two weeks ago, this dives deeper into caching, pre-checks, and more advanced techniques in the new access control framework.

Aestimo Kirina (AppSignal)

🛠 Code & Tools

Opal 1.8: The Ruby to JavaScript Compiler — The latest version of the popular Ruby to JavaScript transpiler now bridges Ruby hashes to JavaScript Map objects, and introduces performance improvements across the board. Project homepage.

Elia Schito, Adam Beynon, et al.

FruitJuice: Send Background Jobs From Ruby to CrystalMosquito is a Crystal-focused background job runner and FruitJuice can be used in Ruby apps to enqueue jobs on to it – handy if you want to write your background jobs in Crystal for whatever reason (CPU-heavy work, say).

Seth T.

💎 If you've not played with it, Crystal is worth a look. Stylistically, it's a heavily Ruby influenced language but statically type checked and compiled.

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 patches, bug fixes, upgrades and ongoing improvements for your app.

reinteractive/CodeCare sponsor

RuboCop Minitest: Code Style Checking for Minitest Files — A RuboCop extension focused on enforcing best practices and coding conventions, inspired by the Minitest Style Guide.

RuboCop Team


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.

Senior Full Stack Engineer | Remote in USA/Canada | Full-Time — TravelJoy is the market network for leisure travel. Thousands of travel agents depend on our product every day.

Full-Stack Developer at XYRALITY (Hamburg/Germany) — Development of a new game as senior member of a new core team based in Hamburg – come join us.

🐍 Scaffolding and Snakes

Andy Maleh of the Glimmer project has unveiled a variety of scaffolding options for building Glimmer-backed Ruby desktop apps.

To show off the potential for this handiwork, he's scaffolded Glimmer Snake, a Nokia-phone style 'snake game' that works seamlessly on macOS, Windows and Linux, all from a gem install. You can try it right now like so:

gem install glimmer_snake

Nice work.