- Short Ruby Newsletter
- Posts
- Short Ruby News - Edition #31
Short Ruby News - Edition #31
Briefly about everything happening in Ruby world - week 8 of 2023
You can jump directly to a section:
More content: 🎥 🎧 🗞 (articles, podcasts, videos, and newsletters)
🤗 Founding Members supporting this newsletter
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.
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:
Matz added:
👐 Adrian Marin announced a new international Ruby conference happening in Europe Friendly.rb. I am part of the organising team :)
👐 Please be aware that Ruby 2.7 will reach EOL at the end of March 2023:
👐 If you are a junior Ruby developer there is a conversation on Reddit where you can find more people to connect to:
👐 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)
👉The Rubber Duck Dev Show shared I think one of the common things we all feel about our Ruby community:
👐 Eric Berry announced that RubyMine provided him with a discount code of 20% off for Monthly and yearly plans with JetBrains Toolbox
👉 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.
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 [email protected]. We can help you write an email to pitch it to your technical leadership
👉 Nate Berkopec shared a tip about how to manage jobs:
👉 Postmodern shared the difference between URI.regexp and URI.parse
Here are some of the responses:
👉Paweł świątkowski shared their findings about what slows down testing Hanami apps:
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?
The possible explanation for this seems to be (rb_true and rb_obj_not_equal from Ruby source code)
It also seems that nil != value is almost close to value.nil?
👉Noel Rappin shared a TIL about string unary operations - and +
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:
Here are some other proposals from the discussion, but it is worth reading them all:
👉Paweł świątkowski shared a code sample about an Entity Component System used to model business logic:
👉 Olivier Lacan shared they are working to update their Ruby on Rails: The Big Picture course:
👉 /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:
👉Emmanuel Hayford shared a code sample showing how to organised jobs in bulk in Rails 7.1
👉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:
👉 Andrea Rocca shared a series of thread about Hotwire:
👉Nate Berkopec shared that configuring too many threads in Puma might increase average latency:
👉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):
👉Matt Swanson shared a code sample showing how to use validation scopes in Rails:
👉Stanislav (Stas) Katkov shared a thread about doing performance optimisation for Rails test suits:
It is worth looking at the code Stanislav shared on Github
👉Jeremy Smith shared a take about using Rails controller as service objects:
The entire conversation is good to read exploring various ways to organise code in Rails controllers. Here are some of replies:
👉Xavier Noria started a conversation about using constants vs global variables usage
Here are some ideas from the conversation:
👉Nate Berkopec shared about Rails memory usage:
Sam Saffron added:
👉Lucas The Dev reminded us about with_options feature of ActiveSupport:
👉Nate Hopkins reminded that there are a lot of advantages to invest time in proper designing ActiveRecord model layer:
You should read the thread as there are many good responses. Here are some of them:
👉Brad Gessler shared a code sample showing how to use Module.prepand for Middleware in a their rowdy web routing project:
👉Kirill Shevchenko shared a code sample about Template Method pattern:
👉Stephen Swann shared a code sample showing how to use find_in_batches to query an API that has a limit:
And if you are curious about the implementation of perform_with_jitter:
👉Moses Gathuku shared a code sample showing how to use turbo_stream to update templates:
👉Matt Swanson shared a code sample showing how they used nested concerns:
👉Kevin Newton shared how they created a Ruby parser that is faker than json/pure. Check it out at Faster JSON parser in Ruby
👉Stephen Swann shared a warning about prepend_view_path that can have memory issues:
Vladimir also added:
👉Kevin Newton shared that Syntax Tree playground now has support for mermaid diagrams:
👉Yusuke Endoh shared a quine that works on all Ruby versions. Check it out here Rubyの全バージョンで動くQuine - まめめも
👉Prabin Poudel shared a code sample about difference between using {…} and (…) in RSpec:
🧰 Gems, Libraries, and Updates
🧰 Adrian Marin shared an update the next version of Avo Admin for Rails:
🧰 Jean Boussier shared the pid_cache gem that caches calls to Process.pid to avoid useless system calls on modern Linux:
🧰 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:
🧰 Felipe Vogel shared a library called sconover/wrong:
🧰 Joel Drapper shared they released version 0.7.1 of phlex-rails. Read the changelog
🧰 Postmodern announced their new gem called 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:
🧰 Stimulus Reflex announced the release of stimulus reflex v.3.5.0.pre10. Read the changelog:
🧰 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:
🧰 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)
🧰 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
🤝 Related (but not Ruby-specific)
🤝Noel Rappin shared a take about complexity while using SPAs:
🤝Irina Nazarova shared about how dev tools products are switching to 3-month launch week:
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:
🎥 Brighton Ruby published their videos from Brighton Ruby 2022
🎥 Yaroslav Shmarov published a couple of new videos showing:
🎥 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
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
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
Reply