#​704 — May 23, 2024

Read on the Web

Together with  WorkOS

Ruby Weekly

The Future of Frozen String Literals — A key change in Ruby 3.4 (now in preview) is string literals in files without frozen_string_literal will begin to act as if frozen and raise warnings if mutations occur, pending a future enforcement of this as the default. Why? Xavier explains the history of automatically freezing string literals in Ruby and why this is happening now.

Xavier Noria

An FAQ for Namespaces: Possibly a Key Future Ruby FeatureThis proposal introduces the ability to create virtual 'namespaces' that allow loading libraries, extensions, etc. so apps can load different versions of the same libraries. This could solve some ‘dependency hell’ issues, such as in testing. Matz has suggested this could become a distinctive feature for an eventual Ruby 4.0.

Satoshi Tagomori

WorkOS: Enterprise-Grade Auth You Can Implement in Minutes — Like an enterprise plan in a box: WorkOS provides flexible, easy-to-use APIs to integrate SSO, SCIM, Audit Logs, User Management, and more. Used by some of the hottest startups including Perplexity, Vercel, & Webflow. Future-proof your auth stack with WorkOS.

WorkOS sponsor

📄 Articles, Tutorials & Videos

Setting Up a Rails Development Environment with Dev Containers“the steps we followed to set up a pretty nice-to-work-with Rails development environment using Docker and VS Code Dev Containers.”

Anjali Munasinghe

Five Things to Avoid in Ruby — While in at least one case, it’s more about what to add to your code (Rubocop), these basic pointers are worth a skim.

Martin Streicher (AppSignal)

Rails Version Updates Made Simple from the Standard Ruby Folks 🤩 — Test Double simplified linting and formatting for Ruby, so your team can focus. Do the same for Rails version updates.

Test Double sponsor

A Testing Anti-Pattern: Merged Setup Data — Making tests clear is a favor for both yourself and others, but when there’s lots of setup data, it can make it harder to understand the system’s state at the beginning of each test. The lesson: Constrain setup data to what each test really needs.

Jason Swett

Adding Views to an API-only Rails App — The --api option strips away a lot of the user-facing features, but what if you want to bring some of them back?

Jeffrey Morhous (Honeybadger)

RailsConf Detroit 2024: A Co-Chair's Perspective — Chairing an event the size of RailsConf is no mean feat. This is a good look behind the curtain.

Andy Croll

📄 Comparing SQLite Based Rails Cache Stores Mohammad A. Ali

📄 In Ruby 3.4, Range#size Raises TypeError if the Range Isn't Iterable Prasanth Chaduvula

📄 Expressive Class Hierarchies Through Dynamically-Instantiated Support Objects Jared White

📄 From Sleep to Speed: Making Rdkafka Sync Operations 16 Times Faster Maciej Mensfeld

📄 UUID Benchmark War: Benchmarking UUID Approaches for Postgres Jeremy Schneider

🛠 Code & Tools

IRB Kit: A Suite of Extensions for IRB — We recently mentioned IRB’s introduction of an extension API, so it’s great to see it already being used. IRB Kit offers a variety of helpers to do things like interact with the clipboard, adjust the prompt based on the environment, search for methods, and more.

Brooke Kuhlmann

Hookdeck CLI: Free No-Account-Required Alternative to ngrok — Receive webhooks on your localhost using the Hookdeck CLI. Inspect & replay HTTP events with the Hookdeck Console.

Hookdeck sponsor

EvilSeed: Create Partial Anonymized Data Dumps — If you want to bring back some realistic looking data from your production environment to use in staging or dev, while caring about user privacy, this is ace.

Andrey Novikov

A Ruby Middleman Tailwind Starter Blog Template — A Middleman blog template configured with TailwindCSS, Markdown parsing, code highlighting, a sitemap, and more. Ideal for some Ruby-flavored blogging.

Harrison Broadbent

ActiveRecordAnonymizer: Anonymize Your ActiveRecord Attributes — If you don’t want to anonymize data as a dump but do it in-situ.

Keshav Biswa

⚙︎ Turbo Mount: Use React, Vue, Svelte, and Other Components with Hotwire Svyatoslav Kryukov

⚙︎ Ruby LSP Plugin for IntelliJ IDEA and RubyMine Vitaly Slobodin