Short Ruby Newsletter

Share this post

Short Ruby News - Edition #51

newsletter.shortruby.com

Discover more from Short Ruby Newsletter

A Monday summary of the articles, discussions, and news from the Ruby community
Over 3,000 subscribers
Continue reading
Sign in

Short Ruby News - Edition #51

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

Lucian Ghinda (from ShortRuby)
Jul 17, 2023
Share this post

Short Ruby News - Edition #51

newsletter.shortruby.com
Share

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, newsletters)


💸 For only $1.5 per week (just $6.5 a month), you can become a paid subscriber and contribute to the success of the flourishing Ruby community we all adore while receiving an ad-free version of the newsletter!!

Support the newsletter for ~1.5$/week


👐 Our Community

👐 Friendly.Rb announced the venue - tickets are available at friendlyrb.com/tickets

Source: @friendlyrb

👐 Jason Swett announced that tickets for Sin City Ruby will start selling on 17th July (today):

Source: @JasonSwett

He also announced more speakers for the conference, and the current, complete list is as follows:

Source: Sin City Ruby

👐 Helvetic Ruby announced their early-bird tickets are now on sale at Helvetic Ruby Conference 2023

Source: @helvetic_ruby@ruby.social

👐 Ruby For Good shared Ruby for Good

Source: @RubyforGood

👐 Ruby Conf announced that RubyConf 2023: Call for Proposals are now open

Source: @rubyconf@ruby.social

👐 Chad Wilken shared their newsletter called GoodRuby → “A weekly breakdown of an open-source Ruby codebase”

Source: @chadwilken

👐 Ian announced How can you work with the #helloworld_rb platform as a developer?

Source: @alterisian

 


▶️ if you enjoy this type of content and want to receive it weekly in your inbox you should subscribe:

👉 All about Code and Ruby

🪧 Have you considered inviting your company to sponsor this newsletter? If you are using Ruby on Rails, I think your company is a perfect fit :)

You can send the sponsorship packages info to your marketing, HR, or product management teams.

I'm happy to assist you with drafting an email. Send me a message at hello@shortruby.com I'll do my best to draft an email for you to send inside your organization.


👉 Joel Drapper asked about a recommendation of a Github app to show lines from a PR that have test coverage and the ones that don’t:

Source: @joeldrapper@ruby.social

Among the recommendations:

  • Coversall Github Action

  • Undercover

  • Simplecov-review

👉 I shared about Ruby: pass by value or pass by reference?

Source: @lucian@ruby.social

👉 Luis Ezcurdia shared a code showing how to use pattern matching in Ruby:

Source: @3zcurdia@ruby.social

👉 Collin Donnell shared a Gist showing how to implement a Simple Ruby TCP multi-user chat room. Here is a snapshot of the server:

Source: https://gist.github.com/collindonnell

👉 Okura Masafumi shared a method signature with lazy module allocation:

Source: @okuramasafumi@ruby.social

👉 Moses Gathuku shared a new example adde to Hotwire Examples

Source: @Gathukumose

👉 Jason Swett shared about naming:

Source: @JasonSwett

You can read the replies and check other examples here.

Also, he shared this that I think is an excellent example of calling things what they are:

Source: @JasonSwett

👉 Nate Hopkins shared about consolidating db migrations:

Source: @hopsoft

If you want, you can check the replies to this proposal here.

👉 Robert Pankowecki shared that Sidekiq has a method called ❤️ (see it here)

Source: @pankowecki

👉 Gabriel Arcangel Zayas asked about book recommendations for Rails developers:

Source: @gazayas

You can check all replies here, I will list here some of the recommendations:

  • Practical Object-Oriented Design by Sandi Metz

  • Master Ruby Web Apis by Thibault

  • Exceptional Ruby by Avdi Grimm

  • Code Complete 2 by Steve McConnel

  • Sustainable Web Development with Ruby on Rails by Dave Copeland

  • Eloquent Ruby by Russ Olsen

Short Ruby Newsletter is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

👉 Brad Gessler triggered a discussion about ActiveSupport::CurrentAttributes. Read the entire conversation here

Source: @bradgessler

He proposed the following code:

Source: @bradgessler
Source: https://github.com/bradgessler/kurrent/blob/main/app/models/current.rb

He then explains in the thread how to use this, and the controller changes to make it work.

👉 Vladimir Dementyev shared a thread about AnyCable HTTP RPC feature. Here are two of the tweets shared, but you should read the entire thread:

Source: @palkan_tula
Source: @palkan_tula

👉Jason Swett shared a use-case for using ChatGPT to learn:

Source: @JasonSwett

👉Joe Masilotti hosted an AMA on Reddit about TurboNative. Read here the entire AMA:

Source: @joemasilotti

👉Harrison Broadbent shared that rails migration generator has support for removing index:

Source: @hrrsnbbnt

👉Prabin Poudel asked for cases where it is better to use Ruby instead of delegating to SQL:

Source: @coolprobn

There are some good examples in the replies to their question.

👉 Donn Felker shared a tip for managing empty tests:

Source: @donnfelker

👉 Dorian shared a code sample showing generating SQL:

Source: @dorianmariefr
Source: @dorianmariefr

👉 Ruby Cademy shared a code showing how to use reverse_order in Rails:

Source: @RubyCademy

👉Lázaro Nixon shared a code sample showing how to set Rails timezone:

Source: @lazaronixon


🧰 Gems, Libraries, Tools and Updates

🧰 Bridgetown announced the release of version 1.3 Presenting Islands Architecture in Bridgetown 1.3 “Kelly Butte”

Source: @bridgetown@ruby.social

🧰 Mario Alberto Chávez announced a new gem for. Read the release article at  Building AI applications with Ruby or explore the gem at aoororachain

Source: Building AI applications with Ruby

🧰 Soutaro Matsumoto announced a new release of steep. Read The release Note 1.5

Source: https://github.com/soutaro/steep/wiki/Release-Note-1.5

🧰 Olle Jonsson announced a new website for Faraday Docs

Source: https://lostisland.github.io/faraday/#/?id

🧰 Postmodern announced that  Feature #19630: [RFC] Deprecate `Kernel.open("|command-here")` due to frequent security issues was accepted:

Source: @postmodern@ruby.social

🧰 Josef Strzibny announced the release of Business Class: A brand new Ruby on Rails SaaS template on the block

Source: https://nts.strzibny.name/business-class-brand-new-rails-saas-template

🧰 Any Cable announced the release of version 1.4 Read the release announcement

Source: https://docs.anycable.io/release_notes?id=_140

For more details about these features, you should also read this article: Enter AnyCable v1.4: reliable real-time features for apps of any size

🧰 Avi Flombaum shared a preview of the release 0.4.0 of  ShadcnRails (you can find the Gihub repo at aviflombaum/shadcn-rails):

Source: @aviflombaum

🧰 Jeremy Evans announced a new release of Roda 3.70.0 Release notes

Source: https://github.com/jeremyevans/roda/discussions/326

🧰 Alex sharedalexrudall/awesome-ruby-ai: A list of awesome AI projects built in Ruby!

Source: https://github.com/alexrudall/awesome-ruby-ai

🧰 Marco Roth shared the Release v3.5.0.rc3 · stimulusreflex/stimulus_reflex

🧰 Koichi Ito announced a new release of the vscode-rubocop: The official VS Code extension for the RuboCop linter and code formatter.

Source: @koic

🧰 Vinicius Stock announced a new release of ruby-lsp Release v0.7.0 · Shopify/ruby-lsp and vscode-ruby-lsp v.0.4.0-beta

Source: https://github.com/Shopify/ruby-lsp/releases/tag/v0.7.0

🧰 Richard Chou shared their repo TictactoeRails (Github repo)

Source: @fyoung89

🧰 Joel Moss announced Release 0.10.0 · joelmoss/proscenium

Source: https://github.com/joelmoss/proscenium/releases/tag/v0.10.0

🧰 Robb Shecters shared new benchmarks for their gem asset_ram (Memoizes asset links)

Source: https://github.com/dogweather/asset_ram

Thank you for reading Short Ruby Newsletter. This post is public so feel free to share it.

Share

🤝 Related (but not Ruby-specific)

🤝 Nate Berkopec shared about queue management:

Source: @nateberkopec

🤝 Stanislav (Stas) Katkov shared about code review pyramid:

Source: @5katkov

🤝 Brandur shared that PostgreSQL version 15 supports a nullable column part of a unique index (see 11.6. Unique Indexes)

Source: @brandur

🤝Donn Felker shared how to check the git diff stats:

Source: @donnfelker

🤝 Josh Branchaud shared about the leave command on Mac and BSD Unix:

Source: @jbrancha

🤝 Vim Tricks shared how to Jump to next method - VimTricks

Source: @vim_tricks

🤝 More content: 📚 🗞 🎧 🎥 ✍🏾

Dave Copeland announced a new book called  Ruby on Rails Background Jobs with Sidekiq

Source: @davetron5000@ruby.social

🗞 Newsletters

🗞 Andy Croll published a new edition of One Ruby Thing: Beware of <%== in your erb files

🗞 Ruby Weekly published a new edition about A proposal for overloaded methods

🗞 Any Cable published a new edition about Any Cables Monthly #11

🗞 Greg Molnar published a new edition about Modifying Action Text markup - Rails Tricks Issue 14

🗞 Harrison Broadbent published a new edition of RailsNotes Newsletter → “Rails migrations, Indexes, SQL EXPLAIN, and db:migrate:redo”

🗞Ruby On Rails published a new edition of This Week in Rails about Preprocessed Active Storage variants and more → “Let’s see what changed in the Rails codebase”

🗞️ Ruby Libhunt published a new edition of Awesome Ruby Newsletter - Issue 372

🎧 Podcasts

🎧 Tightly Coupled Book Club published a new episode about Active Record Callbacks

🎧 Jason Swett published a new episode about Sin City Ruby Speaker Ernesto Tagwerker

🎧 Changelog published a new episode about  Types will win in the end with Jake Zimmerman, Stripe working on Sorbet

🎧 Evil Martians shared a podcast episode about Giant Robots: Evil Martians with Irina Nazarova by Evil Martians

🎧Adrian Marin and Yaroslav Shmarov published a new podcast about Jonathan Markwell talks about SaaS, validating ideas, and Conferences

🎧 Remote Ruby published a new podcast about We're A JavaScript Podcast Now

🎧 The Ruby on Rails Podcast published a new episode about The Rails SaaS Conference Recap with Andrew Culver

📽️ 🎥 Videos

Talks

📽️ RubyCentral released the videos for RailsConf 2023 (Atlanta)

Source: https://www.youtube.com/playlist?list=PLbHJudTY1K0cOM1jfOsQLYPTLxQf1Ui1C

Screencasts

🎥 Drifting Ruby published a new episode about Episode 410 - Academic Discount | Drifting Ruby

🎥 Ruby Cademy published new videos about:

  • Virtual Pair Programming: The Pragmatic Way to Debug a Rails App + 2 essential methods to know!

  • Code a "Snowflakes Falling" animation in only 5 minutes!

🎥 Yaroslav Shmarov published new videos about:

  • Rails 7 #137 Use ViewComponent to Abstract reusable HTML. Blocks, Slots, Variables

  • Rails 7 #136 Highlight link to current page

🎥 Dean De Hart published new videos about:

  • Craft a Custom Context Menu in Rails 7

  • WebP Support for Active Storage in Ruby on Rails 7

  • Webhooks in Ruby on Rails 7 Tutorial

🎥 Jesus Castello published a new video about Quick Ruby Tip: How to Benchmark Code in IRB #shorts

✍🏾 Articles

What’s new

Justin Searls published an article about  The looming demise of the 10x developer → “Envisioning programmers as belonging to discrete generations who are ushering in a dramatic transition in the industry can equip us to identify the common threads between many of the challenges we’re currently facing. It may even enable us to predict and plan for inevitable difficulties in the future, as more members of the earlier generation age out”

Henrik Nyh published an article about Ruby Module Builder patterns → “I recently discovered the Ruby Module Builder pattern. It lets you pass in arguments to dynamically generate a module at include time”

Alkesh Ghorpade published an article about Rails 7.1 introduces deliver callbacks for ActionMailer → “To simplify code and avoid using Interceptors and Observers, Rails 7.1 added deliver callbacks to ActionMailer”

Deep Dives

I published an article exploring the question Ruby: pass by value or pass by reference? → “Investigate Ruby's approach to passing objects in methods and assignments.”

Akshay Khot published an article about How to Implement Rails-like Views in Ruby → “In this article, we will learn 'one' way to implement the controller-to-view data handoff using instance variables, just like Rails, and following the same conventions as Rails”

Povilas Jurčys published an article about Deep Dive into RSpec's let Helper → “In this article, we will dig deep to explore the potential of the let helper and it's friendly neighbors let! and subject. We will unravel its capabilities for creating reusable variables and optimizing a test code”

Mike Coutermarsh published an article about Performant database tree traversal with Rails → “Learn how to solve a tree traversal N+1 query problem in your Rails application”

How-Tos

Aestimo Kirina published a new article about An Introduction to Devise for Ruby on Rails → “In this tutorial, we'll use a simple Ruby on Rails 7 application featuring users and tasks. Users can register, log in, and log out, with access to create, read, update, and delete actions for tasks depending on their assigned role”

Bill Tihen published a new article about Rails with Mingines (Minimized Engines) → “if you want to have the ability to make a fully independent Engine that can be distributed eventually as a gem - but for mow avoiding a full engine, this article describes doing this”

Brad Gessler published a new article about Tokenized Tokens → An article exploring the Tokenizer service for handling secreted from Fly.io

Joel Moss published a new article about Render a React component with Proscenium → “This guide will walk you through creating a simple React component with Proscenium in a Rails application”

Harrison Broadbent published an article about Seed your database with the Faker gem. Then seed 5x faster with activerecord-import → “In this article, I'm going to show you how to combine seeds.rb with the faker gem to generate heaps of fake testing data (we're going to generate 10,000 fake Post records with faker)”

Kevin Murphy published an article about Testing Inherited Behavior → “This is something that I’ve waffled on, and changed my opinion on, seemingly each time I have to deal with this. For me, a lot of the tension comes from choosing why I’m testing. Am I testing to verify the correctness of the code, or am I testing to document expected behavior?”

Andrei Kaleshka published an article about Select unique latest grouped records from DB → “Nowadays, almost every Ruby on Rails application has a so-called recent records block. This block usually shows statistics or a list of recent things within the project during the last few days searched by some criteria. It can be something like “top 10 products”, “the most popular projects”, or “the most relevant apartments”. Read this blog post the learn how to efficiently build data for these blocks using SQL and window functions in Ruby on Rails app”

Related

Kent Beck published a new article called Fresh Work 80/15/5 → “How do you balance risk, novelty, production, growth, short-term certainty, and long-term viability? I learned a simple rule that has been useful to me and is often cited by my students as a key lesson from coaching”


Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody:

Support the newsletter for ~1.5$/week

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

Share this post

Short Ruby News - Edition #51

newsletter.shortruby.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

© 2023 Lucian Ghinda
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing