Short Ruby News - Edition #82

This edition has new sections for Ruby code: Code Samples, Code Design, and Around Code. This way, you can go quickly to what is of interest to you!

Take advantage of the special promo for March & April to promote your product/service/book/agency in the Short Ruby Newsletter: 🟑 25% off Main Content Package🟑 30% off Supporter Package🟑 40% off Branding PackageDon't miss this opportunity to reach the Ruby community! Interested? Email [email protected] for details!

You can jump directly to a section:

[Sponsor ⬇] KamalHandbook (affiliate link)

The patron copy for $21.99 gives you early access, lifetime updates, and future bonuses. You can also buy the simple copy for just $14.99 and you'll get the book once it's released.Josef Strzibny is a full-stack web developer and the author of Deployment from Scratch book, which sold over 1000 copies. He is also the creator Business Class kit - a SaaS template with subscriptions,SEO-optimized blog, and built-in Kamal deployment.

πŸš€ New Products

πŸš€ Pascal LalibertΓ© launched Hotwire Migration: 3 options, up-front pricing (see the video for an overview of the service being offered)

πŸš€ Josef Strzibny announced early access for their new book called Kamal Handbook (affiliate link):

πŸš€ Rinas shared gifsocial.com (code is open source at onerinas/gifsocial):

πŸš€ Ayush launched an updated version of their book The update to The Rails and Hotwire Codex and is offering a 20% discount for Short Ruby Newsletter readers if you buy via this link (valid only for 48 hours)

πŸš€ Andrea Fomera launched a new course Learn Hotwire by Building a Calendar

πŸ“… Events

πŸ“… Cody Norman launched a new event Rawhide Ruby

πŸ“… Indie Rails shared they will host an IndieRails meetup β†’ RSVP at IndieRails Meetup @ Sin City

πŸ“… Irina Nazarova shared that on 28 March a SF Bay Area Ruby meetup will take place. Register at lu.ma/r6d0lghm

πŸ“… Euruko shared that Matz will attend in person EuRuKo 2024

πŸ‘‰ All about Code and Ruby

πŸ’» Code Samples

πŸ‘‰ Stephann V. shared about removing the initializer when adding a new input:

πŸ‘‰ Matheus Richard shared a code sample showing how to create a lambda/proc without an explicit block:

πŸ‘‰ John Mc Dowall shared a tip about fixing the UI flickering/glitch where Turbo preview is shown first:

πŸ‘‰ Cj Avilla shared about adding a turbo stream render in the application layout:

[Sponsor ⬇] Business CLass kit (affiliate link)

πŸ‘‰ Keshav Biswa shared a bug they discovered with filtered params in Rails (see the bug report here):

πŸ‘‰ Stefan Botzenhart shared a code sample showing usage of `all_day` helper from Rails:

πŸ‘‰ Prabin Poudel shared about to_sentence helper in Rails:

πŸ‘‰ Ruby Cademy shared about using values_at for parallel assignment:

πŸ‘‰ Bhumi shared a tip about using the spacer templates in Rails:

πŸ‘‰ Brad Gessler shared a code sample showing pattern matching with Rails create action:

He also created a PR for Rails to support deconstruct keys on StrongParams.

πŸ‘‰ Jeremy Smith shared a thread about how they refactored a SignupForm form object. You can see here the initial object:

πŸ‘‰ Hans Schnedlitz shared a code sample showing how to pass named arguments to format:

πŸ‘‰ Jim Jones shared a tip about Rails Turbo 8 morphing:

πŸ‘‰ Benito Serna shared about using a custom context for Rails validations:

πŸ‘‰ Michael Buckbee shared a code sample for implementing a sanity check:

πŸ‘‰ Bhumi shared a code sample showing pattern matching in Ruby and asked about use cases in real applications:

πŸ‘‰ Monospace Mentor shared about operations on Ruby arrays:

πŸ‘‰Hans Schnedlitz shared a code sample showing that you can transform an array into a generator and work with it like that:

πŸ‘‰Jeremy shared a benchmark about value.digits β†’ bench_base32.rb

πŸ‘‰ Ayush asked about sending HTTP headers when hijacking a Rack socket for server sent events:

πŸ“ Thinking about Code Design

πŸ‘‰ David Heinemeier Hansson shared about running multiple Rails applications on a single server in Rails 8:

πŸ‘‰ Piotr Ch shared a long post about keeping a Rails codebase maintainable. I extracted here just the first part:

πŸ‘‰ Daniel Lopes shared about working on a large Rails codebases:

πŸ‘‰ Matt Swanson shared about how to design authorization. This is just the top part of the long post they shared. Please open it and read the entire post:

πŸ‘‰ Benoit started a discussion about a pattern of using .call to call .new:

Here are some of the replies:

πŸ‘‰ Pedro PiΓ±era asked about spawning multiple threads from a request/response in Rails:

πŸ‘‰ Naofumi Kagami εŠ γ€…ηΎŽη›΄ε² shared a thread about OOP. I choose here one of the posts in the thread:

πŸ‘‰ Benito Serna shared about organizing internationalization in Rails in separate files per model:

πŸ‘‰ Samuel Williams asked about how to improve a slow test suite that is spending 65% of time in javascript_pack_tag:

Among the suggested solutions:

πŸ‘‰ Greg Molnar shared Rails SQL Injection Examples list:

πŸ‘‰ Samuel Williams shared a benchmark between Rack/Falcon and Elixir/Cowboy:

πŸ‘‰ Rafael FranΓ§a shared that a Rails application is a Rails engine:

πŸ‘‰ John Nunemaker shared about how they fixed a SpeakerDeck performance issues:

πŸ‘‰ Chris Oliver shared a short video explaining how readable the Rails source code is:

πŸ’‘ Around code (news, findings, books and more - all about Ruby)

πŸ‘‰ Ruby On Rails asked for feedback for the documentation about Structuring the Active Record Query Guide Β· Issue #51262 Β· rails/rails

πŸ‘‰ Aurelie Verrot shared about the lack of timezone support in Github actions. See add timezone support to scheduling workflow runs with cron Β· community Β· Discussion #13454

πŸ‘‰ Postmodern asked a couple of poll about Ruby community:

Here is the list of questions:

πŸ‘‰ Graceful.Dev announced a new episode for members with a free two weeks access at Pro Membership (Monthly)

πŸ‘‰ Chris Oliver shared they created the Rails Lazy Load Hooks Cheatsheet

A similar list can be found in Rails Docs at Rails Engines#available load hooks

πŸ‘‰ Bozhidar Batsov shared the issue that triggered the creationg of Rubocop β†’ Automated Ruby file checker like PEP-8? Β· Issue #54 Β· rubocop/ruby-style-guide

It is so inspiring to discover in that issue the start of the rubocop repository:

πŸ‘‰ Felipe Vogel shared a list of repositories about Ruby programming games:

Here are the list of repos:

πŸ‘‰ Rich Steinmetz started a weekly question about SaaS built with Rails on Reddit. If you are working on one answer there: From the rails community on Reddit: Serious SaaS Monday πŸ₯Έ#1

πŸ‘‰ Stephen Margheim shared about SQLite being ready for production:

πŸ‘‰ Piotr Ch asked about Rails job market in EU:

πŸ‘‰ KingOdinson_1212 asked about salaries for Rails developers with over 10 years of experience. There are over 60 replies there if you care curious about this:

❀️ Why Choose Ruby

❀️ Gregory Brown shared about 15 years since publishing Ruby Best Practices book:

❀️ Greg Navis published an article about Why Rails is a Great Choice for Startups in 2024

❀️ John Gorriceta shared their impression after 24 hours with Rails:

❀️  Monospace Mentor shared that Ruby allows expressing clearly the intention of the code:

❀️ Cameron Dutro shared about the difference between waiting for JS tools vs waiting on Ruby tools:

Noah Gibbs replies with detailing how Rails profiled and optimized the important stuff:

❀️ Tekin SΓΌleyman shared that pattern matching is a cool to use:

❀️ Cameron Youngblood shared about speed of development with Rails:

❀️ Alireza Bashiri shared they love building their project with Turbo:

❀️ Greg Molnar shared about their transition to Rails:

πŸ‘‰ Tobi Lutke shared about the super power of Rails:

🧰 Gems, Libraries, Tools and Updates

πŸ†• 🧰 Johny Ho published a new gem called props_template - A very fast json builder for Rails. Read the announcement article here

🧰 Bozhidar Batsov announced a new version of Rubocop suporting Prism β†’ Release RuboCop 1.62 Β· rubocop/rubocop

🧰 Stan Lo announced a new version of Release v1.12.0 Β· ruby/irb

🧰 Svyatoslav Kryukov announced a new version of RunRuby.dev

🧰 Rob Zolkos shared a gem called namecase: Properly case people's names

πŸ†• 🧰 Piotr Ch announced a new project (not written in Ruby) that can be deployed with Kamal called mediator

🀝 Related (but not Ruby-specific)

🀝 Greg Molnar shared how to configure 2FA on SSH access to a server:

🀝 Rob Walling asked about the most controversial opinion about building startups:

Here are a few replies:

🀝 Jason Swett shared about code review and domain review:

🀝 Irina Nazarova shared about B2B sales:

🀝 Ben Orenstein shared about pricing page:

More content: πŸ“š πŸ—ž 🎧 πŸŽ₯ ✍🏾

πŸ—ž Newsletters

πŸ—ž Greg Molnar published a new edition of This Week in Rails about Illustrator file preview, deprecations and more!

πŸ—ž Ruby Weekly published a new edition about DHH's Windows odyssey

πŸ—ž Ruby LibHunt published a new edition about Awesome Ruby Newsletter - Issue 407, Mar 07, 2024

🎧 Podcasts

🎧 K.O.O published a new episode about A principle programmer at 34Signals taught me Rails Turbo

🎧 The Bike Shed published a new episode about 417: Module Docs

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

Screencasts

πŸŽ₯ Jason Swett published a series of videos about:

πŸŽ₯ Sam Johnson published a new video about How to build an interactive UI with Rails and Turbo and part 2

πŸŽ₯ Cezar Halmagean published a new video about Friday Live Coding

πŸŽ₯ Toronto Ruby published a new video about Toronto Ruby | 2 Years of the Ruby LSP

πŸŽ₯ Thoughtbot published a new video about Improving Rails Test Suite Performance

πŸŽ₯ Dean De Hart published a new video about:

πŸŽ₯ GoRails published a new video about ActionController Modules in Rails (Example)

Conference Talks

Visuality.pl started publishing the videos from the Ruby Warsaw Community Conference to their YouTube Channel

✍🏾 Articles

What’s new πŸ†•

Vladislav Kopylov published an article about Why I love Ruby

Bozhidar Batsov published an article about Weird Ruby: Incrementing Strings

Matias Korhonen published an article about  Hash benchmarks with Ruby

BalΓ‘zs Kutil published an article about How Not to Benchmark a Rails App

RailsDesigner published an article about Why choose ViewComponent over Rails partials

Akshay Khot published an article about Honeybadger Now Supports Logging and Event Monitoring

Deep Dives πŸ”

Chirag Shah published an article about How we migrated from Sidekiq to Solid Queue

Jacopo Beschi published an article about 3My adventures hunting down a Ruby memory leak

Henrique Medeiros published an article about The Evolution of ActiveModel::Error in the Rails Framework

How-TOs πŸ“

John Skiles Skinner published an article about OpenSSL error installing Ruby

Jeffery Morhous published an article about How to deploy a Rails app to Render

Alkesh Ghorpade published an article about Empower Your Rails Application with CanCanCan Gem and about Debugging Made Easy with Pry

Pascal Zumkehr published an article about Configuring Puma Workers for the Cloud

Kevin Glowacz published an article about Rails Debugging with VS Code and puma-dev

Related

David Copeland published an article about Programmer Purity Tests

Reply

or to participate.