- Short Ruby Newsletter
- Posts
- Short Ruby News - Edition #27
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:
π 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:
Unban and and or control flow operators PR by Victor Shepelev in Ruby-style-guide
This blog post from Victor Shepelev about Good Ruby Idiom: and/or operators
π Lucian Ghinda shared a code sample showing that endless methods donβt work with `and`:
π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:
π€ 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
Hunter Johnson published an article about What are Materialized Views? A 5-Minute Introduction
Caleb Hearth published an article showing how to use mentionable gem to get mentions from web: This Gem is Mentionable
Rails Links shared an article about how to configure Dokku: the best way to host personal projects
Julija Alieckaja published an article about Unleashing the Power of Fibers for Background Jobs
The Ruby Dev shared an article about Creating a secure API architecture in Rails with few example
Deep Dives
Jake Zimmerman published an article about Problems typing equality in Ruby
Davide Santangelo shared an article about My Adventure With Async Ruby
More general
Steve Sewell published an article about Optimal Images in HTML
Reply