Short Ruby Newsletter

Share this post

Short Ruby News - Edition #31

newsletter.shortruby.com

Short Ruby News - Edition #31

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

Lucian Ghinda
Feb 28
Share this post

Short Ruby News - Edition #31

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


You can subscribe for free

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


๐Ÿ‘ Our Community

๐Ÿ’Ž We are celebrating Ruby's 30th birthday. There are so many great tweets about Ruby that for me was very hard to choose something to put here and putting them all would have made this newsletter almost infinite.

You can read them all on Twitter or on Mastodon

Here is a short history piece about naming the language:

Source: https://blade.ruby-lang.org/ruby-talk/88819

Matz added:

๐Ÿ‘ Adrian Marin announced a new international Ruby conference happening in Europe Friendly.rb. I am part of the organising team :)

Source: @adrianthedev

๐Ÿ‘ Please be aware that Ruby 2.7 will reach EOL at the end of March 2023:

Source: https://www.ruby-lang.org/en/downloads/branches/

๐Ÿ‘ If you are a junior Ruby developer there is a conversation on Reddit where you can find more people to connect to:

Source: /u/ratbiscuits

๐Ÿ‘ Evil Martians announced they are launching a series of online round table discussions Join Ep. 1 โ€”ย Building communities around products, Thu, Mar 2, 2023, 11:00 (PT)

Source: @evilmartians

๐Ÿ‘‰The Rubber Duck Dev Show shared I think one of the common things we all feel about our Ruby community:

Source: @duckiedevshow

๐Ÿ‘ Eric Berry announced that RubyMine provided him with a discount code of 20% off for Monthly and yearly plans with JetBrains Toolbox

Source: @coderberry

๐Ÿ‘ Avi.Nyc shared about how Ruby on Rails with the latest addons helps create rich web apps:

Source: @aviflombaum

๐Ÿ‘‰ All about Code and Ruby

๐Ÿ‘‹๐Ÿ‘‹ I'm very excited to announce Friendly.rb, a new Ruby conference I'm organizing in Bucharest, Romania on 27-28 September 2023.

With a focus on community, Friendly.rb is keeping it cozy with 100-ish attendees and some of the best European speakers. Our CFP is open until April 1st. As a speaker at Friendly.rb, you'll have the opportunity to connect with like-minded developers, share your expertise with a curious audience, gain valuable exposure in the Ruby community, and some perks from us.

Apply to be a speaker

PS: We also have limited sponsorship spots. If you think your company might benefit by sponsoring, let's get in touch. Send us a message at sponsorship@friendlyrb.com. We can help you write an email to pitch it to your technical leadership


๐Ÿ‘‰ Nate Berkopec shared a tip about how to manage jobs:

Source: @nateberkopec@mastodon.social

๐Ÿ‘‰ Postmodern shared the difference between URI.regexp and URI.parse

Source: @postmodern@ruby.social

๐Ÿ‘‰James asked a question about ways of handling error responses from a third-party API:

Source: @jsrn@ruby.social

Here are some of the responses:

A code sample showing how to use Dry::Monads and Date.define to return status from a HTTP client
Source: @lucian@ruby.social
Source: @alassek@ruby.social
Source: @wndxlori@ruby.social

๐Ÿ‘‰Paweล‚ ล›wiฤ…tkowski shared their findings about what slows down testing Hanami apps:

Source: @katafrakt@ruby.social

An issue was reported out of this to faker: Speedup require and first call #2719 and it seems that the most time is consumed in parsing fakers translations.

Another proposed solution was to use transactions for cleaning. See example of how to do this in the decafsucks/decafsucks repository.

๐Ÿ‘‰Postmodern shared a microbenchmarking about testing value != nil vs value.nil?

Source: @postmodern@ruby.social

The possible explanation for this seems to be (rb_true and rb_obj_not_equal from Ruby source code)

Source: @jc00ke@hackyderm.io

It also seems that nil != value is almost close to value.nil?

Source: @mculp@ruby.social

๐Ÿ‘‰Noel Rappin shared a TIL about string unary operations - and +

Source: @noelrap@ruby.social

For more details Ryan Big shared the commit where these methods were implemented and Patrick de Heus confirmed that unary minus is aliased as dedu. You can read about the proposal of aliasing it by reading the Alias String#-@ as String#dedup on Ruby issue tracker.

๐Ÿ‘‰Dave Copeland started a discussion about what is missing from Rails:

Source: @davetron5000@ruby.social

Here are some other proposals from the discussion, but it is worth reading them all:

Source: @carol@crabby.fyi
Source: @soulcutter@ruby.social

๐Ÿ‘‰Paweล‚ ล›wiฤ…tkowski shared a code sample about an Entity Component System used to model business logic:

Source: @katafrakt@ruby.social

๐Ÿ‘‰ Olivier Lacan shared they are working to update their Ruby on Rails: The Big Picture course:

Source: @olivierlacan@ruby.social

๐Ÿ‘‰ /u/schneems published an interesting vision about formatting and linters in Ruby. You should read the entire comment here, as I am including only a part of it:

Source: /u/schneems

๐Ÿ‘‰Emmanuel Hayford shared a code sample showing how to organised jobs in bulk in Rails 7.1

Source: @siaw23

๐Ÿ‘‰Luca Guidi shared a thread showing how to setup Hanami with Sidekiq. Here is one of the steps showing how to configure a sidekiq provider:

Source: @jodosha

๐Ÿ‘‰ Andrea Rocca shared a series of thread about Hotwire:

  • Hotwire tip 2/30 Realtime online users with TurboBroadcasts

  • Hotwire tip 3/30 Animations for online offline (code)

  • Hotwire tip 4/30 ๐Ÿช„ JS-less modals

  • Hotwire tip 5/30 Build infinite scrolling in less than 5 minutes (code)

  • Hotwire tip 6/30 Dynamic Nested forms (code)

  • Hotwire tip 7/30 (Almost) JS-less table filters (code)

๐Ÿ‘‰Nate Berkopec shared that configuring too many threads in Puma might increase average latency:

Source: @nateberkopec

๐Ÿ‘‰Greg Navis shared a thread about how to make a method recognise when it was called with no arguments vs when it was called with arguments set to nil (when arguments are passed vs when they are not passed):

Source: @gregnavis

๐Ÿ‘‰Matt Swanson shared a code sample showing how to use validation scopes in Rails:

Source: @_swanson

๐Ÿ‘‰Stanislav (Stas) Katkov shared a thread about doing performance optimisation for Rails test suits:

Source: @5katkov

It is worth looking at the code Stanislav shared on Github

๐Ÿ‘‰Jeremy Smith shared a take about using Rails controller as service objects:

Source: @jeremysmithco

The entire conversation is good to read exploring various ways to organise code in Rails controllers. Here are some of replies:

Source: @_swanson
Source: @rockatanescu

๐Ÿ‘‰Xavier Noria started a conversation about using constants vs global variables usage

Sourcthe e: @fxn

Here are some ideas from the conversation:

Source: @fxn
Source: @_byroot

๐Ÿ‘‰Nate Berkopec shared about Rails memory usage:

Source: @nateberkopec

Sam Saffron added:

Source: @samsaffron

๐Ÿ‘‰Lucas The Dev reminded us about with_options feature of ActiveSupport:

Source: @yet_anotherDev

๐Ÿ‘‰Nate Hopkins reminded that there are a lot of advantages to invest time in proper designing ActiveRecord model layer:

Source: @hopsoft

You should read the thread as there are many good responses. Here are some of them:

Source: @bradgessler
Source: @kaspth
Source: @rockwell_

๐Ÿ‘‰Brad Gessler shared a code sample showing how to use Module.prepand for Middleware in a their rowdy web routing project:

Source: @bradgessler

๐Ÿ‘‰Kirill Shevchenko shared a code sample about Template Method pattern:

Source: @kirill_shevch

๐Ÿ‘‰Stephen Swann shared a code sample showing how to use find_in_batches to query an API that has a limit:

Source: @MrStephenSwann

And if you are curious about the implementation of perform_with_jitter:

Source: @MrStephenSwann

๐Ÿ‘‰Moses Gathuku shared a code sample showing how to use turbo_stream to update templates:

Source: @Gathukumose

๐Ÿ‘‰Matt Swanson shared a code sample showing how they used nested concerns:

Source: @_swanson

๐Ÿ‘‰Kevin Newton shared how they created a Ruby parser that is faker than json/pure. Check it out at Faster JSON parser in Ruby

Source: @kddnewton

๐Ÿ‘‰Stephen Swann shared a warning about prepend_view_path that can have memory issues:

Source: @MrStephenSwann

๐Ÿ‘‰Vladimir Dementyev shared

๐Ÿ‘‰Vladimir Dementyev shared

Vladimir also added:

Source: @palkan_tula

๐Ÿ‘‰Kevin Newton shared that Syntax Tree playground now has support for mermaid diagrams:

Source: @kddnewton

๐Ÿ‘‰Yusuke Endoh shared a quine that works on all Ruby versions. Check it out here Rubyใฎๅ…จใƒใƒผใ‚ธใƒงใƒณใงๅ‹•ใQuine - ใพใ‚ใ‚ใ‚‚

Source: @mametter

๐Ÿ‘‰Prabin Poudel shared a code sample about difference between using {โ€ฆ} and (โ€ฆ) in RSpec:

Source: @coolprobn

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

๐Ÿงฐ Adrian Marin shared an update the next version of Avo Admin for Rails:

Source: @adrianthedev

๐Ÿงฐ Jean Boussier shared the pid_cache gem that caches calls to Process.pid to avoid useless system calls on modern Linux:

Source: @_byroot

๐Ÿงฐ Jared White announced the release of Ruby2JS 5.1. Read the changelog here:

Ruby2JS is an extensible Ruby to modern JavaScript transpiler you can use in production today.

๐Ÿงฐ Bart De Water shared a gem that helps set better security headers for Rails github/secure_headers: Manages application of security headers with many safe defaults

๐Ÿงฐ Soutaro Matsumoto shared that RBS 3.0 is released Read the release notes

๐Ÿงฐ Joel Drapper shared their new testing library called green_dots. Here is a code sample using green_dots to test itself:

Source: https://github.com/joeldrapper/green_dots

๐Ÿงฐ Felipe Vogel shared a library called sconover/wrong:

Source: @fpsvogel@ruby.social

๐Ÿงฐ Joel Drapper shared they released version 0.7.1 of phlex-rails. Read the changelog

๐Ÿงฐ Postmodern announced their new gem called rubocop-ronin:

Source: https://github.com/ronin-rb/rubocop-ronin

๐Ÿงฐ Adam Doppelt published an extension for VScode called Ruby Open Gem that helps with opening gem sources from VScode.

๐Ÿงฐ Okura Masafumi shared a repository showing "30 ways for hello world in Ruby okuramasafumi/Ruby30Event

๐Ÿงฐ Samuel Williams shared an update of sus-vscode extension that now supports running tests interactively:

Source: @ioquatix

๐Ÿงฐ Stimulus Reflex announced the release of stimulus reflex v.3.5.0.pre10. Read the changelog:

Source: https://github.com/stimulusreflex/stimulus_reflex

๐Ÿงฐ Bram Jetten announced a new release of SpinaCMS: Release v2.14.0 ยท SpinaCMS/Spina. This includes search in the media library, new PageLink part and collapsable nested pages

๐Ÿงฐ Vinicius Stock announced a new release of ruby-lsp. Read about this at Release v0.4.1 ยท Shopify/ruby-lsp:

Source: @vinistock

๐Ÿงฐ Rodrigo Serradura shared a repository they created to show 7 different ways to organise Rails code base Rails (API) app that shows different kinds of architecture (one per commit)

Source: https://github.com/serradura/from-fat-controllers-to-use-cases

๐Ÿงฐ Koichi Ito announced a new release of Rubocop Rails. Read the changelog here

๐ŸงฐJanko Marohniฤ‡ announced a new release of rodauth-rails Read the full changelog here

Source: https://github.com/janko/rodauth-rails

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

๐ŸคNoel Rappin shared a take about complexity while using SPAs:

Source: @noelrap@ruby.social

๐ŸคIrina Nazarova shared about how dev tools products are switching to 3-month launch week:

Source: @inazarova

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

๐Ÿ“š Books

Roman Pushkin updated the latest edition of Ruby is For Fun book

๐Ÿ—ž Newsletters

๐Ÿ—žNate Berkopec published a new edition of their Ruby/Rails performance newsletter: In benchmarking, more is always better, right?

๐Ÿ—žJoe Masilotti published a new edition of Hotwire Dev Newsletter: February 2023

๐Ÿ—žGreg Molnar announced a new This Week in Rails newsletter about The Rails Foundation update, perform_all_later in AJ and more

๐Ÿ—ž๏ธย Ruby Weeklyย published a new edition:ย Incredibly fast Ruby formatting

๐Ÿ—ž Ruby Radar published a new edition Ruby Radar #91 - Rubyโ€™s 30th Birthday

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

Podcasts

๐ŸŽงContent For :Devs published a new episode with Ayush Newatia about his book The Rails and Hotwire Codex

๐ŸŽงIndie Rails published a new episode with Listen to Joe Masilotti

๐ŸŽง Code And The Coding Coders Who Code It published a new episode about Episode 17 - Joe Masilotti

๐ŸŽง The Ruby on Rails Podcast published a new episode about Episode 458: LEARN Academy with Adam Cuppy, Sarah Proctor and Chelsea Kaufman

๐ŸŽงJason Swett published a new episode about 174 - Freelancing with Jeremy Smith

๐ŸŽงHanami Mastery announced a new episode about Live stream Magic with Chris Booth!

๐ŸŽง Ruby For All published a new episode about Favorite Ruby Methods: Part 4 - Enumerables + Bonus Methods

Videos

Talks

๐Ÿ“ฝ๏ธ Dave Kimura published the video walkthrough of This Week in Rails

๐Ÿ“ฝ๏ธ Hanami Mastery published a episode about 1 year in Ruby then 1 book done! Ayush Newatia

๐Ÿ“ฝ๏ธThe Rubber Duck Dev Show published a new episode about Ruby IDE Showdown With Adrian Marin, CJ Avilla & Eric Berry

Screencasts

๐ŸŽฅ Justin Searls announced the beginning of a new screencast series called Searls After Dark where he will build a Ruby on Rails app on camera.

๐ŸŽฅ RubyCademy published a short video about Be careful when using the shorthand for one-line methods

๐ŸŽฅ Hanami Mastery published a new video about Deploying Hanami Apps to Render

๐ŸŽฅ Deanin published a couple of videos showing:

  • Ruby On Rails 7 Audio Visualizer With Wave.JS

  • Custom Button Actions in Ruby on Rails 7 for Beginners

  • Routing For Beginners In Ruby On Rails 7

๐ŸŽฅ Brighton Ruby published their videos from Brighton Ruby 2022

๐ŸŽฅ Yaroslav Shmarov published a couple of new videos showing:

  • Ruby on Rails #113 Kredis Live counter, HTTP vs Websocket Turbo Broadcasts

  • Ruby on Rails #114 Recently viewed products with Kredis

๐ŸŽฅ Pete Hawkins shared a short Ruby video Tip about using Struct

Articles

Whatโ€™s new

  • Ruby On Rails announced that Amanda Perino is our new executive director for The Rails Foundation

  • Johan Halse published an article about What to expect from your framework

  • Julian Rubisch published Storing Ephemeral UI State with Kredis for Rails | AppSignal Blog

  • Ruby Gems Status announced about Dependency API Deprecation - RubyGems Blog

  • Andrew Atkinson published an article exploring various gems for partitioning tables Rails: Postgres Native Partitioning

How-Tos

  • Andrei Kaleshka published an article about Unlocking the Power of ChatGPT with Ruby

  • Team Qameta published an article about How to migrate from Webpacker to jsbundling-rails in Ruby on Rails

  • Sam Ruby published a new article about how to do Health Checks in Rails 7.1 with Fly.io

  • Yaroslav Shmarov published an article about Send SMS with Twilio in Rails

  • Maciej Mensfeld shared an article written by Michael Krisher about Using Avro in Ruby

  • Sulman Baig published Clean Code Tip: Create a Service Object and Improve Your GraphQL Mutations in Rails

  • Kane Hooper published Creating an Intelligent Knowledge Base Q&A App with GPT-3 and Ruby

  • Lucas Barret published How I Turned My Coffee Addiction into a Ruby and Postgres Adventure

  • Neal Chambers published Basic Troubleshooting with Docker and Ruby on Rails

  • Yaroslav Shmarov published Send SMS with Twilio in Rails

Deep Dives

  • Mohit Sindhwani shared the 3rd part of Ruby Learning by Reversing: Native Gems, Part 3

  • Dmitry Tsepelev published a deep dive about How to find a memory bloat in your Rails app before it happens

  • Evgeniy Demin published an article about Ruby Numbers and the Memory: how I got confused

  • Eileen M. Uchitelle published an article going into a deep dive about The Case Against Monkey Patching, From a Rails Core Team Member

  • Vinicius Stock published an article explaining why the Ruby LSP was created Improving the Developer Experience with the Ruby LSP

More general

  • Lucas Barret published Rubocop: The Sheriff of Your Codebase

Related

  • Jason Yip published an article about The age of cargo cult Agile must end


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

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

Share this post

Short Ruby News - Edition #31

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