Short Ruby News - Edition #27

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

Jump directly to a section:

πŸ‘ Our Community

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 @[email protected] 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:

πŸ‘‰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

🧰 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

πŸ—žοΈ 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

Podcasts

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

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!

πŸŽ₯ Cezar Halmagean shared a quick video on Twitter showing a quick vim + rubocop tip.

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

Reply

or to participate.