

Discover more from Short Ruby Newsletter
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:
π§°Β Gems, Libraries, and Updates
π€ Related (but not Ruby-specific)
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.

π Miguel Michelson announced the open source version of rauversion/rauversion-ror: Self hosted music industries

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

π Fukuoka Ruby shared FUKUOKA Ruby Award 2024 - η¦ε²‘ηRubyγ»γ³γ³γγ³γγγΈγγΉζ―θδΌθ°

π 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:












π Julian Rubisch shared a new challenge for Hotwire Club Challenge 11: Turbo Frames - Scroll Position Restoration | Patreon

π 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:

π Pragmatic Bookshelf shared an update for the book High Performance PostgreSQL for Rails

πJoel Drapper shared that feedbin is using Phlex β Fast, Object Oriented View Framework For Ruby

π 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:

π Rafael FranΓ§a shared Development containers

π 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:

π§° Hiroshi Shibata announced a new release for ruby-build 20230914 Β· rbenv/ruby-build
π§° 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:
Go Rails published a video about Rails 7.1 Authentication From Scratch (Example)
Deepak Mahakale published a new article about Whatβs new in Rails 7.1
Rashmi published a new article about Rails 7.1 - authenticated_by
Emanuel Hayford published a series of articles about Rails 7.1: Part I, Part II, Part III
π§° 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:
π§° Jason Meller submitted a PR that has been merged β Add Bun support by terracatta Β· Pull Request #49241 Β· rails/rails
π§° Maciej Mensfeld announced they released the UI for karafka

π§° Nicolas Buduroi shared they discovered a new gem trace_location: πHelp you get reading the huge open souce libraries in Ruby and trace its source locations
ππ§° 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

π§° Bozhidar Batsov shared Release RuboCop 1.56.3 Β· rubocop/rubocop
π§° 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
ππ§° Jeremiah Parrack published a new gem revise_auth-jets - A pure Ruby on Jets authentication system like Devise
π§° Chris Oliver announced that Jumpstart Pro now runs on Rails 7.1:
π§° Jeremy Evans announced a new version for Tilt β Tilt 2.3.0 Released Β· jeremyevans tilt Β· Discussion #9

π§° 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

π§° Greg Molnar shared a PR for Rails about Ignore env files (except templates) by dhh Β· Pull Request #49278 Β· rails/rails

π§° Brad Gessler shared PR for dockerfile-rails about Generates a Dockerfile for a sqlite production environment if Litestack is present

π€ 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
π Andy Croll published a new One Ruby Thing β Express yourself clearly with positive? and negative? for numbers
π Greg Molnar published a new edition about This Week in Rails: 7.1 beta release, Bun support and more!
π Ruby Weekly published an article about A Ruby 3.3 preview and Rails 7.1 beta
π Awesome Ruby Newsletter published an article about Issue 382 - Itβs dangerous to go alone: take our guide to the βIDEALβ HTTP client! (With examples in Ruby)
π§ Podcasts
π§ Creston Jamison published a new podcast about When Should You Use Background Jobs? | Rubber Duck Dev Show 99
π§ Code And The Coding Coders Who Code It published a new podcast about Episode 28 - Matt Swanson
π§ Code And The Coding Coders Who Code It published a new podcast about Bonus Canadian Football Episode
π§ Jess Brown published a new podcast about Starting a Business in a Snowstorm | 2min snip from IndieRails
π§ The Ruby On Rails Podcast published a new podcast about The Ruby on Rails Podcast Episode 487: Building the Rails World Application with Shami Tomita and Eric Halverson
π§ Ruby Rogues published a new podcast about Stimulus, Hotwire, and Turbo, Oh My! - RUBY 607 - Ruby Rogues - Top End Devs
π§ Jason Swett published a new podcast about Code review with Jonathan Bennett (tests, namespaces)
π§ The Bike Shed published a new episode about The Bike Shed: 401: Making The Right Thing Easy
π½οΈ π₯ Videos
Talks
π½οΈ Hanami Mastery shared a new video about Hanami 2.0 an alternative to Rails - Daniel Nguyen from Ruby Australia
Screencasts
π₯ Chris Oliver published a new video about Rails 7.1 Authentication From Scratch (Example) | GoRails
π₯ 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 Khot 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 Khot 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.