Short Ruby News - Edition #97
You can jump directly to a section:
👉 All about Code and Ruby: 💻 Code, 📐Code Design,💡Around, ❤️ Why Choose Ruby
🧰 Gems, Libraries, and Updates: 🆕 New, 🧰 Updates and 👀 Keep an eye on
More content: 📚 🗞 🎧 🎥 ✍🏾 (articles, podcasts, videos, newsletters)
🚀 Launches and discounts
🚀 Rinas launched WhatWentWellToday.com:

🚀 With days left to ship 37signals Writebook, Jason Fried shares The Writebook Manual published with Writebook. Take a look.

🚀 Pragmatic Programmers released High Performance PostgreSQL for Rails

🚀 Aaron Francis has his video course on High Performance SQLite live!

📅 Events
📅 Ruby Conf shared about early bird tickets mailing list: RubyConf 2024 – Chicago, IL – November 13–15, 2024: Sign-up to learn when more information about RubyConf is available!

📅 A series of meetups will take place this week all around the world:
👉 All about Code and Ruby
👉 J Ruby Dev Team announced a new version v9.3.15.0

🥳 Redmine.Jp shared that Redmine is now 18 years old:

💻 Code Samples
💻 Joel Drapper shows us how he models Postmark emails with Literal which highlights the DX(Developer Experience) benefits to using a dynamic type-checker for object properties in Ruby.

He also shared a benchmark about the Literal:



💻 Prabin Poudel shared a tip on how to use Rails alongside Tailwind CSS elegantly

💻 Chris Oliver shared his newly found knowledge on when to use __FILE__ or __dir__ to get a directory



💻 Ruby Cademy shared a tip on how to use ActiveSupport::Duration to convert seconds to user friendly format.

They shared another tip on how to find records using signed IDs safely:

💻 Greg Navis shared a detailed thread explaining how Rails makes it trivial to select records without a corresponding association. Go through the thread to get more context, but here is a gist of it.

If a Summary belongs to a job ad and a JobAd has at most one summary,

But instead of the above-said approach, you can easily attain the same result using where.missing:

💻 Nate Berkopec asked about a way to check if has_many relation contains any unpersisted records without trying to load the relation from the DB:


💻 Ruby Cademy shared about using pick instead of pluck:

💻 Juraj Kostolanský shared a code sample about disabling CSP for ActiveStorage:

💻 Ismael Celis shared about composable structural validation in Ruby:

💻 Nate Hopkins shared a code sample about running Falcon with Rails:

Samuel Williams shared a link to Browser Configuration for localhost

💻 Igor Alexandrov shared about Rails method upcase_first:

💻 Brad Gessler shared about defining a method on the object:

Here are some interesting discussions about this:



💻 Josef Strzibny shared that Rails now supports Cache-Control immutable:

💻 Michael Koper shared about service objects:

💻 Dima Fatko shared about sidekiq-iteration gem being merged into Sidekiq:

💻 Maciej Mensfeld shared about implementing stateful, complex workflows as code in Karafka:

💻 Ruby Cademy shared a reminder of some of the most popular naming conventions in Ruby:

📐 Thinking about Code Design
📐 Koichi Sasada posted research of how many times each and map was called in all Ruby gems:


He also shared Top 1000 longest method names and the most used variable names.
📐 Nate Hopkins shared an idea that ActiveSupport::Cache::Memory store is under utilized pattern:

He gave an example:

📐 Nate Berkopec shared rails/activerecord/lib/active_record/relation.rb at 19eebf6d33dd15a0172e3ed2481bec57a89a2404 · rails/rails

📐 Mike Coutermarsh shared about Github Architecture:

💡 Around code (news, findings, books, and more - all about Ruby)
💡 Ruby On Rails shared a Rails 7.1 command to find unused routes, which may speed up boot time or help remove dead code

💡 Lucian Ghinda shares his finding on how Ruby had a dotenv gem before Javascript and that the concept originated from Heroku which was first adopted in the Ruby community.

💡 Chris Oliver shares a new update to noticed, which adds a recipients feature for defining recipients inside the notifier.

💡 Jason Fried shared about using Writebook:

❤️ Why Choose Ruby
❤️ Igor Alexandrov shared about Rails being the most efficient tool in terms of speed and final results:

❤️ Haseeb shared about how fast prototyping is with Rails:

🧰 Gems, Libraries, Tools and Updates
🆕 New Gems and Repos
🆕 Jacapo Beschi announced a new gem Homographic Spoofing: a new Ruby toolkit


🆕 Hiroshi SHIBATA published a new project called gem-codesearch - Set up a full text code search engine for rubygems mirror

🆕 Mike Perham welcomes contributions to his new background job benchmark suite job_roundup.

🆕 Kuba Suder shared his project remindbot - a Simple Mastodon command line bot for sending single DMs

🧰 Updates
🧰 Postmodern announced the release of Ronin 2.1.0 open beta that includes a lot of changes. Here is a list of new libraries supported:

🧰 Andrei Kaleshka announced a new version of actual_db_schema gem with new task to manually roll back phantom migrations.


🧰 Jeremy Evans announced a new version Tilt 2.4.0

🧰 Kasper Timm Hansen announced a new version of oaken - A fresh blended alternative to Fixtures & FactoryBot for dev and test data - version 0.7.0

👀 Keep an eye on
👀 Valentino Stoll is building RubyLang.ai: A fine-tuned LLM for Ruby

👀 Stan Lo has a new PR open tpo Provide code navigation features to erb files in Ruby LSP

🤝 Related (but not Ruby-specific)
🤝 Yaroslav Shmarov shows us how to make credentials diff readable in Git

🤝 Jason Fried talks about The Golden Path and how his favorite thing about designing software is designing the defaults

🤝 Justin Jackson discussed the marketing strategy employed by Aaron and Steve in selling their new course. Listen to his interesting analysis:

🤝 Jon Yongfook shared about focusing on what to build:

More content: 📚 🗞 🎧 🎥 ✍🏾
Marco Roth shared their slides from Brighton Ruby The Hotwire Landscape After Turbo 8 @ Brighton Ruby 2024
🗞 Newsletters
🗞 This Week in Rails published a newsletter on Immutable Rails Cache Header, Local Assigns in Strict Local Templates, Threaded Active Storage Mirror Service
🗞 Ruby Weekly published a new edition about In Ruby, a method without side effects should be public
🗞 Awesome Ruby Newsletter published Awesome Ruby Newsletter - Issue 423
🗞 Hotwire Weekly published a new edition about Week 26 - Hotwire Voting and Flash Messages, Django Components with Stimulus, and more!
🎧 Podcasts
🎧 The Rails Changelog published a new podcast episode 024: Structuring Rails Apps with Matt Swanson
🎧 Listen to the Bike Shed podcast The Bike Shed: 430: Test Suite Pain & Anti-Patterns
🎧 Jason Swett published a new podcast Matthew Kaliara, CTO and Co-Founder at Rescale - The Code with Jason Podcast
🎧 Remote Ruby published a new episode about Desks, Deployments, and Databases
📽️ 🎥 Videos
Screencasts
🎥 Pascal Laliberté published a new video about Hotwire's Morph has a small gotcha. If nothing changes on the page as you click a button or submit a form, you might have to remove a turbo frame.
🎥 Dean De Hart published a new video about Inertia JS on Rails Made Easy with React and Tailwind
🎥 Yaroslav Shmarov published Sell access to a Github Repository. Sell your code! and about Add a "Sign in with Apple" button to your app!
🎥 Confreaks, Llc shared a playlist of Blue Ridge Ruby 2024
🎥 Max Vel Dink shared his talk from Blue Ridge Ruby 2024 | Refactoring: The ASMR of Programming
🎥 Dave Kimura published a new video about HotwireCombobox
🎥 Graceful.Dev published a new video about Ruby Symbol Literals
🎥 Rails Conf shared RailsConf 2024 Recap
🎥 Top End Devs published a new video about Ruby as a sleeping giant for AI application development with Scott Werner
🎥 Samuel Williams published a new video about Real time page reloading during editing using live WebSockets
🎥 Drifting Ruby published a new video about Using LLMs to Generate Tags
🎥 Jason Swett published a new video about Capturing the Leaky Stream Bug in a Test - Live Coding on SaturnCI
✍🏾 Articles
What’s new 🆕
🆕 Ben Greenberg published an article about Rails Caching With Couchbase in Under 5 Minutes
🆕 Eminkel published a new article on Easy Postgres backups
🆕 Jeffery Morhous published an article about API versioning in Ruby on Rails
🆕 Michael Chaney published an article about Refactoring fix_encoding
🆕 Augusts Bautra published an article about TIL custom order with .in_order_of
🆕 Sara Jackson published an article A pragmatic guide for adding React to an existing Rails application (and still use Hotwire)
🆕 Michael Chaney published an article about Inserting and Selecting New Records - One Query
🆕 Remi Mercier published an article about Add comments to your tables columns
🆕 Michael Chaney published an article about Inserting and Selecting New Records - One Query and Making Common Table Expression SQL More Railsy
🆕 Max Mulatz published a new article about published an article about How even the simplest RAG can empower your team
🆕 Steve Polito published an article about A pragmatic guide for adding React to an existing Rails application (and still use Hotwire)
🆕 Andres Chacon published an article about ActiveRecord::Enum persisted in a string field. Is it a bad idea?
🕵️ Deep-Dive
🕵️ Stefan Wienert published an article about Using 'Packs' (a.k.a Packwerk) as code organization / Engine alternative' - Starting point and recipes
🕵️ Ajithkumar P S published an article that dives deep into the asset pipeline of Rails 7 so, Do you know how the delivery of assets works in your Rails 7 app?
🕵️ Jp Camara published a new article - Your Ruby programs are always multi-threaded: Part 2
🕵️ Urszula Sołogub published an article about The Deadly Sins in RoR security - SQL Injection
How-TOs 📝
📝 Learn How to fix a segfault in Ruby from Dmitry Daw.
📝 Ryan Bigg published an article about Decreasing Ruby app build times
📝 Samuel Williams published a guide on How to get started with Async::HTTP
📝 Akshay Khot published an article on How to Access Raw POST Data in Rails
📝 Yusuke Endoh published a new article about RubyでSlackのボットを書く方法(なるべく自力で) - まめめも / How to write a Slack bot in Ruby (preferably by yourself)
📝 Rails Designer published an article about How to add “Save and add another” feature to Rails apps
📝 Daniel Nolan published an article about Using OpenAI ChatGPT Assistants API to Build a Landscape Assistant
Related
✍️ Karl Oscar Weber published an article about Capsule - A Startup in a box
✍️ Keshav Biswa shared his talk slides on Journey of writing a programming language