Short Ruby Newsletter

Share this post

Short Ruby News - Edition #33

newsletter.shortruby.com

Short Ruby News - Edition #33

Briefly about everything happening in Ruby world - week 10 of 2023 (web version)

Lucian Ghinda
Mar 13
Share this post

Short Ruby News - Edition #33

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


โœ‹ I am helping organize the Friendly.rb conference:

There are still a few (but not so many) early-bird tickets available and of course, the call for speakers is still open in case you are considering submitting a talk proposal.

๐Ÿ‘ Our Community

๐Ÿ“ข Proud to announce that ShortRuby is growing bigger:

rubyandrails.info is now becoming part of ShortRuby. Read more in the announcement I published ๐Ÿ‘‡

Short Ruby Newsletter
First step toward more ShortRuby
Read more
17 days ago ยท Lucian Ghinda

๐Ÿ‘ James Adam asked for recommendations of accounts to be suggested on Ruby.social instance:

Source: @james@ruby.social

๐Ÿ‘ Matt Valentine House shared they are the newest Ruby core committer:

Source: @eightbitraptor@ruby.social

๐Ÿ‘ Wnb.Rb shared they are organizing a CfP working group session for Brighton Ruby. Subscribe at WNB.rb

Source: @wnb_rb

๐Ÿ‘ Brad Gessler shared that we should use Little Gestures of Confidence and from time to time focus on first-time experience with our projects and tools:

Source: @bradgessler

๐Ÿ‘‰Euruko announced the dates for Euruko 2023 --> 21-23 Sept in Vilnius, Lithuania

Source: @euruko

If you like this content and want to receive it every week by email


๐Ÿ‘‰ All about Code and Ruby

๐Ÿ‘‰ Nate Berkopec shared a code sample showing Ruby code that causes memory growth over time:

Source: @nateberkopec@ruby.social

๐Ÿ‘‰Mudge shared a code sample showing how to duplicate active storage blobs from one record to another:

Source: @mudge@ruby.social

๐Ÿ‘‰Prabin Poudel shared a benchmark about Rails object instantiation being 70 faster than OpenStruct

Source: @coolprobn

Among the replies, Benoit Daloze shared a pull request about improving performance of OpenStruct.

There are also good resources shared in that thread:

  • Alternatives for Rubyโ€™s OpenStruct

  • ActiveSupport::OrderedOptions

  • Ruby global method cache invalidation impact on a single and multithreaded applications

Lucian Ghinda (thatโ€™s me) added the following:

Source: @lucianghinda

๐Ÿ‘‰ Andrea Rocca continues the series about Hotwire. Here is a screenshot from only one of the many tips shared this week:

Source: @ilrock__
  • Hotwire tip 16/30 JS-less tabbed navigation (source)

  • Hotwire tip 17/30 Twitter-style preview/undo/send tweet (source)

  • Hotwire tip 18/30 Markdown editor with live preview (source)

  • Hotwire tip 19/30 Pulse loading state (source)

  • Hotwire tip 20/30 Dynamic select fields (source)

  • Hotwire tip 21/30 Searchable dropdown (source)

  • Hotwire tip 22/30 Kanban board (source)

๐Ÿ‘‰Jeremy Smith asked about what Rails blog post has been the most influential:

Source: @jeremysmithco

There were 3 resources shared:

  • 7 Patterns to Refactor Fat ActiveRecord Models (2012)

  • Enough with the service objects already (2017)

  • Skinny Controller, Fat Model (2006)

  • Rails Hosting: Easy as Pie (2008)

๐Ÿ‘‰Lewis Youl shared a code sample showing what does ActiveModel::Name does

Source: @lewisyoul

๐Ÿ‘‰Jeremy Smith shared two tips about refactoring Rails views:

Source: @jeremysmithco

๐Ÿ‘‰The Rubber Duck Dev Show announced they are doing a Stream Tech Chat on their Rubber Duck Dev Show Discord:

Source: @duckiedevshow

๐Ÿ‘‰Josias Schneider shared how the rake db:migrate works:

Source: @josiasds

๐Ÿ‘‰Josh Cheek shared a gist showing A program that is both a palindrome and a quine, made with hearts for Joe

Source: @josh_cheek

๐Ÿ‘‰Kevin Newton shared a code sample showing how pattern matching is used at ruby/assembler.rb at master

Source: https://github.com/ruby/ruby/blob/master/lib/ruby_vm/rjit/assembler.rb

๐Ÿ‘‰Dev shared a thread with Ruby books recommendations:

Source: @DevanilJr

Here are the recommendations but you should read the thread as he also describes why he recommends each book:

  • Polished Ruby Programming

  • Everyday Rails Testing with RSpec

  • Clean Ruby

  • Deployment from Scratch

  • 99 Bottles of OOP

๐Ÿ‘‰Nate Berkopec shared that safe_constantize can sometimes appear as a bottleneck when used a lot:

Source: @nateberkopec

Jean Boussier replied with a benchmark of const-get-bench.rb

Source: @_byroot

The results look like this:

Source: gist.github.com/casperisfine/5b75ba5d1e5154d785da4efdcc0527a4

๐Ÿ‘‰Carla Urrea Stabile asked a question about what improvements people look forward in the next Ruby versions:

Source: @CarlaStabile

Here are some of the replies:

  • Easy initialize ivars

  • Built-in memoization

  • PHP like construction promotion feature

  • Types

  • Better support for parallelism and distributed computing for fiber scheduler

  • default frozen literals

  • Better types tooling

  • Performance

๐Ÿ‘‰Nate Berkopec shared a about how queueing Puma works (read the comment in the PR)

Source: https://github.com/nateberkopec

๐Ÿ‘‰Vladimir Dementyev shared a code sample showing how they integrated Hanami with Phlex:

Source: @palkan_tula

๐Ÿ‘‰Moncef Belyamani shared commands to run when webpacker takes too much time to compile:

Source: @monfresh

David Teren transformed that into a task:

Source: @davidteren

๐Ÿ‘‰Shiva shared a thread about string manipulation in Rails. Here is one of the code samples they shared:

Source: @_rshiva

๐Ÿ‘‰ Stanislav (Stas) Katkov shared a preview of this new tool PoshTUI (API documentation browser in console for ruby developers)

Source: @5katkov

๐Ÿ‘‰Lucian Ghinda shared in the context of the discussion about Ruby safe navigation operator vs Rails try:

Source: @lucianghinda

๐Ÿ‘‰Jess Brown shared a thread about how to work with db schema changes:

Source: @bjessbrown

๐Ÿ‘‰Moncef Belyamani shared a code sample showing how expressive is Ruby:

Source: @monfresh

๐Ÿ‘‰Kevin Newton shared an update on the YARD:

Source: @kddnewton

๐Ÿ‘‰Kirill Shevchenko shared a code sample about the iterator pattern:

Source: @kirill_shevch

๐Ÿ‘‰ Samuel Williams shared a code sample about a deadlock bug in Async:

Source: @ioquatix

๐Ÿ‘‰Thomas Riboulet shared a thread about Ruby and Docker:

Source: @ThomasRiboulet_

๐Ÿ‘‰Greg Navis shared about how to use as_json to control the keys:

๐Ÿ‘‰Greg Navis shared


๐Ÿ‘‰ You can subscribe for free if you like this kind of content

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


๐Ÿงฐ Gems, Libraries, and Updates

๐Ÿงฐ Joel Drapper announced they released Phlex versions 1.5.0, 1.6.0 and 1.6.1. Read the release notes

๐Ÿงฐ Jared White announced they ported Preact Signals to Ruby. Checkout the signalize gem

Source: https://github.com/whitefusionhq/signalize

๐ŸงฐJoel Drapper shared a PR where someone describes how they plan to use Phlex to render PHP: A possible use-case for unsafe_raw and unescaped attributes ยท joeldrapper/phlex ยท Discussion #519

๐Ÿงฐ Ben Sheldon shared a gem called derailed_benchmarks that helps benchmark Rails or Ruby apps.

๐Ÿงฐ Justin Searls announced that the standardrb is now supported by lsp-zero plugin for Neovim. Read the pull request

๐ŸงฐKasper Timm Hansen announced a new gem called showcase-rails that lets you build previews for your partials, components, view helpers, Stimulus controllers, and more:

Source: https://github.com/bullet-train-co/showcase

๐Ÿงฐ Rubocop released a new version 1.48 adding two new cops: Style/DirEmpty and Style/FileEmpty. Read the full changelog for 1.48 here

๐Ÿงฐ Xavier Noria announced that Rails 7.1 will add Improve support for custom namespaces

Source: https://github.com/rails/rails/pull/47583

๐Ÿงฐ Takashi Kokubun released a new JIT for Ruby RJIT by k0kubun ยท Pull Request #7448 ยท ruby/ruby

Source: https://github.com/ruby/ruby/pull/7448

You can also read the ticket on Ruby tracker: feature 19420 and maybe you want to read the article Takashi published RJIT: A Pure-Ruby JIT for Ruby

๐Ÿงฐ Joel Drapper announced that turbo-rails has now support for rendering Phlex and ViewComponents Read the pull request here

Source: https://github.com/hotwired/turbo-rails/pull/433

๐Ÿงฐ Stan Lo announced that irb can now be independently updated as the following PR was merged Make irb a railties dependency

๐Ÿงฐ Vladimir Dementyev shared a PR about rspec-mocks not working well with Rails 7.1 breaks receive().with. There is already a fix merged to rspec-mocks

๐Ÿงฐ Konstantin Gredeskoul announced they created a PR for making puma-daemon to work with Puma v5+ Read the PR here

๐Ÿงฐ Mari Imaizumi announced the release of IRB v1.6.3 Read the changelog

๐Ÿงฐ Vinicius Stock announced the release of vscode-ruby-lsp v0.2.0 Read the changelog

Source: https://github.com/Shopify/vscode-ruby-lsp

๐ŸงฐJoe Masilotti announced the release of TurboNavigator: A drop-in class for Turbo Native apps to handle common navigation flows.

๐ŸงฐDHH announced the release of mrsk v0.9.0 Read the release notes

๐Ÿงฐ Andrew Culver shared a PR that shows how to integrate Nice Partials into bullet train Update callers to Nice Partials method accessors

๐Ÿงฐ Nate Hopkins announced a new gem composite_cache_store a composite cache store comprised of 2 ActiveSupport: :Store instances


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

๐ŸคEric Berry shared a configuration to change the Discord window

Source: @coderberry

๐ŸคEmma Bostian asked an excellent question about the mood we are in now.

Source: @EmmaBostian

๐ŸคDrew Bragg shared a funny take about hard things in computer science:

Source: @DRBragg

๐Ÿค Shiva shared a thread about working with Redis. Here is one of the posts:

Source: @_rshiva

You should also read the second thread about Redis.

๐Ÿค Wes Bos shared a tip about configuring ngrok-like behavior via Cloudflare:

Source: @wesbos

If you like this content and want to receive it every week by email:


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

๐Ÿ—ž Newsletters

๐Ÿ—ž Greg Molnar published a new edition of This Week in Rails: Improve custom namespace autoloading, Object#with and more!

๐Ÿ—ž๏ธย Ruby Weeklyย published a new edition:ย RubyGems' answer to npx

๐Ÿ—ž Ruby Radar published a new edition Ruby Radar #93 - IRB Making Waves

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

Podcasts

๐ŸŽง Joel Drapper published a new episode of Rooftop Ruby 4: Green Dots and Boogie

๐ŸŽง Code And The Coding Coders Who Code It published a new episode with Andrew Mason

๐ŸŽง Jeremy Smith published a new episode IndieRails | Colin Keeley - How/Why to buy or sell a business

๐ŸŽง The Ruby On Rails Podcast published a new episode about Episode 460: The State of Rails Hiring in 2023 (Brittany + Brian)

๐ŸŽงContent For :Devs published a new episode #007 - Behind the scenes of GoRails screencasts with Collin Jilbert - content_for :devs

๐ŸŽงMaintainable Software Podcast published a new episode about Henrik Warne - There is No Software Maintenance

๐ŸŽงJason Swett published a new episode about 175 - Preventing Software Defects with Vitor Oliveira - The Code with Jason Podcast

๐ŸŽง Ruby For All published a new episode about Development Gems | Ruby for All | Episode 33

๐ŸŽง Remote Ruby published a new episode about Ruby Language Server with Vinicius Stock | Remote Ruby | Episode 221

Videos

Talks

๐Ÿ“ฝ๏ธ Jason Swett published a new episode about Organizing Rails code with Jorge Manrubia of 37signals

๐Ÿ“ฝ๏ธ Creston Jamison published a new episode about Failing In Public | Rubber Duck Dev Show 76

๐Ÿ“ฝ๏ธ Joe Masilotti published a live video about Launching TurboNavigationController

๐Ÿ“ฝ๏ธ Prabin Poudel shared their video about Maintaining Code Standards

๐Ÿ“ฝ๏ธ The Rubber Duck Dev Show published a new episode about Monetizing Dev Content

๐Ÿ“ฝ๏ธ Jason Swett published a new episode about What causes flaky tests (2023-03-09 Code with Jason Meetup session)

Screencasts

๐ŸŽฅ Justin Searls published the third episode of their series called Searls after Dark where he build an AI chat app with Ruby on Rails #3 - Going end-to-end

๐ŸŽฅ Ruby Weekly shared a new video from WebCrunch showing how to implement Ruby on Rails Drag and Drop Uploads with Active Storage, Stimulus.js

๐ŸŽฅ Dave Kimura published a new episode about MRSK in Depth | Drifting Ruby

๐ŸŽฅ Hanami Mastery published a new episode about Best way to work with Front Matter in Ruby!

๐ŸŽฅ Phil Smy published a new episode about Rails 7: Tabulator & Stimulus - Ruby on Rails Tutorial

๐ŸŽฅ Pete Hawkins published a new episode about Simplify your VIEW COMPONENTS with dry-initializer

๐ŸŽฅ The Rubber Duck Dev Show published a new episode doing Crash of Code The Big 5-0 Birthday Bash / Clash of Code - Coding with Chris

๐ŸŽฅ Deanin published a series of videos:

  • Nested Forms with the Cocoon Gem | Ruby On Rails 7 Tutorial

  • Stimulus Nested Forms | Ruby on Rails 7 Tutorial

  • Stimulus Popovers For Devise Users With Avatars | Ruby On Rails 7 Tutorial

๐ŸŽฅ Pete Hawkins shared a short video on Twitter about Free custom error page templates for your Rails app (he also shared the code here)

๐ŸŽฅ Yaroslav Shmarov published new episodes:

  • Ruby on Rails #116 Custom error pages (404 Not found and 500 Internal server error)

  • CertificateOwl day2 - building a proof-of-concept (POC) app with Ruby on Rails

Articles

Whatโ€™s new

  • Paweล‚ ล›wiฤ…tkowski published a new article about Underrated pattern of an inline event dispatcher

  • Cameron Youngblood published a new article about Intro | Junior Rails Review

How-Tos

  • Sam Ruby published an article explaining how to run systems tests on CI/CD

  • Lucas Barret published a new article about Rails Generator for GraphQL queries

  • Equivalent published a new article about Rails's .try vs Ruby's &. (a.k.a safe navigation)

  • Takashi Kokubun published a new article about RJIT: A Pure-Ruby JIT for Ruby

Deep Dives

  • William Neal shared an older article (2022) about Minitest vs. RSpec in Rails

  • Nate Berkopec shared an older article (2020) written by Konstantin Gredeskoul about Test your Understanding of Ruby Concurrency

  • Ruby Lib Hunt shared an article about Ruby 3.2's WASI Integration: A Closer Look

Related

  • Test Double published an article about How we support Double Agents with onboarding buddies


๐Ÿค— 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

  • Jason Charnesย from Remote Ruby

  • Andy Croll fromย One Ruby Thingย and FirstRubyFriend

  • Kyle Keesling

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

Share this post

Short Ruby News - Edition #33

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