Short Ruby News - Edition #27

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

Jump directly to a section:

👐 Our Community

👉 All about Code and Ruby

🧰 Gems, Libraries, and Updates

🤝 Related (but not Ruby-specific)

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

You can support keeping this newsletter free and sustainable for ~1.5$ per week (actually 6.5$/month) if you can afford it:

Read Why subscribe to a paid plan for a longer explanation.

👐 Our Community

👐 I was invited to the Rubber Duck Dev Show to talk about Short Ruby Newsletter.

🎧 Listen to the conversation on The Rubber Duck Dev Show - episode 71

👐 Noel Rappin shared they published an update for Programming Ruby 5th edition:

👐 Brighton Ruby Conference shared buying tickets are available now:

👐 Mario shared a new conference Helvetic Ruby in Switzerland in Europe:

Follow @helvetic_ruby@ruby.social to receive updates about the conference.

👐 Aaron Patterson started a Ruby Glossary:

👐 The Rubber Duck Dev Show stated that Rails 7.1 would be a giant leap:

Add to this something that Andrew Culver shared previously:

Or this perspective shared by Cezar Halmagean:

👉 All about Code and Ruby

👉 Joel Drapper started a conversation by asking:

He shared more details about the problem he was trying to solve:

And then Benoit Daloze answered with:

If you are interested in this, you should read the entire conversation (elk.zone link)

👉 Tom Stuart shared a piece of code showing a Zeitwerk fork created by Chris Salzberg that can do autoload in namespaces:

Ryan Davis replied with an example showing how to use Kernel#load to achieve something similar:

👉 Joel Drapper shared why it is good to have a `call` method because it plays nice with procs, lambdas, and methods:

👉 Pascal Laliberté shared a funny take about the Nil object in Ruby:

👉 Aaron Patterson shared they implemented Red Black Tree in Ruby, making use of pattern matching:

Here are two short snippets from the code gist he shared:

👉 Joel Drapper shared a downside of using string-based templating:

He also replied with two possible solutions:

👉 Tom Stuart shared a worry about missing default implementation for Object#deconstruct_keys:

He linked to a discussion (now closed) on the Ruby tracker

👉 Simon George shared a code sample about using to_proc to map a list of data with objects:

deSilva replied with an alternative:

👉 Denis Defreyne shared a take about simple Service Objects that can be replaced with just a method:

👉 Paul Mucur shared a code sample showing how they used pattern matching:

👉 Lucian Ghinda started a discussion on ruby.social and twitter about using `and`:

There are a lot of nice replies and proposals on both threads. Here are some of them:

On the same topic about using `and` and `or` in control flow and see some helpful code samples, here are two resources to read:

👉 Lucian Ghinda shared a code sample showing that endless methods don’t work with `and`:

👉Dorian shared a short code sample showing how to reset loaded records from the association:

👉Josef Strzibny shared a short code sample and explanation about changing the ActiveRecord group when needed:

👉 Jorge Manrubia shared some code snippets from Hey where he implemented memoization:

In the same conversation Xavier Noria shares a link to a minitest-focus code where they implemented `focus` keyword as a kind of “decorator” that can be defined above the method to be focused:

With this, the following code will work:

👉Eric Berry shared a code sample that helps access instances of models for development purposes:

👉Josef Strzibny shared a thread about how to work with localization in Ruby on Rails:

👉Janko Marohnić shared an essential perspective about Devise

He then added a link to a podcast with the previous Devise maintainer:

On the other side, there is a tweet from Carlos Antonio (one of the Heartcombo maintainers) sharing this:

In case you are looking for alternatives there were shared the following:

👉 バコペックネイト shared how to think about the performance of iterating over objects in Ruby:

👉 Steve Polito shared that Rails provides a way to eager load an association while limiting its result set:

👉 Wiktor Plaga shared a piece of code showing how to use Symbol#with

👉 Alohamori shared in a comment on Reddit some code samples about using implicit parameters and rightward assignment:  

If you have read so far and you like the content, maybe you take into consideration sharing this and subscribing:

🧰 Gems, Libraries, and Updates

🧰 Caleb Hearth published a new gem called mentionable that will implement Webmention (“Webmention is a simple way to notify any URL when you mention it on your site”):

You can see an example of how to use it in the article he published This Gem is Mentionable

🧰 Joel Drapper announced a new release of Phlex.fun version 1.2. Read the highlights of this release

🧰 Bozhidar Batsov announced they released a new version of Rubocop: Release RuboCop 1.44 · rubocop/rubocop

🧰 Greg Navis announced their gem now reached version 1.0.0 gregnavis/transient_record

🧰 Marco Roth shared a new npm package called current.js that works well with Rails Current Attributes

🧰 Samuel Williams shared that the latest release of webrick supports full bidirectional streaming: Better support for connection upgrade and bi-directional streaming

🧰 Ruby Lib Hunt shared the open-source repository for OpenStreetMap Website

🧰 Hearcombo shared they released version 5.2.0 for SimpleForm gem with support for Rails 7 and Ruby 3.2

🧰 Karol Bąk  announced they made public the repository for shinygems.dev which can be found at kukicola/shiny_gems - it is a Hanami 2 app.

🤝 Related (but not Ruby-specific)

🤝 Andreas Klinger shared a lovely quote about new ideas:

🤝 Dave Paola shared a thread about hiring juniors:

You should read the thread. Here is one thing I selected from it:

🤝 Rose W shared great advice about pursuing objectives:

🤝 Greg Brockman shared an insight about velocity:

More content: 🎥 🎧 🗞

Newsletters

🗞 Joe Masilotti published a new edition of Hotwire dev newsletter - edition 21

🗞Greg Molnar shared a new edition of This Week in Rails is out: New AssumeSSL middleware, raise on missing translations everywhere, and more

🗞️ Ruby Weekly published a new edition: Packing a Ruby 3.1 app into an executable

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

🗞 Ruby Radar published a new edition Ruby Radar #87 - Brighton on the Horizon

Podcasts

🎧 Andy Croll published a new episode of Chats in the Cupboard: Back into People Management

🎧 FullStack Ruby published a new episode about Hotwiring Multi-Platform Rails Apps with Ayush Newatia

🎧 Brittany Martin shared a special episode of The Ruby on Rails Podcast with the entire Hanami team: Rubyconf @ Home: Hanami Core Team

🎧 Jason Swett published a new episode 172 - Collin Jilbert, Developer at GoRails - The Code with Jason Podcast

🎧 Ruby For All published a new episode about Common Pitfalls for Junior Ruby on Rails Developers | Ruby for All | Episode 27

Videos

Talks

📽️ Jason Swett published two episodes from Code with Jason meetup:

📽️ Drifting Ruby shared their video version of This Week in Rails - Jan 27th, 2023

Screencasts

🎥 Hanami Mastery published a new screencast about HTML from markdown made simple!

🎥 Drifting Ruby published a new episode Episode 385 - Zipping Files | Drifting Ruby

🎥 Deanin published a new video about ChatGPT Helped Me Make An OpenAI | Ruby On Rails 7 Tutorial

🎥 Matt Swanson shared a video on Twitter about how to build a tiny Rails helper to display Twitter-style metrics like "1.2K ❤️" or "12.7K followers"

🎥 Cezar Halmagean shared a quick video on Twitter showing a quick vim + rubocop tip.

🎥 Janko Marohnic shared a live stream showing how to integrate WebAuthn into Rails with Rodauth

🎥 Deanin published a new episode about This New Devise API Gem Makes User Auth So Simple! | Ruby On Rails 7 Tutorial

Articles

What’s new

Emmanuel Hayford published the 3rd part of his series about Ruby on Rails 7.1: An Overview Of Ruby on Rails 7.1 Features. Part III.

How-Tos

Deep Dives

More general

All issues