Short Ruby News - Edition #104

The one with Josef's new book about Minitest, where Xavier celebrates 15 years of maintaining Rails contributors app and where Andrew launches state-of-the-art transformers gem for Ruby

You can jump directly to a section:

πŸš€ Launches & πŸ“… Events

πŸ‘‰ All about Code and Ruby: πŸ’» Code, πŸ“Code Design,πŸ’‘Around, ❀️ Why Choose Ruby

🧰 Gems, Libraries, and Updates: πŸ†• New, 🧰 Updates

[Sponsor ⬇] reinteractive.com

The reinteractive Application Code Review is a deep dive into your application, providing you a complete window into the state of your app.

πŸš€ Launches and discounts

πŸš€ Nate Berkopec announced the launch of his new retainer service Ruby on Rails Performance Service

πŸ“… Events

πŸ“† Events happening this week if you want to attend (source: RubyConferences):

πŸ“… Scot Rug announced the new conference Haggis Ruby is coming... | Haggis Ruby

πŸ‘‰ All about Code and Ruby

πŸ₯³ Xavier Noria celebrated 15 year of building Rails Contributors - All time

πŸ’» Code Samples

οΈπŸ’» Michael Chaney shared about doing find_or_initialize by with unpersisted record:

οΈπŸ’» John Nunemaker shared ActiveRecord scopes can use arel_table, which allows regex matching without having to use SQL strings. Eileen suggested against using the arel_table since it’s a private API

οΈπŸ’» Nate Hopkins shared a code sample about how using pattern matching could improve readability:

οΈπŸ’» Michael Chaney shared about how pattern matching will only work with hashes that use symbols as keys:

οΈπŸ’» Ruby Cademy shared how to use ActionDispatch::DebugLocks to diagnose deadlocks efficiently.

οΈπŸ’» Nidhi Sarvaiya shared a detailed journey how Enums have evolved across multiple versions of Ruby on Rails.

οΈπŸ’» Igor Alexandrov asked a question about redirect options (he reviewed multiple solutions after the poll ended at Redirect and return in Rails controllers)

οΈπŸ’» Ruby Cademy shared how ActionView::Helpers::FormBuilder and default_form_builder help us create reusable form components.

οΈπŸ’» Rob Lacey shared a code sample about assigning undefined local variable and method will still create a nil variable:

οΈπŸ’»οΈ Samuel Williams shared how moving logic out of initialize helps make testing and implementation easier

He later added:

οΈπŸ’» Saeloun shared how db:seed:replant works. Read their blog to know more.

οΈπŸ’» Zhephyn shared a detailed thread introducing ActionCable. Do give it a full read 

πŸ’» Ruby Cademy shared how to use ActionDispatch::PermissionsPolicy and the HTTP Feature-Policy response header to secure your Rails app by controlling browser features

οΈπŸ’» Ruby Cademy shared a tip about using Rails #future? to check if a date is in the future:

They added that Rails also supports #past?

οΈπŸ’» RoR vs Wild shared a couple of benchmarks about Strings operations:

Xavier Noria added:

Jean Boussier added:

οΈπŸ’» Akash Manohar shared about configuring scheduled jobs for concurrency when using Goodjob gem:

οΈπŸ’» RoR Vs Wild shared about Array#find vs Array#bsearch (read the full thread here):

οΈπŸ’» Marc KΓΆhlbrugge shared a code sample about working with Cloudflare:

οΈπŸ’» Andrei Bondarev shared a code sample to Enable debug for all Ruby HTTP requests

οΈπŸ’» Ruby Cademy shared about Rails suppressor method:

οΈπŸ’» Thibaut BarrΓ¨re shared a code sample about automating secret retrieval from 1Password via their CLI:

πŸ“ Thinking about Code Design

οΈπŸ“ Mohammad A. Ali shared about running Ruby apps with 1M MAUs combined using a single server:

οΈοΈπŸ“ Nate Berkopec shared how installing jemalloc is a no-brainer if you’re running a Rails application, which gives instant memory savings by making a 3-line change

He lated added the 3 lines proposed:

Szymon Fiedler also added that using jemalloc was very helpful in reducing memory utilization:

οΈοΈοΈπŸ“ Dmitry Davydov shared about Ruby GVL:

οΈπŸ“ Mohammad A. Ali shared a thread about Ruby on Rails performance:

πŸ’‘ Around code (news, findings, books, and more - all about Ruby)

πŸ’‘ Avo shared a list of issues marked as good first issues to their open-source repo:

πŸ’‘ Robby Russell shared that he was looking for the migration guide from Webpacker for Rails apps. Some folks suggested the vite-rails docs.

οΈπŸ’‘ Josef Strzibny shared how to fix the Ruby formatter in Zed editor

🀝 Zed shared the launch of Zed AI in collaboration with Anthropic AI.

❀️ Why Choose Ruby and Rails

❀️ ️Ross Kaffenberger shared the things available out of the box when using Ruby on Rails

❀️ David Heinemeier Hansson elaborated on the Provide Sharp Knives part of the Ruby on Rails doctrine.

❀️ PaweΕ‚ DΔ…browski shared about using Ruby for 16 years:

❀️ Luan Estradioto shared 

❀️ Raman shared 

❀️ Ted Martin shared about Rails:

Tobi Lutke added

🧰 Gems, Libraries, Tools and Updates

πŸ†• New Gems and Repos

🧰 Updates

🧰 Stan Lo announced a small update docs.ruby-lang.org

🧰 Justin Collins announced a new version of Brakeman: Brakeman 6.2.1 Released

πŸ‘€ Keep an eye on

πŸ‘€ Sebastian Buza submitted a new feature request for Ruby about Rewrite Array#bsearch in Ruby

🀝 Related (but not Ruby-specific)

🀝 Alazycoder shared a code sample for upgrading from PostgreSQL 15 to PostgreSQL 16:

🀝 Mike Coutermarsh shared his thoughts on why focusing on β€œgood code” is not the thing one should optimize for

🀝 David Heinemeier Hansson shared optimizing for resilience prematurely is not worth it.

🀝 Lucian Ghinda shared a detailed thread about designing tests. He talks about the guidelines one should consider while writing tests:

🀝 Jason Swett shared that code design skills and testing skills move in lockstep.

🀝 David Heinemeier Hansson shared about estimates:

🀝 Tuomas Artman shared about their strategy to handle bugs at Linear:

More content: πŸ“š πŸ—ž 🎧 πŸŽ₯ ✍🏾

πŸ—ž Newsletters

πŸ—ž Ruby On Rails published a new edition of This Week in Rails about  ActionText store_if_blank, SQLite non-GVL-blocking busy handler, and more!

πŸ—ž Ruby Weekly published a new edition about Thoughts about static typing in Ruby

πŸ—ž Hotwire Weekly published a new edition about Week 34 - Hotwire with Django, Stimulus Social Share Button, and more!

πŸ—ž Awesome Ruby Published a new edition about Issue 431 - Proposal to change private method to work on Constants in Ruby

πŸ—ž RubyCentral published a new edition of their newsletter about August 2024 Newsletter

🎧 Podcasts

🎧 Code with Jason published a new podcast 228 - Test Driven Design with Alex Bunardzic

🎧 Indie Rails published a new podcast about IndieRails | Getting Performant with Nate Berkopec

🎧 Jeremy Smith published a new podcast about Building Liminal

🎧 RemoteRuby published a new podcast about Rails 7.2 – First Impressions

πŸ“½οΈ πŸŽ₯ Videos

πŸŽ₯ RubyKaigi published the list of videos from the RubyKaigi 2024

πŸŽ₯ Kasper Timm Hansen published a new video about Oaken and ActiveRecord::AssociatedObject

πŸŽ₯ Arkency published a new video about Rails upgrades 101 β€” tips and tricks from Piotr Jurewicz

πŸŽ₯ Yaroslav Shmarov published a new video about SupeRails | Social Share button (very important for PWA & Turbo Native

πŸŽ₯ Ruby Rogues published a new video about Rails, Assets, ActiveStorage and a Cloudfront CDN 

πŸŽ₯ Dave Kimura published a new video about  Episode 471 - Dark Mode | Drifting Ruby

✍🏾 Articles

What’s new πŸ†•

✍️ Evil Martians published a new article about AI-ification of our TestProf toolkit!

✍️ John Nunemaker published a new article about Data Modeling Entitlements and Pricing for SaaS Applications

✍️ Apoorv Tiwari published a detailed guide on migrating from Sidekiq to SolidQueue

✍️ Camilo Payan published an article about How Standard Ruby updates its rules

✍️ Navaneeth D published an article about Rails 7.2 brings SQL queries count to template rendering logs

✍️ Igor Alexandrov published a new article about Redirect and return in Rails controllers

✍️ Haseeb Annadamban published a new article about How to Add PostgreSQL Index based on Query Plan as a Rails Developer

✍️ Stephen Margheim published a new article about Parsing and emitting database.yml

✍️ Allancoder published a new article about Getting started with Rspec for testing

✍️ Guillaume published a new article about building Magic Link Authentication for Devise natively in Rails 7.1

✍️ RubyCademy published an article on Twitter about Unlearn programming to learn Ruby

✍️ Maciej Mensfeld published an article about Under the Hood: Enhancing Karafka’s CPU and Memory Efficiency

✍️ Lucian Ghinda published an article about Proposal to change private method to work on Constants in Ruby

How-TOs πŸ“

πŸ“ PaweΕ‚ DΔ…browski published a new article about Mokkku, a modern replacement for FFaker

πŸ“ Matt Brictson published an article about Building a better bin/dev script

πŸ“ Kasper Timm Hansen published a new article about Keep your Rails app competitive with Oaken & ActiveRecord::AssociatedObject

πŸ“ Rails Designer published an article about Better Inline Validation for Rails Forms (with ViewComponent or partials)

πŸ“ Martin Streicher published an article about Squash Your Ruby and Rails Bugs Faster

Related

David Heinemeier Hansson published an article about Software estimates have never worked and never will

Geshan Manandhar published a new article about Docker for beginners: a guide to understanding the core concepts

Reply

or to participate.