Short Ruby Newsletter

Share this post

Short Ruby News - Edition #36

newsletter.shortruby.com

Short Ruby News - Edition #36

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

Lucian Ghinda
Apr 3, 2023
Share

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

๐Ÿ‘‰ย All about Code and Ruby

๐Ÿงฐย Gems, Libraries, and Updates

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

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

๐Ÿค— Founding Members supporting this newsletter


๐Ÿ‘ 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:

  • CVE-2023-28756: ReDoS vulnerability in Time

  • CVE-2023-28755: ReDoS vulnerability in URI

Also, please notice Ruby 2.7 reached EOL:

source: https://www.ruby-lang.org/en/news/2023/03/30/ruby-2-7-8-released/

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

Source: @friendlyrb

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

Source: @RubyUnconfEU

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

Source: @railsconf@ruby.social

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

Source: @MyBuddyAndrew

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

Source: @GregMolnar

๐Ÿคž Enjoy the free subscription to Short Ruby Newsletter! Subscribe to receive it weekly in your inbox:

Becoming a paid subscriber can support this Ruby community 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

๐Ÿ‘‰ All about Code and Ruby

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

Source: @postmodern@ruby.social

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

Source: https://docs.ruby-lang.org/en/3.2/Proc.html#method-i-3E-3E

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

Source: @masukomi@ruby.social

He then added:

Source: @masukomi@ruby.social

and Noel replied with an explanation:

Source: @noelrap@ruby.social

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

Source: @tenderlove@ruby.social

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

Source: @veganstraightedge@ruby.social

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

Source: @salmacoder@ruby.social

๐Ÿ‘‰ 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:

Source: https://github.com/orgs/phlex-ruby/discussions/553

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

Source: @JasonSwett

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

Source: @NateMatykiewicz

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

Source: @vinistock

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

Source: @_rshiva

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

Source: @jeremysmithco

He then added:

Source: @jeremysmithco

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:

Source: @kaka_ruto

They later added:

Source: @kaka_ruto

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

Source: @hopsoft

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

Source: @_swanson
Source: @_swanson

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

Source: @gregnavis

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


๐Ÿงฐ Gems, Libraries, and Updates

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

Source: @avo_hq

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

Source: https://github.com/cmer/ultimate-turbo-modal

๐Ÿงฐ Sam Ruby announced a demo of Live Elements for Rails. Check out the tutorial , the Github Rails demo repository or directly to check the JS library

Source: https://github.com/superfly/stimulus-live-elements

๐Ÿงฐ Nate Berkopec announced the Release 6.2 - Speaking of Now ยท puma/puma

Source: @nateberkopec@ruby.social

๐Ÿงฐ Stimulus Reflex announced a new version v5.0.0.rc1 Read the pre-release notes

๐Ÿงฐ 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

Source: https://github.com/marcoroth/phlexing/releases/tag/v0.4.0

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

Source: https://github.com/mrsked/mrsk/releases/tag/v0.10.0

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

๐Ÿงฐ Dima Fatko announced a new gem job_enqueue_logger: Log background jobs enqueued by your application (additionally with backtraces)

Source: @fatkodima

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

Source: @heartcombo

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

Source: @jeremyevans0

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:

Source: https://github.com/Shopify/yjit-bench/pull/207
Source: https://github.com/Shopify/yjit-bench/pull/207

๐Ÿงฐ 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:

  • Add configurable part_class and scope_class settings

  • Configure part_class and scope_class for app views

  • Include first-party helpers in view part scope classes

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

Source: @searls@ruby.social

๐Ÿงฐ 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

Source: @threedaymonk@ruby.social

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

Source: @etagwerker@ruby.social

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

Source: @mudge@ruby.social

๐ŸคAdam Wathan announced the release of Tailwind CSS v3.3: Extended color palette, ESM/TS support, logical properties, and more

Source: @adamwathan

๐Ÿค Tobias Petry shared a new SQL tip about Time Ranges without Overlapping - Database Tip

Source: @tobias_petry

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

Source: @defunkt

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

And received a lot of answers where people shared how they felt.

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

Source: @donnfelker

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)


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


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

Courses and Books

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

Source: @pragprog@ruby.social

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

Source: @gracefuldev@ruby.social

๐Ÿ—ž Newsletters

๐Ÿ—ž Women On Railsย published a new edition Newsletter #46: what happens when typing in the terminal, sexism in tech in India, pixel art. There is also a French version, anย Italian version and aย Spanish version

๐Ÿ—žJustin Searls shared a new edition of Test Double Dispatch, March Newsletter

๐Ÿ—žRuby On Rails published a new edition This Week in Rails: March 31st 2023 edition

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

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

Podcasts

๐ŸŽงHanami Mastery published a new episode about Behind the scenes of GoRails screencasts with Collin Jilbert

๐ŸŽง Rooftop Ruby published a new episode about 6: Favorite Developer Tools โ€” Rooftop Ruby

๐ŸŽง Jason Swett published a new episode 176 - How to Build a Feature with Irina Nazarova, CEO of Evil Martians

๐ŸŽง The Ruby On Rails Podcast published a new episode about Episode 463: The Tightly Coupled Book Club (with Mina and Aji Slater)

๐ŸŽง The Rails Changelog published a new episode about 002: Rails 7.1 Preps For CPKs & Async Background Records Destruction

๐ŸŽง Ruby For All published a new episode about We Hired a Junior Dev with Mike Munroe

๐ŸŽง Ruby Rogues published a new episode with Jeremy Smith about Organizing Local Ruby Conferences (like Blue Ridge Ruby Conference)

๐ŸŽง Remote Ruby published a new episode about Jason and Andrew Brain Dump | RailsConf, Shoes, DragonRuby, ChatGPT4, Python, mRuby

Videos

Talks

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

๐Ÿ“ฝ๏ธ The Rubber Duck Dev Show published a new episode Hosting After Heroku With Chris Oliver

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!

๐ŸŽฅ Drifting Ruby published a new episode about Episode 394 - Push Notifications from Scratch

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

๐ŸŽฅ Yaroslav Shmarov published a new episode about Ruby on Rails #121 Turbo Broadcasts CRUD Demystified

๐ŸŽฅDeanin published new episodes:

  • Stimulus Character Counters for Ruby on Rails 7

  • The Worst Single Page Rails 7 App You'll Ever See | Ruby On Rails 7 April Fool's Video

Articles

Whatโ€™s new

  • Siddharth Shringi published an article about Rails 7.1 Improves Support for Custom Namespaces

  • Brad Gessler published an article where he used GPT-4 to create a Ruby script โ†’ Pairing with GPT-4

  • Fast Ruby published an article about The Two Different Approaches We Take to Upgrade an Application

  • Avdi Grimm published an article about Why grace matters (for software development)

  • Nathan Thomas published an article about Getting Started โ†’ โ€œMy coding journey began in 2018 when I heard Ruby on Rails discussed on a podcast. My brother taught himself to code, so why canโ€™t I? Quitting my job was out of the question and paying for a bootcamp was out of my reach financially. Self-learning was the path for me.โ€

  • Vinicius Porto published a new article about Using Value Objects in Ruby on Rails

How-Tos

  • Rรฉmi Mercier published an article about How to test your Rails models with RSpec โ†’ โ€œWeโ€™ll cover the fundamental testing strategies with RSpecโ€™s built-in features. And for fun, weโ€™ll check some extra tools to amp up your modelsโ€™ coverageโ€

  • Andrei Kaleshka published an article about Make your Ruby on Rails app 80x faster with SQL โ†’ โ€œThis article will explore the importance of SQL for Ruby on Rails experts. It will show why itโ€™s a must-have skill in todayโ€™s development landscapeโ€. The author published at https://github.com/widefix/demo-fast-sql

  • Avishek Jana published a new article about Set up an SSO Server in Rails 7

  • Bazย published a new article about Using ViewComponents with stimulus controllers and import maps

  • Royce Threadgill published an article about Metaprogramming in Ruby: Intermediate Level

  • Justin Searls shared an article written by Vladimir Dementyev about RuboCoping with legacy: Bring your Ruby code up to Standard

  • Cassey Lottman published an article about CSV.generate behavior change in Ruby 3 vs Ruby 2.7

  • Abdullah Esmail published an article about how to use Custom fonts in production in Rails 7.0

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

  • 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
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