Short Ruby News - Edition #36

Briefly about everything happening in Ruby world - week 13 of 2023

Notice:

Starting next week, I will split the newsletter into two sections and thus send two separate newsletters. Please read more about the why and how here

You can jump directly to a section:

๐Ÿ‘ Our Community

More content: ๐ŸŽฅ ๐ŸŽง ๐Ÿ—ž (courses, books, articles, podcasts, videos, and newsletters)

๐Ÿค— Founding Members supporting this newsletter

For just a small amount of $1.5 per week (only $6.5 a month), you can become a valued paid subscriber and actively support the thriving Ruby community we all love!

By contributing, you'll be playing a pivotal role in fostering growth and maintaining the high standards of ShortRuby for everyone to enjoy.

๐Ÿ‘ Our Community

A series of new Ruby versions were released last week: Ruby 2.7.8, Ruby 3.0.6, Ruby 3.1.4, Ruby 3.2.2 to fix two vulnerabilities:

Also, please notice Ruby 2.7 reached EOL:

๐Ÿ‘ Friendly.rb conference announced a rolling CFP until 1st July. Checkout the website at friendlyrb.com

๐Ÿ‘ Ruby Unconf shared more details about what an unconference means. Check out their website at 2023.rubyunconf.eu

๐Ÿ‘ Rails Conf announced that the schedule for RailsConf 2023 was published. Checkout the agenda at railsconf2023.sessionize.com

๐Ÿ‘ Andrew Hodson announced that Go Rails will start monthly Office Hours - Join their Discord to participate

๐Ÿ‘ Greg Molnar announced they are starting a newsletter โ†’ A weekly newsletter with a Rails trick!

๐Ÿ‘‰ All about Code and Ruby

๐Ÿ‘‰ Postmodern shared about using Proc#[]

Here is the documentation for Proc#[] alias of Proc#call in Ruby 3.2

๐Ÿ‘‰ Kay Rhodes shared a code sample showing how to define methods inside methods in Ruby:

He then added:

and Noel replied with an explanation:

๐Ÿ‘‰ Aaron Patterson shared a code sample showing how to use RubyVM to change the code at compile time:

๐Ÿ‘‰ Shane Becker asked who wants to help and fix the issue Add support for create_operator ยท teoljungberg/fx

๐Ÿ‘‰ Salma Elbadawi shared a thread with tips about Ruby data types:

๐Ÿ‘‰ Noel Rappin shared about how File.join works:

Thanks to Keith Gable's suggestion here, I found this conversation on Twitter where Arron Patterson shared a similar reflection about File.join in 2017 when he discovered and fixed a bug related to File::SEPARATOR. Ryan Bigg shared the location where the separator is defined in the source code.

๐Ÿ‘‰ Joel Drapper shared a code sample in a Github issue showing how to use Dry::Initializer with Phlex:

๐Ÿ‘‰Jason Swett asked about the systematic approach to performance-profiling test suites:

Among the replies, Nate Matykiewicz shared a tip to disable logging while running tests:

๐Ÿ‘‰Vinicius Stock announced that VSCode now includes Ruby LSP in their documentation about Ruby with Visual Studio Code

๐Ÿ‘‰Shiva Kumar shared a thread about another Rails design pattern called the decorator pattern

๐Ÿ‘‰Jeremy Smith asked about naming the state of the app when transitioning:

He then added:

It would be best if you read the conversation in the thread. There are some name proposals and solutions about how to deal with it. Here are some naming proposals:

  • โ€œtransitional stateโ€

  • โ€œliminalโ€

  • โ€œStranglerFigApplicationโ€

  • โ€œLegacyDisplacementโ€

  • โ€œTransitional Architectureโ€

๐Ÿ‘‰ Kaka Ruto shared a code sample showing how to create 135 million records:

They later added:

๐Ÿ‘‰ Nate Hopkins shared a code sample showing how to use ActiveRecord to configure an in-memory SQLite database:

๐Ÿ‘‰ Matt Swanson shared a code sample showing webhook processing:

๐Ÿ‘‰ Greg Navis shared a Ruby code that is valid (please read this as an April Fool's Day joke)

๐Ÿคž I imagine that if you have read so far, you find value in this newsletter. 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:

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

๐Ÿงฐ Gems, Libraries, and Updates

๐Ÿงฐ Avo announced a new release of v.2.29.0, read the release notes here

๐Ÿงฐ Carl Mercier published a demo app showing a simple way to display a model with Hotwire cmer/ultimate-turbo-modal:

๐Ÿงฐ Vladimir Dementyev announced that Rails will adopt Rubocop markdown snippets

๐Ÿงฐ Marco Roth announced an update for Phlexing.fun by launching version 0.4.0, read the release notes 

๐Ÿงฐ DHH announced a new release of mrsk Release v0.10.0 ยท mrsked/mrsk 

๐Ÿงฐ Prabin Poudel announced they added their first open-source PR to boring-generators. Check Adds Overcommit generator for RuboCop

๐Ÿงฐ Heartcombo announced a new release of Devise. Read the changelog

๐Ÿงฐ Jeremy Evans announced a new version of Sequel v5.67.0 Read the changelog

Marian Posฤƒceanu also shared a PR from yjit-bench (a small set of benchmarks and scripts for the YJIT Ruby JIT compiler) that Improve the Sequel benchmark to avoid many singleton classes. Here are two small benchamarks shared in the discussion from that PR:

๐Ÿงฐ Lรกzaro Nixon announced that authentication-zero added an email invitation strategy Read the changelog

๐Ÿงฐ Tim Riley announced a series of PRs about implementing views in Hanami 2:

๐Ÿงฐ Justin Searls announced a new version of standard v.1.26.0 Read the commit

๐Ÿงฐ tailwindcss-rails was updated to version 2.0.27 that now supports Tailwind CSS v3.3.1 

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

๐Ÿค Paul shared a tip about how to report time for how long a process took

๐Ÿค Ernesto shared about how to help open-source projects:

๐Ÿค Paul Mucur shared about the difference between urgency and importance:

๐Ÿค Chris Wanstrath shared a thread about the Github pricing model and free repos:

๐Ÿค Eleftheria Batsou asked about anxiety for an interview:

๐Ÿค Donn Felker asked about what is the first thing one does when joining a new codebase:

Here are just three of the answers received, but you should read the replies as they contain more strategies about how to get familiar with a new codebase:

  • โ€œRead documentation if it exists, run tests and search about unfamiliar technologies and patternsโ€ (@Zahra_HY)

  • โ€œIntentionally break something and look at the stacktrace go brr. Can usually tell me more about the codebase than any docs can.โ€ (@IanIsSoAwesome)

  • โ€œRead by refactoring. Delete all the refactorings when I'm doneโ€ (@SDiamante13)

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

Courses and Books

๐Ÿ‘€ Pragmatic Bookshelf shared that Programming Ruby 3.2 has an update:

๐Ÿ‘€ Graceful.Dev announced their course about Reproducible Development with Containers is now free:

๐Ÿ—ž Newsletters

๐Ÿ—ž๏ธ Ruby Weekly published a new edition: Progress on Ruby's newest parser

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

Podcasts

Videos

Talks

๐Ÿ“ฝ๏ธ Ayush shared that the video of their presentation about Turbo Native at The London Ruby User Group has been published

Screencasts

๐ŸŽฅ Aaron Patterson published a video about working on their LSP concept: LSP Hacking

๐ŸŽฅ Justin Searls published a new episode from their series Searls After Dark #6 - GPT 4 and Beyond!

๐ŸŽฅ Avo published a video showing how to use the new release features Avo 2.29 - Search result path and better mount point discovery

๐ŸŽฅDeanin published new episodes:

Articles

Whatโ€™s new

How-Tos

Deep Dives:

  • Akshay published a new deep dive about Sessions in Rails: Everything You Need to Know โ†’ โ€œIn this post, weโ€™ll learn about Rails sessions, including what is a session, why we need them, and why they're so important. Iโ€™ll also take you behind the scenes and show you how Rails implements sessions and where the `session` method actually comes from.โ€

  • Paweล‚ Dฤ…browski published a deep dive about Delegating things in Ruby โ†’ โ€œThis article is a deep dive into the delegation with Ruby to understand how we can implement it and when. There are a few ways to achieve delegation and it is good to know when to use whichโ€

๐Ÿค— Founding Members supporting ShortRuby

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

Reply

or to participate.