👉 Short Ruby News - Edition #59

Discover the world of Ruby in this comprehensive newsletter covering week 36 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.

You can jump directly to a section:

More content: 📚 🗞 🎧 🎥 ✍🏾 (articles, podcasts, videos, newsletters)

[Sponsor⬇]

Stop spending countless hours screening developers! Create tech assessments in seconds and learn who the best candidate is through Revelo AI-powered insights. 100% free.

🚀 New Products

🚀 Ruby Cademy announced they launched a new course on Rubycademy:

🚀 Jason Swett launched a new section Let's talk - Code with Jason where he invites us to a talk:

I always enjoy meeting my fellow programmers. I’d love to have a call with you to get to know you. If that sounds fun to you, fill out the form below.

🚀 Luke launched Markie 

📅 Events

📅 Sergy Sergyenko shared that people can ask questions and the most liked one will be answered by Matz at Euruko:

👉 All about Code and Ruby

👉 Emmanuel Hayford shared a tip about Rails 7.1 enum validation:

[Promo Content⬇]

👨‍✈️Candidates' skills testing on autopilot - let Revelo guide you through it!

👉 Kirill Shevchenko shared about how using module in Ruby simulates multiple inheritance:

👉 Ruby For Good shared that the majority of UK Government websites are built with Ruby on Rails → Conventions for Rails applications - GOV.UK Developer Documentation

👉 Chris Oliver shared a tip about Rails 7.1 normalize:

👉 David Heinemeier Hansson shared a post about companies using Ruby on Rails that generated a lot of conversations about which company uses or not:

I am going to include some replies here but I think if you want to get a better image of the discussion, you should read yourself the replies (read on nitter) and the quotes:

👉 Vincent Rolea shared a tip about rendering partials within a partial layout:

[job ad from this edition partner Revelo.com] 🚀 [Remote][Latin America] Get a full-time, long-term remote job and a dollar salary in amazing US tech companies. Apply at careers.revelo.com

👉 Rob Zolkos shared a tip about rendering a different view template if the user is on a phone or other devices:

👉 Scott Watermasysk asked about how people are managing comments that specify when the code can be cleanup:

Among the possible solutions it was suggested to use normal TODOs and manage them with bin/rails notes or add the events in a shared calendar or use the gem todo_or_die. Here an alternative solution by Petrik De Heus:

👉 Noel Rappin shared an update about the Programming Ruby 3.2 book:

👉 Agnieszka Małaszkiewicz shared their slides from Wrocloverb about Ruby Rendezvous: Method Call, Proc, and Beyond

👉 William Kennedy shared they noticed a few commits about Strada:

👉 Jeanro announced that on Ruby on Rails Jobs - France et Europe all Junior profiles can be seen for free:

👉 Leandro shared about how timestamps in Ruby work depending on the platform:

👉 Gabriel shared how SQlite can be used to merge CSV files faster:

👉 Mohammad A. Ali shared a post about more simplicity being needed in Rails:

👉 Stephen Margheim shared a checklist to see if you should use SQLite or not with Rails:

👉 Brad Gessler shared about Sitepress performance

👉 Matt Swanson shared about when the rule of not having data changes in migrations would contradict the actual way deploys are happening:

👉 Nate Berkopec shared a tip about web performance:

👉 Matt Swanson shared a code sample about CurrentAttributes:

👉 Greg Navis shared a thread about Ruby Heredocs:

👉 Fast Ruby.Io shared a tip about providing column type in migrations:

👉 Ruby Cademy shared a tip about dependency injection:

👉 Rob Zolkos shared that reading the logs is important:

👉 Josef Strzibny shared about the number of contributions for Rails:

🧰 Gems, Libraries, Tools and Updates

🧰 Postmodern announced that Ruby 3.3.0-preview2 is available on ruby-install:

🧰 Ruby on Rails announced the release of Rails 7.1.0.beta1:

There are some posts about this but you will find many more in this newsletter:

🧰 Mike Perham shared a new version for Sidekiq, read the release notes for Sidekiq, Sidekiq Pro and Sidekiq Enterprise:

🧰 Avo announced a new release for both Avo 2 and Avo 3:

🧰 Maciej Mensfeld announced they released the UI for karafka

🆕🧰 Dmitry Tsepelev announced a gem called “rubocop_director”, read more about how to use it to refactor in this article:

🧰 Vinicius Stock announced a new version for Release v0.10.0 · Shopify/ruby-lsp

🧰 Donal McBreen submitted a PR that was merged to Kamal Asset Paths By Djmb · Pull Request #449

🧰 Yuichiro Kaneko announced a new version of lrama Release v0.5.6 · ruby/lrama 

🧰 Chris Oliver announced that Jumpstart Pro now runs on Rails 7.1:

🧰 Espen shared that we need to upgrade ImageMagick due to a security issue Security: shell escape using ghostscript · Issue #4172 · ImageMagick/ImageMagick (see instructions about how to override ImageMagick settings)

🧰 Kevin Newton announced a new version for YARP → Release v0.12.0 · ruby/yarp

🤝 Related (but not Ruby-specific)

🤝 Samuel Williams asked about 101 HTTP status code:

and Roy T. Fielding answered:

🤝 John Nunemaker shared a PostgreSQL code sample about calculating distance between two strings (see the gist here or documentation at F.17. fuzzystrmatch):

🤝 Adam Wathan shared about the importance of being part of a group:

🤝 Nate Berkopec shared about scaling

More content: 📚 🗞 🎧 🎥 ✍🏾

🗞 Newsletters

🗞 Ruby Weekly published an article about A Ruby 3.3 preview and Rails 7.1 beta

🎧 Podcasts

📽️ 🎥 Videos

Talks

📽️ Hanami Mastery shared a new video about Hanami 2.0 an alternative to Rails - Daniel Nguyen from Ruby Australia

Screencasts

🎥 Lázaro Nixon published a new video about Creating native apps with turbo

🎥 Dean De Hart published new videos about:

✍🏾 Articles

What’s new 🆕

Mike Perham published a new articlea bout Ruby HTTP Server from scratch | Mike Perham → “Recently I decided to add support for Kubernetes HTTP health checks to Sidekiq Enterprise. This means, within each Sidekiq worker process, we need to implement an HTTP server which listens on port X and simply returns 200/OK if the process is alive”

Dmitry Tsepelev published a new article about Ruby goes to the movie theater: directing the refactoring of your application “This post introduces a method I use to refactor big applications. I want the process to happen in a predictable manner and make sure that important things are addressed before others”

Brad Gessler published a new article about Sqlite & Rails in Production “When deploying a Rails application to production, its rare to question the idea of running a Postgres or MySQL database to persist data and Redis for caching, background job processing, and WebSockets, but what if it could all be done without running these services?”

Deepak Mahakale published a new article about What’s new in Rails 7.1 → “Let’s see what is new in rails 7.1”

Rashmi published a new article about Rails 7.1 - authenticated_by → “In Rails 7.1 authenticated_by method has been introduced”

Gabriel Chuan published an article about Merge Csv Files In Ruby Efficiently Dev Community → “Ever had issues merging CSV files in Ruby? Use sqlite instead! Theoretically, it can handle large csvs, and is very fast”

I published an article about Use Gpt 4 To Refactor A Simple Html Page“Utilizing Cursor IDE and GPT-4 for logo placement, spacing adjustment, equal column height, and group hover element display”

Harrison Broadbent published an article about Refactoring From Feature Specs To System Specs“In it, I break down the difference between system specs and feature specs in RSpec and Rails, and walk you through refactoring your feature specs to system specs”

Prasanth Chaduvula published an article about Set And Restore Public Attributes Around A Block Using Object#With“Object#with helps to streamline and elegantly improve this technique. It is an addition to the Ruby Object class that offers a simpler method of managing object states”

Deep Dives 🔍

Shalvah published an article about Exploring Concurrent Rate Limiters, Mutexes, Semaphores → “This is a dump of my learnings and experiments while going down a little rabbit hole (…) I was studying Sidekiq's page on rate limiters (…) So I asked myself, how would I implement a concurrent rate limiter?”

Matheus Richard published a new article about Mining Gold in Digital Conversations → “Gold Miner is an app I created to transform interesting conversations we have at thoughtbot into blog posts”

Akshay Knot published a new article about How To Debug And Step Through Rails Codebase → “Do you want to read the Rails source code for a deeper understanding of the framework, but feel intimidated by the sheer size of the codebase, or don't know where to start?”

Artur Petrov published an article about It’s Dangerous To Go Alone: Take Our Guide To The “Ideal” Http Client!“This guide is about understanding the best practices for any HTTP client and how to leverage them to your advantage. This guide is not limited to backend applications (although most of the examples are in Ruby), the same principles are applicable for any language and platform, even the frontend”

Paweł Urbanek published an article about How To Improve Rails Caching With Brotli Compression“In this blog post, I’ll describe optimizing the Rails caching mechanism using the Brotli compression algorithm instead of the default Gzip. I’ll also discuss a more advanced technique of using in-memory cache for extreme performance bottlenecks”

Ariel Juodziukynas published an article about Exploring Ruby Warnings Fast Ruby.Io | Rails Upgrade Service“In this article we will explore how to use them, how to analyze them, and some examples of interesting warnings that can be really helpful during upgrades”

Akshay Knot published an article about The Complete Guide To Working With Cookies In Rails“This post covers almost everything you need to know about HTTP cookies in the context of Rails. We'll explore what a cookie is, why we need it, how to set & get a cookie, how to restrict cookies to a particular domain/path, prevent JavaScript access, how to sign & encrypt cookies, and much more”

How-Tos 📝

Jeff Dwyer published an article about Let's Talk Tagged Logging Vs Structured Logging In Ruby Or Rails “What is Tagged Logging? Should you be using it? What libraries support it? Is it the same as structured logging?”

Alkesh Ghorpade published an article about Ruby 3.2 Introduces Data, A New Core Class For Immutable Value Objects“Ruby 3.2 introduces Data, a new core class for immutable value objects. Value objects are a powerful tool for improving the quality of code. They are easy to understand and use and can help improve the readability and maintainability of code by making it more concise, consistent, and easier to reason about”

Davide Santangelo published an article about Exploring The Null Object Pattern In Ruby Dev Community“The Null Object Pattern is a behavioral design pattern that helps eliminate the need for explicit null checks in your code. It is particularly useful when dealing with missing or optional objects in your application. In this article, we will explore the Null Object Pattern in the context of Ruby”

Julian Rubisch published a new article about Using Turbo Frames for Navigation - RailsReviews → “Navigating the intricacies of Turbo Frames can be both rewarding and challenging. These custom HTML elements present a method to refine the user experience on web applications. Let's explore some patterns and use-cases that can be achieved with Turbo Frames”

Paweł Urbanek published a new article about How to Improve Rails Caching with Brotli Compression “I’ll describe optimizing the Rails caching mechanism using the Brotli compression algorithm instead of the default Gzip. I’ll also discuss a more advanced technique of using in-memory cache for extreme performance bottlenecks”

Lucas Barret published a new article about ActionPolicy , GraphQL and Rails “I wanted to create an article showing you how simple yet powerful ActionPolicy the Gem he develops for Authorization”

Avi Flombaum published a new article about Turbo Forms, Ruby on Rails Drag-Drop: Pt.1 → “In this series of posts we're going to build a Drag and Drop feature to add music tracks to playlists”

Stephen Margheim published a new article about Enhancing your Rails app with SQLite Array columns → “today I want to show you that it is possible to build on top of SQLite’s primitives to provide matching behavior for one of my favorite features of Postgres—array columns” and Local snapshots.

Maful Prayoga published an article about Build Drag And Drop With Rails Hotwire → “Today, we're diving into something super cool: adding drag-and-drop functionality to your Rails app, all powered by the magic of Hotwire”

Paweł Pacana published a new article about Six ways to prevent a monkey-patch drift from the original code → “Monkey-patching in short is modifying external code, whose source we don’t directly control, to fit our specific purpose in the project. When modernising framework stack in “legacy” projects this is often a necessity when an upgrade of a dependency is not yet possible or would involve moving too many blocks at once”

Patricio Mac Adden published an article about Talking To Hostile Ap Is | Sinaptia“A hostile API is an API that gets in your way, that fights you when you're trying to use it. That seems to be against you using it”

Please consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody:

If you consider upgrading and want more information, please read Why to subscribe to paid.

Reply

or to participate.