Short Ruby News - Edition #69

Discover the world of Ruby in this comprehensive newsletter covering week 50 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.

You can jump directly to a section:

🚀 New Products & 📅 Events

👉 All about Code and Ruby

🧰 Gems, Libraries, and Updates

🤝 Related (but not Ruby-specific)

More content: 📚 🗞 🎧 🎥 ✍🏾 (articles, podcasts, videos, newsletters)

[Sponsor ⬇] flippercloud.io

Are big launches stressing you out? Then you need feature flags. Flipper Cloud helps your team deploy the code now and then rollout features when you are good and ready. Get started for free at flippercloud.io

🚀 New Products

🚀 Julian Rubisch launched UseAttractor

🚀 Josef Strzibny launched OpenGraph Preview by ImageBinary

📅 Events

📅 Wnb.Rb announced the meetup on Tuesday 28 November - register at WNB.rb: A Virtual Community for Women and Non-Binary Rubyists

📅 Balkan Ruby announced the date for Balkan Ruby 26-27 April 2024. CFP is open at balkanruby.com

📅 Visuality shared their first speaker Xavier Noria. Buy tickets at rubycommunityconference.com

📅 Dr Nic Williams shared that CFP is open for RubyConf AU 2024: Call for Proposals

👉 All about Code and Ruby

👉 Tobi Lutke shared stats from Shopify Black Friday and Cyber Monday:

[Sponsor 👇]

Fewer 💥, more 😎. Need to restrict who can enable, disable, or roll back feature flags in a particular environment? We can help. Know who did what (and when), roll back a change in a single click or lock down production access to a few people today at flippercloud.io

👉 Aristóteles Coutinho shared another pattern matching code sample:

👉 Emmanuel Hayford shared about Rails allowing YAML serialization per attribute:

👉 RoRvsWild shared that the PR merged by Jean Boussier will make Ruby 3.3 string.dup faster:

👉 Xavier Noria shared about rationale about errors in various situations:

[Sponsor flippercloud.io]🐬 Using the open source version of Flipper to flip features? Switch to Cloud in a few minutes for support, audit history, finer-grained permissions, multi-environment sync, and all your projects in one place.Start with our free tier today at flippercloud.io

👉 Deepak Mahakale shared about returning ActiveRecord#none over an empty array:

👉 Aristóteles Coutinho continues to share how they use pattern matching this time about is about using assert_pattern:

👉 Dr Nic Williams shared a tip about using params.slice(:email).permit!

👉 Xavier Noria shared about the correct naming of 1+N queries:

👉 Greg Molnar shared a code sample showing how to use Thor to build command line tools:

👉 Harrison Broadbent shared a bash script to edit the rails credentials:

👉 Nate Hopkins shared about the idea that non-RESTful routes are a code smell:

👉 Benoit Daloze shared that TruffleRuby run using the new Ruby parser Prism:

👉 Joe Masilotti announced a new  Turbo Native crash course | Masilotti.com

👉 Errol Schmidt shared Rails Event Store, click to read the entire post at social media (or on nitter):

👉 Michael Pell asked about the best resource to learn Hotwire:

Here are some of the recommendations:

👉 Naofumi Kagami 加々美直史 shared about using ActionView TagHelpers to create nested HTML nodes:

👉 Facundo Espinosa shared a code sample showing how to track Turbo Streams:

They also shared they discovered a Chrome extension that highlights Turbo Frames called Turbo devtools:

👉 Jason Swett shared about using DSL:

👉 Tony Messias shared about using closeNow action on modals and dropdowns:

👉 Jason Swett shared about moving logic out of controllers:

👉 Study Every Day shared a piece of code from their work assistant:

👉 Mike Dalessio shared architecture stats from Nokogiri downloads:

👉 Maciej Mensfeld shared how they use ChatGPT to improve docs for OSS:

👉 Alex Rudall shared  they are writing a book about AI:

👉 u/crabbits_ asked about top gems people use:

Here are some of the replies, but you should read the thread on Reddit as people also explain why they recommend some of them:

  • Awesome Print - Pretty print your Ruby objects with style -- in full color and with proper indentation

  • Clipboard - Ruby access to the clipboard on Windows, Linux, macOS, Java, Cygwin, and WSL

  • GroupDate - The simplest way to group temporal data

  • Wafris - Wafris Client for Rails and Rack applications

  • Devise - Flexible authentication solution for Rails with Warden

  • Sidekiq - Simple, efficient background processing for Ruby.after_party

  • maintenance_tasks - A Rails engine for queuing and managing maintenance tasks

  • pry - Pry is a runtime developer console and IRB alternative with powerful introspection capabilities.

  • pry-stackexplorer - For people who don't like typing a hyphen then an underscore

  • rspec - BDD for Ruby

  • jbuilder - Create JSON structures via a Builder-style DSL

  • invisible_captcha - Unobtrusive and flexible spam protection for Rails apps

  • sidekiq-cron - Scheduler / Cron for Sidekiq jobs

  • maily - Rails Engine to preview emails in the browser

  • serviz - Command object Interface for Ruby

  • ransack - Object-based searching.

  • omniauth-*: for social logins with Devise

  • pagy: pagination with focus on performance

  • annotate: annotate Rails models with schema

  • rubocop - RuboCop is a Ruby code style checking and code formatting tool. It aims to enforce the community-driven Ruby Style Guide.

  • brakeman - Brakeman detects security vulnerabilities in Ruby on Rails applications via static analysis.

  • haml - An elegant, structured (X)HTML/XML templating engine.

  • letter_opener - When mail is sent from your application, Letter Opener will open a preview in the browser instead of sending.

  • delayed_job - Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background

  • mailhog - Web and API based SMTP testing

  • mailpit - An email and SMTP testing tool with API for developers

  • good_job - multithreaded, Postgres-based ActiveJob backend for Ruby on Rails

  • avo - Avo is a very custom Content Management System for Ruby on Rails that saves developers and teams months of development time.

  • hotwire - Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire

  • guard-rspec - Guard::RSpec automatically run your specs (much like autotest).

  • pry-nav - Turn Pry into a primitive debugger. Adds 'step' and 'next' commands to control execution.

  • binding_of_caller - Provides the Binding#of_caller method.

  • action_policy - Authorization framework for Ruby/Rails application

  • phlex-rails

  • occams-record - A faster, lower-memory, fuller-featured querying API for ActiveRecord that returns results as unadorned, read-only objects.

  • active_interaction - Manage application specific business logic

  • lexirest - Flexirest - The really flexible REST API client for Ruby

  • nested_record - Map JSON fields on ActiveModel objects

  • rambulance - Simple and safe way to dynamically render error pages or JSON responses for Rails apps

🧰 Gems, Libraries, Tools and Updates

🧰 Avo announced the release of Avo 3 

🧰  David Heinemeier Hansson announced Release v8.0.0-beta1 · hotwired/turbo

🧰 RSpec announced the release of version 6.1.0 of  rspec-rails/Changelog.md at main · rspec/rspec-rails

🧰 Kevin Newton shared they released v0.18.0 · ruby/prism

🧰 Jean Boussier  shared a merged PR about Specialize String#dup by byroot · Pull Request #8952 · ruby/ruby

On the same topic John Hawthorn opened a PR on about  Suggestion from Performance/BlockGivenWithExplicitBlock is often slower · Issue #385 · rubocop/rubocop-performance

🧰 Vinicius Stock shared Release v0.12.4 · Shopify/ruby-lsp

🧰 Joel Drapper shared an PR  Literal::Enum.index by joeldrapper · Pull Request #64 · joeldrapper/literal

🧰 Benoit shared that  Fix undefined method config by benoittgt · Pull Request #440 · thoughtbot/factory_bot_rails was merged:

🧰Joel Drapper shared the release of phlex version 1.9.0 and phlex-rails version 1.1.0

🆕 🧰 Chris Veleris announced a new Ruby projects called tududi - tu|du|di is a task and project management web application built with Sinatra

🆕 🧰 Stanislav Katkov announced a new gem called yard-markdown - yard theme plugin that generates markdown documentation for gems

🧰 Camden Narzt announced a new version for version 6.0.19 of the Passenger

🧰 Janko Marohnić shared they are working on a PR for rodauth Add support for Rails URL helpers

🧰 Chris Oliver shared that Jumpstart Pro now supports Paddle:

🧰 Alex Rudall shared Release v6.3.0 · alexrudall/ruby-openai

🧰 Mike Dalessio shared Release 1.6.9 / 2023-11-26 · sparklemotion/sqlite3-ruby

🆕 🧰 Oleg Antonyan published a new gem called polymorphic_enum_type - Allows integer database field for polymorphic association type instead of string via enum.

🤝 Related (but not Ruby-specific)

🤝 Chris Toomey shared a tip about changing the default Git Commit Message, Vim, and Markdown

🤝 Jason Swett shared about identifying when to switch back to use your own reasoning:

🤝 Jorge Manrubia shared about object-oriented design:

🤝 Jason Swett asked about what non-programming topics help get better at programming:

Here are some of the topics from the answers: statistics, economics, logic, epistemology, psychology, discrete math, language learning, human behaviour, music, mindful, systems thinking, woodworking, ability to sell, effective communication, long-term planning, rapid decision making, abstract thinking, understanding systems, cooking, listening and paying attention, poetry, user experience, management, scientific process, writing, signal flow, compartmentalisation, testing with controls, breaking down problems, martial arts, business expertize, organisational literacy, patience. You should read the entire thread (read on nitter) to discover why people are recommending some of these.

More content: 📚 🗞 🎧 🎥 ✍🏾

🗞 Newsletters

🗞️ Hotwire Weekly published a new edition about  Week 47 - The first Turbo 8 beta is here

🗞 Andy Croll published a new edition about For clarity merging hashes use with_defaults

🗞 Vipul A M published a new edition of This Week in Rails about ErrorReporter#unexpected, with_routing test helpers and more!

🗞 Ruby Weekly published a new edition about Why to add IRB to your Gemfile

🗞 Awesome Ruby Newsletter published a new edition about Issue 392 - Ruby is the Top 6th Highest Paid Programming Language in 2023, with a salary MEDIAN of $136k per year

🗞 Greg Molnar published a new edition about Using Thor For Command Line Tasks

🎧 Podcasts

🎧 Jason Swett published a new episode about 202 - Friendly.rb 2023 Speaker Naijeria Toweett - The Code with Jason Podcast

🎧 Creston Jamison published a new podcast about Software Developer Continuing Education | Rubber Duck Dev Show 109

🎧 The Rails Changelog published a new podcast about 015: Exploring Turbo 8 with Jorge Manrubia | The Rails Changelog | Episode 15

🎧 Ruby For All published a new podcast about Building Rails-Powered Mobile Apps with Joe Masilotti | Ruby for All | Episode 53

🎧 Maintainable Software Podcast published a new podcast about Jacob Aronoff - At Least One Person Who Cares To See It Through

🎧 Ruby Rogues published a new podcast about published an article about Building Honey Badger With Ben Curtis Ruby 614

🎙️ Talks, Slides and Conference Talks

🎙️ Vladimir Dementyev shared their slides from [Helvetic Ruby 2023] Profiling Ruby tests with Swiss precision

🎙️ Kevin Newton shared their slides from RubyConf about The Future of Understanding Ruby

📽️ 🎥 Videos

Screencasts

🎥 Yaroslav Shmarov published new videos about Ruby on Rails #153 Refactoring Hotwire Modals and about Ruby on Rails #154 Avo 3 upgrade

🎥 Jason Swett published a new video about Building a ChatGPT Plugin for Vim - Nailing Down the Specifications

✍🏾 Articles

What’s new 🆕

Alan Ridlehoover published an article about  What is it like to speak to a large audience at a conference?

Maciej Mensfeld published an article about Shaping The Future Of Ruby And Kafka Together With rdkafka Ruby

Prasanth Chaduvula published an article about Rails 7.1 Expands Active Record API With Async Query Support

Dumebi Okolo Dumebi Okolo published an article about Ruby On Rails For Beginners: Build An Online Store With Rails

Ruby Gems published an article about October 2023 Ruby Gems Updates

Deep Dives 🔍

Victor Shepelev published an article about “Useless Ruby Sugar”: Argument Forwarding

Lucas Barret published a new article about Make your own HTTP server in ruby

Dhaval Singh published an article about To Raise Or Not To Raise?

How-Tos 📝

Steve Polito published a new article about Database View Backed Scopes In Rails

Jose Blanco published a new article about What's a Counter Cache?

Mike Coutermarsh published an article about Webhook Security: A Hands On Guide

Aestimo Kirina published an article about How To Build Your Own User Authentication System In Rails

Jeff Dwyer published an article about Before You Lograge

Dimiter Petrov published an article about  3 ways to model an associated collection in Rails

Ollie James published an article about Zero Gravity | Rails Testing On Rocket Fuel: How We Made Our Tests 5x Faster

Chris Toomey published an article about Sharing Query Logic Within Active Record Models

Hugo Vast published an article about Mastering Monadical Syntax In Ruby: A Practical Guide To Functional Elegance

Renata Marques published an article about Mastering Ruby: Common Performance Issues

Jesus Castello published an article about From Complexity To Clarity: Mastering Ruby’s Pattern Matching Features

Stefanni Brasil published an article about Ruby Html Sanitization With Loofah

Andres Chacon published an article about Asynchronous Loading In Active Record: Boosting The Performance Of Your Rails Application

Related

Jorge Manrubia published an article about 37signals Dev The Radiating Programmer 

Josh Comeau published an article about An Interactive Guide To CSS Grid

David Copeland published an article about Web Components: Templates, Slots, And Shadow Dom Aren't Great

Tomasz Stolarczyk published an article about Who Calls Who? — A Simple Events Heuristic

Please consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. 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 issues