Short Ruby Newsletter

Share this post

Short Ruby News - Edition #30

newsletter.shortruby.com

Short Ruby News - Edition #30

Briefly about everything happening in Ruby world - week 7 of 2023 (web edition)

Lucian Ghinda
Feb 20
1
Share this post

Short Ruby News - Edition #30

newsletter.shortruby.com

You can 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)

๐Ÿค— Founding Members supporting this newsletter


You can subscribe for free

Or you can consider upgrading to paid

Investing in the Ruby Weekly Newsletter as a paid subscriber is a valuable way to support the community around you. For ~1.5$/week (6.5$ per month), you can support its growth and ensure that high-quality information about the latest developments in Ruby continues to be available to everyone, both paying and non-paying subscribers alike.

Support the newsletter for ~1.5$/week

If you consider upgrading and want more information, please read Why to subscribe to paid


๐Ÿ‘ Our Community

๐Ÿ‘ Tiago Casanova asked an important question in our community:

Source: /u/tiagocasanovapt

๐Ÿ‘Helvetic Ruby announced the Call for speakers is open:

Source: @helvetic_ruby@ruby.social

๐Ÿ‘ Aaron Patterson shared that Mastodon is now running on Ruby 3.2 (check the PR):

Source: @tenderlov@mastodon.social

๐Ÿ‘ Dave Paola shared a possible risk about how to make it so that we listen not only to good news but also we listen to critique and discuss it openly:

Source: @dpaola2

The thread has some nuances, and it is recommended that you read it in full and with good intentions :)

Here is a short discussion from the replies:

Source: @robzolkos and @dpaola2

๐Ÿ‘ ruby30th announced the list of lightning talks had been released.

Check the list here (or in English translated by Google here)

Source: @ruby30th

๐Ÿ‘ Drew Bragg shared that the next Philly.rb that will happen on 21 February will be online and will have as guest Joel Drapper, the creator of Phlex

You can register here

Source: @DRBragg

๐Ÿ‘Emmanuel Hayford celebrates the effort made by Petrik de Heus and zzak to improve ils Guides:

Source: @siaw23

๐Ÿ‘ Ruby Unconf announced the dates for Ruby Unconf 2023:

Source: @RubyUnconfEU

๐Ÿ‘‰ All about Code and Ruby

๐Ÿ‘‰Nate Berkopec shared a quick heuristic to decide between doing a call to DB or using Ruby:

Source: @nateberkopec

He added an example:

Source: @nateberkopec

โœ‹ ๐Ÿ‘€ If you're a company or manager looking to hire top Ruby on Rails talent, I'd like to introduce you to RailsDevs (referral link). This unique platform puts the power back in the hands of developers by allowing them to post their profiles and empowering companies to reach out to them. I believe in the value RailsDevs can bring to the hiring process, and I'm confident you will.

Go to RailsDevs.com


๐Ÿ‘‰Postmodern shared a benchmarking of dynamic dispatch (send) vs literal methods calls (check the code here):

Source: @postmodern@ruby.social

๐Ÿ‘‰Sb shared a code sample showing how they are using Phlex.fun at their own project Chestnut

Ok Phlex is just great.Even with a quick first pass on https://gochestnut.app/, it's opening up so much opportunity for cleaning up views.Having your views as objects means all your normal refactoring patterns suddenly become easy.https://www.phlex.fun/
Source: @sb@ruby.social
Source: @sb@ruby.social

๐Ÿ‘‰ Nicolas Buduroi shared a code sample showing how to fix colors in IRB:

Source: @budu@ruby.social

๐Ÿ‘‰ Noah Gibbs started a discussion about the reason behind blindly adopting adopt Rubocop/Standard rules:

Source: @codefolio@ruby.social

Here are some of the most interesting replies/followups, but I invite you to read the entire thread:

Source: @codefolio@ruby.social
Source: @searls@mastodon.social
Source: @jswright61@ruby.social
Source: @nirvdrum@ruby.social
Source:@justinweiss@icosahedron.website

๐Ÿ‘‰Dave Copeland shared their thoughts about abstractions:

Source: @davetron5000@ruby.social

๐Ÿ‘‰ Joel Drapper shared a code sample showing how phlex-rails can work with the native Rails layout system:

Source: @joeldrapper@ruby.social

๐Ÿ‘‰Robby Russell shared a take that writing useful automated tests is not very easy:

Source: @robbyrussell

๐Ÿ‘‰Study Every Day shared asked about how to stop the Rails console autocomplete:

caption...

There were a couple of answers in the replies:

Source: @lucianghinda
Source: @bauduccoire
Source: @rockatanescu

This will be disabled in the next Rails release. See this PR

๐Ÿ‘‰Eric Berry asked about how to approach upgrading a large Rails app:

Source: @coderberry

In the replies, there are recommendations for using one of these gems: deprecation_toolkit, next_rails or bootboot.

And also some more general advice:

Source: @four54
Sourc: @attillagyorffy

๐Ÿ‘‰Janko Marohniฤ‡ shared a code sample showing how to configure test environment in Rails app to speed up boot time:

Source: @jankomarohnic

๐Ÿ‘‰Eric Berry shared a code sample showing a bash command to run rails commands using separate Ruby versions:

Source: @coderberry

๐Ÿ‘‰David Teren asked about the recommended approach for Rails API pagination:

Source: @davidteren

Among the recommendations:

  • Pagy gem

  • keyset pagionation

  • Kaminari

๐Ÿ‘‰Emmanuel Hayford shared a poll about upgrading to Rails 7.1. Based on the answers (194 votes) seems that more than 50% will upgrade very quickly to Rails 7.1:

Source: @siaw23

๐Ÿ‘‰Kevin Newton shared the way Ruby lexer disambiguate the do keyword

Source: @kddnewton

๐Ÿ‘‰Greg Navis shared a thread about how object allocation and initialization are two different steps in Ruby:

Source: @gregnavis

๐Ÿ‘‰Josef Strzibny shared a code sample showing how to run a Rake task from inside the Rails application:

Source: @strzibnyj

๐Ÿ‘‰Prabin Poudel shared a Rails method named up_only that will run code only when creating a new table:

Source: @coolprobn

๐Ÿ‘‰Eric Berry shared a code sample showing how to use Phlex with Hanami:

Source: @coderberry

๐Ÿ‘‰Tom Hockett shared a piece of code asking about the usage of nonzero?:

Source: @tomhockett

Konnor Rogers answered with:

Source: @RogersKonnor

๐Ÿ‘‰Josef Strzibny shared a code sample about how to use use Rack tasks to pass environment variables:

Source: @strzibnyj

๐Ÿ‘‰Mohit Sindhwani (Onghu@Ruby.Social) shared the second part of their series about Ruby Learning by Reversing: Native Gems, Part 2

Source: @onghu

๐Ÿ‘‰Andrea Rocca shared a thread about how to create with Hotwire a multiple select input (similar to StackOverflow question tags):

Source: @ilrock__

๐Ÿ‘‰Josef Strzibny shared the difference between flash.delete and flash.discard

Source: @strzibnyj

u/empty_glass_mug asked on /r/rails a question about how to onboard a big Rails app:

Source: /u/empty_glass_mug

Among the best answers is the following from /u/GreenCalligrapher571. From their answers, here is the part about the technical project, but please read the full answer:

  • Are the setup steps accurate and performable? Is application setup documented at all?

  • Is authentication handled inside the application, or are we using some provider?

  • How are we handling authorization and permissions?

  • Are there feature flags, and if so, how are those managed?

  • What are we using for tests, and what does that test coverage percentage look like? Are there trends in coverage percentage (e.g. models are tested really well but controllers are tested poorly)? What are we using to set up test data (presumably something like FactoryBot or fixtures, but who can know)?

  • What's my exception count look like in production? What are my baseline performance characteristics (95th percentile request time, for example)?

  • How is the code organized? Are we using concerns? Service objects? Asynchronous jobs?

  • On the front end, are we rendered EBR? HAML? A bunch of pages that render react views? Are we using a CSS framework of some sort or is it all hand-coded? If there's meaningful amounts of JS on the front end, is it all in JQuery or UJS or whatever, or is it vanilla javascript, or is it Alpine or Vue or React or something else?

  • How does the code get deployed? Are you having to type git push heroku master from the command line, or is there CI/CD, or something else?

  • What other services does it integrate with (e.g. exception monitoring, CI/CD, analytics, authentication, etc.), and do I have accounts for those?

  • What does the database schema look like? I'll usually install the annotate_rb gem when I join a fresh project, as that makes it significantly easier to reason about models (at the expense of a few dozen lines of comments at the top of each model file).

  • If I run bundle audit (you may need to install it), do I get any security warnings? Ditto for whatever you're using to manage the front-end dependencies, as well as language versions.

  • Do we have a separate set of "API" endpoints? If so, are these used just by this application (e.g. for AJAX) or are they consumed by the public? Similarly, do we have an exposed set of GraphQL queries/mutations? If so, what systems are using them and how?

  • Are there other systems that depend on this one? For example, customers who've integrated with your API, or a mobile app that hits your application, or something else?

  • More broadly, who depends on this system and how? Are your customers mostly internal users? External users? Are the users the people who are paying, or is it a B2B thing where your users are employed by your actual customer?

  • If we take electronic payments, are we using a "tokenization" flow with a known payment gateway, or are we storing card numbers in the database? If you have card numbers stored in the database and it's not a PCI Level 1 payment gateway or processor or the like, getting that information out of your database needs to be the top priority. I've taken over at least 1 project where they were storing card numbers in the database ("But it's encrypted!" they said -- still didn't matter) and it presented a HUGE, company-threatening liability. They were even storing the security codes in the database and I about lost my dang mind.

  • Are there any general complaints or comments about performance, functionality, etc.?


๐Ÿงฐ Gems, Libraries, and Updates

๐ŸงฐAvo released version 2.26, which includes fixes and improvements: Read the release notes

๐Ÿงฐ Brad Gessler announced they are working on a new project called rowdy that will route web requests to classes:

Source: @bradgessler

๐ŸงฐHeartcombo announced the release of Devise v.4.9.0 Read the change log:

Source: @heartcombo

They also followed up with the following:

Source: @heartcombo

Yaroslav Shmarov already published a video showing how the new device works. Watch it here

๐Ÿงฐ Chris Oliver announced that Jumpstart Pro is now ready for Turbo StreamActions:

Source: @excid3

๐Ÿงฐ The Bundler Team announced a new release of bundler v.2.4.7. Read the release notes

Source: github.com/rubygems/rubygems

๐Ÿงฐ Samuel Williams shared they released a VSCode extension for Sus Test Provider is now on the VScode Marketplace:

Source: @ioquatix@ruby.social

๐Ÿงฐ Josef Strzibny announced they released a new version of InvoicePrinter. Read the release notes

๐Ÿงฐ Joel Drapper published a new version of Phlex v.1.4.0. Read the changelog here

๐ŸงฐMaciej Mensfeld announced the new Karafka Web UI - Your Ruby and Rails out-of-the-box Kafka UI: Read the release notes

Source: @maciejmensfeld

๐Ÿงฐ Ernesto announced a new version of database_cleaner. Read the changelog

๐Ÿงฐ Lรกzaro Nixon announced they implemented a passwordless feature for the authentication-zero gem

Source: @lazaronixon

๐Ÿงฐ A new version of tanakai was released that adds support for Ruby 3.

Source: glaucocustodio/tanakai

๐Ÿงฐ Nick Nick Schwaderer submitted a bug about a performance regression happening between Ruby 2.7 to Ruby 3.2. Read the bug here

Source: @schwad_rb

๐Ÿค Related (but not Ruby-specific)

๐ŸคSebastian Wilgosz shared some excellent advice for content creators about how to stay motivated:

Source: @sebwilgosz

Here are two of the points he shared, but you should read the entire thread:

Source: @sebwilgosz
Source: @sebwilgosz

๐Ÿค Robby Russell shared advice about how to make the onboarding of new devs work:

Source: @robbyrussell

More content: ๐ŸŽฅ ๐ŸŽง ๐Ÿ—ž

๐Ÿ—ž Newsletters

๐Ÿ—žGreg Molnar published a new edition of This Week in Rails: preloading associations with composite keys and more!

๐Ÿ—ž๏ธย Ruby Weeklyย published a new edition:ย Getting Rustier with Ruby

๐Ÿ—ž Ruby Radar published a new edition Ruby Radar #90 - This Week in Ruby Radar

๐Ÿ—ž๏ธย Ruby LibHuntย published a new edition of theย Awesome Ruby Newsletter

Podcasts

๐ŸŽงAndy Croll shared a new episode of Maintenable with Robby Russell: Andy Croll - Keep the Weird Stuff Weird | Maintainable

๐ŸŽงThe Ruby on Rails Podcast published a new episode The Ruby on Rails Podcast Episode 457: This Week In Rails with Emmanuel Hayford

๐ŸŽงRemote Ruby published a new episode Spicy Takes with Matt Swanson

๐ŸŽง Ruby Rogues published a new episode Keeping Up With The Currents

๐ŸŽง Ruby for All published a new episode about Favorite Ruby Methods: Part 3 - Strings

Videos

Talks

๐Ÿ“ฝ๏ธ The Rubber Duck Dev Show published a new episode Getting Stuff Done With Drew Bragg

๐Ÿ“ฝ๏ธ Nate Berkopec published a video showing Puma 6.1: New Feature Overview

Screencasts

๐ŸŽฅ Deanin published four new videos:

  • UFO Balloon Tracking Speedrun In Ruby On Rails 7

  • Clean Up Your Ruby On Rails 7 Terminal With OhMyZSH

  • Ruby WebAssembly On Rails 7 Tutorial

  • Unreal Engine 5 Save and Load Players in Rails 7.1

๐ŸŽฅ Peter Hawkins published two new videos:

  • Advanced Turbo Streams in Hotwire

  • Why Hotwire is AWESOME! A lesson on Turbo frames

๐ŸŽฅ Yaroslav Shmarov published two new videos:

  • Ruby on Rails #112 Devise finally works with Rails 7 and Turbo

  • Ruby on Rails #111 Twilio SMS API

๐ŸŽฅ The Ruby Learning Center published a new video streamed by Brandon Weaver covering Effective Testing in RSpec 3 - Ch 6

Articles

Whatโ€™s new

  • Emmanuel Hayford published an article about What's New in Rails 7.1

  • Karol Bฤ…k published an article about building My first Hanami app - kukicola.io

  • VeetheeDixit1 published an article about 21 Best Ruby Testing Frameworks For 2023

  • Lucas Barret published an article about Semiology in Ruby (What are Ruby Symbols)?

  • Jonathan Rochkind published an article about using CGI.escapeURIComponent

How-Tos

  • Luca Guidi published an article about Getting Started with Hanami and Docker Compose

  • Andy Croll published a new article on One Ruby Thing about Try not to loop through associations inside jobs

  • Brandon C published an article about Renaming Foreign keys in Rails

  • Jeremy Evans published a new post about Speeding Up Tests in Applications Using Sequel, Roda, and rack-unreloader

  • Benito Serna shared an article about Pick a safe previous date to avoid race conditions saving computed values

  • Darshan published an article about Web scraping Google Search Results With Ruby

  • Davide Santangelo published an article about Sorting Algorithms with Ruby

  • Mattias Velamsson published an article about Ruby Challenges P1. The proposed problem to be solved is: โ€œIn a given array, find and count the numbers of integers with a value greater than 5โ€

  • Dave Iverson published an article about Building Templated Emails with MJML

Deep Dives

  • Akshay published a deep dive into How Rails Authenticity Tokens Protect Against CSRF Vulnerability

  • Jake Zimmerman published an article about Ruby's private keyword is weird

  • Daniel Magliola published a written companion for their Talk about Happy Gueues. It reads like a good deep dive into queues: "The secret to happy queues"

  • Kevin Murphy published a new article about Duped into modifying a frozen hash

More general

  • Nate Berkopec shared an article about how to think about hiring people Hire for slope, not Y-Intercept

  • John DeWyze published an article about The 25 Percent Rule for Tackling Technical Debt


๐Ÿค— Founding Members supporting ShortRuby

  • Drew Bragg, host of Code and the Coding Coders who Code it

  • Avi Flombaum, the founder of Flatiron School, is a product engineer interested in full-time/contract work.

  • Adrian Marin, creator of Avo - a Ruby on Rails application building framework

  • Adam McCrea, creator of Judoscale (formerly Rails Autoscale)โ€”theย dead-simple autoscalerย for Rails, Sidekiq, etc.

  • Stephen Ierodiaconou from www.diaconou.com

  • Harry Lascelles

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


Share this post

Short Ruby News - Edition #30

newsletter.shortruby.com
Previous
Next
Comments
TopNewCommunity

No posts

Ready for more?

ยฉ 2023 Lucian Ghinda
Privacy โˆ™ Terms โˆ™ Collection notice
Start WritingGet the app
Substackย is the home for great writing