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

[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

πŸ“… 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:

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

🧰 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

🧰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

🧰 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:

🀝 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

πŸ—ž Greg Molnar published a new edition about Using Thor For Command Line Tasks

🎧 Podcasts

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

πŸŽ™οΈ Talks, Slides and Conference Talks

πŸŽ™οΈ Kevin Newton shared their slides from RubyConf about The Future of Understanding Ruby

πŸ“½οΈ πŸŽ₯ Videos

Screencasts

✍🏾 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

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

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

Stefanni Brasil published an article about Ruby Html Sanitization With Loofah

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.

Reply

or to participate.