Short Ruby News - Edition #36

Briefly about everything happening in Ruby world - week 13 of 2023

Notice:

Starting next week, I will split the newsletter into two sections and thus send two separate newsletters. Please read more about the why and how here

You can jump directly to a section:

More content: 🎥 🎧 🗞 (courses, books, articles, podcasts, videos, and newsletters)

🤗 Founding Members supporting this newsletter

👐 Our Community

A series of new Ruby versions were released last week: Ruby 2.7.8, Ruby 3.0.6, Ruby 3.1.4, Ruby 3.2.2 to fix two vulnerabilities:

Also, please notice Ruby 2.7 reached EOL:

👐 Friendly.rb conference announced a rolling CFP until 1st July. Checkout the website at friendlyrb.com

👐 Ruby Unconf shared more details about what an unconference means. Check out their website at 2023.rubyunconf.eu

👐 Rails Conf announced that the schedule for RailsConf 2023 was published. Checkout the agenda at railsconf2023.sessionize.com

👐 Andrew Hodson announced that Go Rails would start monthly Office Hours - Join their Discord to participate

🤞 Enjoy the free subscription to Short Ruby Newsletter! Subscribe to receive it weekly in your inbox:

Becoming a paid subscriber can support this Ruby community for just $1.5/week ($6.5/month). 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

👉 All about Code and Ruby

👉 Postmodern shared about using Proc#[]

Here is the documentation for Proc#[] alias of Proc#call in Ruby 3.2

👉 Kay Rhodes shared a code sample showing how to define methods inside methods in Ruby:

He then added:

and Noel replied with an explanation:

👉 Aaron Patterson shared a code sample showing how to use RubyVM to change the code at compile time:

👉 Shane Becker asked who wants to help and fix the issue Add support for create_operator · teoljungberg/fx

👉 Salma Elbadawi shared a thread with tips about Ruby data types:

👉 Noel Rappin shared about how File.join works:

Thanks to Keith Gable's suggestion here, I found this conversation on Twitter where Arron Patterson shared a similar reflection about File.join in 2017 when he discovered and fixed a bug related to File::SEPARATOR. Ryan Bigg shared the location where the separator is defined in the source code.

👉 Joel Drapper shared a code sample in a Github issue showing how to use Dry::Initializer with Phlex:

👉Jason Swett asked about the systematic approach to performance-profiling test suites:

Among the replies, Nate Matykiewicz shared a tip to disable logging while running tests:

👉Vinicius Stock announced that VSCode now includes Ruby LSP in their documentation about Ruby with Visual Studio Code

👉Shiva Kumar shared a thread about another Rails design pattern called the decorator pattern

👉Jeremy Smith asked about naming the state of the app when transitioning:

He then added:

It would be best if you read the conversation in the thread. There are some name proposals and solutions about how to deal with it. Here are some naming proposals:

  • “transitional state”

  • “liminal”

  • “StranglerFigApplication”

  • “LegacyDisplacement”

  • “Transitional Architecture”

👉 Kaka Ruto shared a code sample showing how to create 135 million records:

They later added:

👉 Nate Hopkins shared a code sample showing how to use ActiveRecord to configure an in-memory SQLite database:

👉 Matt Swanson shared a code sample showing webhook processing:

👉 Greg Navis shared a Ruby code that is valid (please read this as an April Fool's Day joke)

If you like this content and want to receive it every week by email

🧰 Gems, Libraries, and Updates

🧰 Carl Mercier published a demo app showing a simple way to display a model with Hotwire cmer/ultimate-turbo-modal:

🧰 Marco Roth announced an update for Phlexing.fun by launching version 0.4.0, read the release notes 

🧰 DHH announced a new release of mrsk Release v0.10.0 · mrsked/mrsk 

🧰 Prabin Poudel announced they added their first open-source PR to boring-generators. Check Adds Overcommit generator for RuboCop

🧰 Heartcombo announced a new release of Devise. Read the changelog

🧰 Jeremy Evans announced a new version of Sequel v5.67.0 Read the changelog

Marian Posăceanu also shared a PR from yjit-bench (a small set of benchmarks and scripts for the YJIT Ruby JIT compiler) that Improve the Sequel benchmark to avoid many singleton classes. Here are two small benchamarks shared in the discussion from that PR:

🧰 Lázaro Nixon announced that authentication-zero added an email invitation strategy Read the changelog

🧰 Tim Riley announced a series of PRs about implementing views in Hanami 2:

🧰 Justin Searls announced a new version of standard v.1.26.0 Read the commit

🧰 tailwindcss-rails was updated to version 2.0.27 that now supports Tailwind CSS v3.3.1 

🤝 Related (but not Ruby-specific)

🤝 Paul shared a tip about how to report time for how long a process took

🤝 Ernesto shared about how to help open-source projects:

🤝 Paul Mucur shared about the difference between urgency and importance:

🤝 Chris Wanstrath shared a thread about the Github pricing model and free repos:

🤝 Eleftheria Batsou asked about anxiety for an interview:

🤝 Donn Felker asked about what is the first thing one does when joining a new codebase:

Here are just three of the answers received, but you should read the replies as they contain more strategies about how to get familiar with a new codebase:

  • “Read documentation if it exists, run tests and search about unfamiliar technologies and patterns” (@Zahra_HY)

  • “Intentionally break something and look at the stacktrace go brr. Can usually tell me more about the codebase than any docs can.” (@IanIsSoAwesome)

  • “Read by refactoring. Delete all the refactorings when I'm done” (@SDiamante13)

If you like this content and want to receive it every week by email:

More content: 🎥 🎧 🗞

Courses and Books

👀 Pragmatic Bookshelf shared that Programming Ruby 3.2 has an update:

👀 Graceful.Dev announced their course about Reproducible Development with Containers is now free:

🗞 Newsletters

🗞️ Ruby Weekly published a new edition: Progress on Ruby's newest parser

🗞️ Ruby LibHunt published a new edition of the Awesome Ruby Newsletter

Podcasts

Videos

Talks

📽️ Ayush shared that the video of their presentation about Turbo Native at The London Ruby User Group has been published

Screencasts

🎥 Aaron Patterson published a video about working on their LSP concept: LSP Hacking

🎥 Avo published a video showing how to use the new release features Avo 2.29 - Search result path and better mount point discovery

🎥Deanin published new episodes:

Articles

What’s new

How-Tos

Deep Dives:

  • Akshay published a new deep dive about Sessions in Rails: Everything You Need to Know“In this post, we’ll learn about Rails sessions, including what is a session, why we need them, and why they're so important. I’ll also take you behind the scenes and show you how Rails implements sessions and where the `session` method actually comes from.”

  • Paweł Dąbrowski published a deep dive about Delegating things in Ruby“This article is a deep dive into the delegation with Ruby to understand how we can implement it and when. There are a few ways to achieve delegation and it is good to know when to use which”

🤗 Founding Members supporting ShortRuby

Read more about what is a Founding Member or about Why pay for ShortRuby newsletter

Reply

or to participate.