- Short Ruby Newsletter
- Posts
- Short Ruby News - Edition #65
Short Ruby News - Edition #65
Discover the world of Ruby in this comprehensive newsletter covering week 43 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
Consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody
You can jump directly to a section:
🚀 New Products & 📅 Events
More content: 📚 🗞 🎧 🎥 ✍🏾 (articles, podcasts, videos, newsletters)
🚀 New Products
🚀 David Heinemeier Hansson announced Skiff. See the video on twitter or on nitter:
🚀 Jared White launched his new course Building Courseware I Can Understand: The Launch of CSS Nouveau
📅 Events
📅 Andrew Atkinson shared that 2024 Southeast Ruby in Memphis, TN is back:
📅 Robb Shecter announced they are starting the Denver meetup again and asked us to fill in the survey about day and time and join the meetup
👉 All about Code and Ruby
👉 Maxime Chevalier shared their paper about YJIT: a basic block versioning JIT compiler for CRuby is published
👉 Kerri Miller (Parody) asked about the difference between let and subject in RSpec:
Here are some of the answers
👉 Deepak Mahakale shared about using find_each over all when expecting a large dataset:
👉 Jan Dudulski asked about strategies to handle JSON payloads:
Here are some of the possible ways to achieve the same:
👉 Janko Marohnić asked about how to differentiate between default value from DB and user input:
Ariel Juodziukynas proposed the solution:
👉 Bhumi shared about Ruby keywords:
👉 Naofumi Kagami shared about why not have fat controllers:
👉 Dr Nic Williams shared about RBS boolish:
See the section here:
👉 Simon Chiu shared about their gem geetfun/deployed
👉 Robby Russell shared about Rails being the Radiohead of software read it full at Rails In 2024: Still Relevant Or Living In the Past
If you want to read other people reactions here are some places where this was posted: r/ruby (22 comments), r/programming (339 comments)
👉 Yaroslav Shmarov shared a code sample showing the email regexp validator from Ruby:
👉 Alessandro Rodi showed that when retrying it is important to be aware of caching:
👉 Josh Pigford asked about the simplest way to render a boolean toggle:
Matt Swanson replied:
👉 Panos shared an IRB easter egg:
Support ShortRuby by subscribing for only $7.5/month ($1.8/week). Get an ad-free experience and help us maintain our quality for everyone.
👉 Kevin Glowacz shared how they managed to run Ruby 3.2 on Elastic Beanstalk:
👉 Emmanuel Hayford shared a tip about changing the DB in Rails:
👉 Andrea Rocca shared they used turbo_boost-commands: Commands to help you build robust reactive applications with Rails & Hotwire
👉 Chris Oliver shared a Ruby tip about choosing to define methods instead of method_missing:
👉 Maxim Gurin shared a security tip about doing symbol to string coercion:
👉 Joel Moss shared about how using Stimulus and Turbo cut the JS lines of code:
👉 Vladimir Dementyev shared a slide they work on about advantages of profiling tests:
Here are some answers:
👉 Nate Hopkins shared a trick for debugging deep app internals:
👉 Joe Masilotti shared a code sample of handling authentication when working with Turbo Native:
👉 Kevin Newton shared that Prism supports JavaScript
👉 Dhaval Singh asked about the order of the after_commit hooks are run:
Petrik De Heus answered and provided a link to a PR about after_commit callbacks run in the wrong order
👉 Matt Swanson shared about adding extra checks in development to catch bugs:
👉 Bhumi shared about & in Ruby:
👉 Yaroslav Shmarov shared about using Postgres for Action Cable (see Action Cable Guides) and he also shared there are some limitations - read this
👉 John Nunemaker shared about using net_http_timeout_errors: Provides a list of Net::HTTP timeout errors
👉 Matt Swanson shared a code sample about writing a test instead of a TODO to remember what to remove when upgrading:
👉 Santanu Bhattacharya shared about using yard stats to show undocumented objects:
👉 I asked about email service with generous free tier:
Here are some of the replies: Postmark, Brevo, AWS SES, SendGrid, Qui, MailPace, Resend, MailerSend, MailGun, MailJet,
👉 Yusuke Endoh shared a slide about TracePointを活用してモデル名変更の負債解消をした話
👉 Georgie Boy shared some performance stats for using Phlex Components:
👉 /u/okizeme asked about salaries for Rails developers and received almost 100 responses:
👉 u/just-for-throwaway asked about the idiomatic way to handle validations (click to read their entire post as it includes more information that what I added here):
Please consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. Your contribution aids growth and maintains the quality of ShortRuby for everybody
🧰 Gems, Libraries, Tools and Updates
🆕 🧰 Dr Nic Williams announced a new gem searchcraft - Instant Search for Rails and ActiveRecord using SQL materialized views
🆕 🧰 Joel Moss announced a new gem inspectacular: Custom inspection for your Ruby objects
🆕 🧰 Vladimir Dementyev announced a new gem imgproxy/imgproxy-rails
🆕 🧰 Chad Wilken announced a new gem chadwilken/tiptap-ruby: A library that allows you to generate, parse, and render TipTap documents in Ruby
🆕 🧰 Julián Pinzón announced a new gem called actionview_attribute_builders
🧰 Jake Zimmerman announced a new version of Sorbet that now supports Methods with Overloaded Signatures · Sorbet
🧰 Alexander Adam shared a gemcrimson-knight/fruit_juice: A simple gem for triggering background jobs in Ruby into Crystal for the Mosquito background processor
🧰 Glauco Custódio announced a new release for tanakai - Tanakai is a modern web scraping framework written in Ruby. A fork of Kimurai
🧰 Gert Jan Peeters announced they made stimulus-lsp work on neovim feat: add stimulus-language-server support by Gert-JanPeeters · Pull Request #2870 · neovim/nvim-lspconfig
🆕 🧰 Faraaz Ahmad announced a new gem tainted: Taint checking for Ruby using data-flow analysis
🧰 Nate Hopkins announced a draft PR for UniversalID gem - Update serialization to use MessagePack
🧰 Dr Nic Williams shared an announcement from Heroku that pgvector now generally available for Heroku Postgres | Heroku Dev Center
🧰 Benjamín Silva H. talked about chaskiq/plain - Plain is a Rails engine that serves as an Artificial Intelligence (AI) assistant for your Rails project
🧰 Koichi Ito announced a new release of Rubocop Rails → Release RuboCop Rails 2.22.0 · rubocop/rubocop-rails
🧰 Hiroshi Shibata announced a new Release v13.1.0 · ruby/rake. The release changelog is big but here is just a part of it:
🧰 Alex Rudall shared an update for alexrudall/superagi: OpenAI API + Ruby
🤝 Related (but not Ruby-specific)
🤝 Jonathan H. Wage shared performance improvements after using pgbouncer:
🤝 Una Kravets shared that adding a simple <hr> in between options will make an horizontal rule → Select element: now with horizontal rules
🤝 Jeffrey Way shared that MacOS Safari added a new feature to see a website in iOS Simulator:
🤝 Robby Russell asked a question that I think we should ask ourselves everyweek:
🤝 Jason Swett shared that code is also a tool for thinking and exploration:"
🤝 Nate Hopkins shared that taking time to identify the right primitives and good names will pay in the long run:
🤝 Matt Johansen shared a thread about Okta being hacked:
More content: 📚 🗞 🎧 🎥 ✍🏾
🗞 Newsletters
🗞 Vipul A M published a new edition of This Week in Rails about Reduce Memory Used By Active Support/Callbacks, Non Column Backed Attributes For Enum And More!
🗞 Ruby Weekly published a new edition about How memoization can bend Ruby out of shape
🗞 Awesome Ruby Newsletter published a new edition Awesome Ruby Newsletter Issue 388 - Performance impact of the memoization idiom on modern Ruby
🗞 Sara Jackson published a new edition about This Week In Open Source (October 13, 2023)
🗞 Greg Molnar published a new edition of Rails Tricks about Ruby On Rails Password Validation
🗞 Harrison Broadbent published a new edition of The RailsNotes Newsletter ISSUE #16
🗞 Ruby Radar published a new edition about Ruby AST In The Browser
🗞 Hotwire Weekly published a new edition about Week 43 Stimulus LSP Goes Beyond VSCode And Ruby
🎧 Podcasts
🎧 Remote Ruby published a new episode about Dhh On Rails World 2023 Rails 7.1
🎧 The Ruby on Rails Podcast published an article about The Ruby On Rails Podcast Episode 493: Rails World Live! Pt.1 With Nick Schwaderer And Andrew Mason
🎧 Rooftop Ruby Podcast published a new episode about p29: Ruby Central’s Adarsh Pandit And Allison Mc Millan
🎧 Life on Mars published an article about 73 From Rails To Revenue, With Khash Sajadi (Ceo & Co Founder @ Cloud 66)
🎧 Jason Swett published a new podcast about 200 - Saron Yitbarek, Founder of CodeNewbie and RubyConf Keynote Speaker
🎧 Ruby For All published a new podcast about Microservices, Mayhem, and Main Branches | Episode 49
📽️ 🎥 Videos
🎙️ Conference Talks
🎙️ Confreaks, Llc published the videos from Rocky Mountain Ruby 2023
Screencasts
🎥 The Rubber Duck Dev Show published a new video about Stack Overflow vs ChatGPT
🎥 Jason Swett published a new podcast about Building a Search Engine Part 1 (Adding a Layer of Abstraction)
🎥 Yaroslav Shmarov published a new video about Rails #147 DataTables - search, sort, pagination with Ransack and Pagy
🎥 Cezar Halmagean published a new video about Build a SaaS with Ruby on Rails 7 - UTM URL Builder
🎥 Dean DeHart published a series of videos:
🎥 Dave Kimura published a new episode about Episode 425 - Kamal in GitHub Actions and about Using Ansible to Update Kamal Servers
🎥 Steven R. Baker published a new video about The Shitshow 3 (with special guest!): Build a Multiplayer Game in Ruby on Rails 7.1
🎥 Thoughtbot published a new video about Rails Development LIVE
✍🏾 Articles
What’s new 🆕
Jean Boussier published an article about Performance Impact Of The Memoization Idiom On Modern Ruby → “One major internal change in Ruby 3.2 was the introduction of object shapes. In this post, we’ll try to cover why they were introduced, how they work, and what their limitations are” and he also published an article about Effects Of Pitchfork Reforking On Shopify’s Monolith
Jorge Manrubia published an article about Exploring Server Side Diffing In Turbo → “We did a lot of exploratory work before coming up with the Turbo improvement we presented in Rails World. One of those experiments included diffing in the server instead of in the client”
Akshay Khot published an article about Akshay’s Blog Is Now Write Software, Well → “After two years and hundreds of thousands of readers, the blog has outgrown my personal domain and needs a new home. Welcome to «Write Software, Well»”
Patrick Helm published an article about My Love Letter To Rails (And Ruby) → “Here's why Ruby on Rails is far from being dead... Honeypot developers are even writing love letters to Rails”
Greg Molnar published an article about Rails Authentication For Compliance → “Suppose you are working on a Rails application that needs to meet specific security compliance requirements like PCI, ISO 27001, or SOC2. In that case, one of the objectives is to have proper authentication and access control”
Alkesh Ghorpade published an article about Rails 7.1 Raises An Error On Generating Model Attributes With Dangerous Name → “Rails 7.1 raises error on generating model attributes with dangerous name. The feature will raise an error if you specify any dangerous attribute when generating a migration” and another article about Rails 7.1 Adds Validation To Enums
Apoorv Tiwari published an article about Limiting Maximum Index Name Length In Ruby On Rails 7.1 → “With the introduction of Rails 7.1, a new 62 byte limit has been specified. If the index name exceeds this limit, it will fallback to a short format, along with a hash that ensures uniqueness”
Vladimir Dementyev published an article about The Future Of Full Stack Rails Ii: Turbo View Transitions → “In the previous post, we introduced the Turbo Music Drive application and enhanced it with DOM morphing techniques to provide a smoother UX. Now, we’ll take it to the next level and add slick animations”
Brad Gessler published a new article about Rails Background Jobs with Fly Machines → “Fly Machines can boot a VM in 500ms, run a Rails background job, then turn off when it’s done. That means you don’t have to pay for a server to sit idle if there’s no jobs to process and you can have a much more scalable pool of on-demand workers when your application starts to get busy”
Deep Dives 🔍
Victor Shepelev published an article about “Useless Ruby Sugar”: Pattern Matching (Pt. 2) → “With all the good things that I’ve said in the previous article about chosen pattern syntax looking natural, it still stands as a separate syntactic area of the code. This is mostly unusual for Ruby, which, once you get to know it closer, is characterized by a uniformity of semantics”
Noel Rappin published an article about Better Know A Ruby Thing #2: Constants – Noel Rappin Writes Here → “Today: constants. They aren’t actually constant. They aren’t only used for small strings or magic literals. They aren’t even mostly used for that in most Ruby programs. Constants are one of the core pieces of Ruby and they aren’t super-well documented in the official site”
Paweł Strzałkowski published an article about Tetris On Rails → “The story behind Tetris on Rails”
How-Tos 📝
Harrison Broadbent published an article about Action Mailer Attachments In Ruby On Rails → “ActionMailer makes it easy to attach files to your emails. In this article, I show you how to attach single or multiple files, set custom encodings and mime_types, and attach images as inline attachments to display in your email body” and an article about Action Mailer Cc And Bcc Multiple Recipients
Sam Ruby published an article about Accommodating Safari Users → “When you generate a new Rails app, you are given a choice whether or not you want JavaScript support or to include a CSS framework. The default is to use import maps. What isn’t clear at this time is that there is no documented upgrade path should you change your mind later. In fact, upgrading is difficult as support for things like Turbo, Stimulus, Action Cable and Action Text further lock you into this choice”
Stefan Wienert published an article about Rails 7.1 Migrate from secrets.yml to credentials.enc.yml → “If you have been using the Rails.application.secrets feature, you have been able to ignore the deprecation until Rails 7.1. But now, Secrets is gone! We had been using config/secrets.yml in the past because our deployment script would just replace the file during deployment”
Jeffery Morhous published an article about Factory Bot For Rails Testing → “Dive into FactoryBot to ensure your testing data is reliable and consistent”
Akshay Khot published an article about Base64 Encoding, Explained → “This article covers the basics of Base64 encoding, including what it is, how it works and why it's important. It also shows how to encode and decode Base64 data in various programming languages”
Gelsey Torres published an article about How Action Dispatch/Response#Content Type Changed Between Rails 5.2 To 6.1 → “What happened with ActionDispatch::Response#content_type between Rails 5.2 to 6.1? In this article, we will go into some background to learn what this method does, look at the differences in ActionDispatch::Response#content_type’s return value between the several Rails versions, and how you can fix the problem if you come across it in your codebase”
I published an article about How To Skip All Callbacks For All Models In Rails → “Different approaches for avoiding all callbacks on a Rails Active Record model”
James Garcia published a new article about Binged Watched (almost) a Rails Upgrade → “I watched Chad Pytel and other developers from thoughtbot Upgrading a Rails 3.2 app to Rails 7. Be warned it 17 hours over several videos, but it was well worth the time invested. 🙂 I wanted to share some things that I learned”
Please consider becoming a paid subscriber to support this newsletter for just $1.8/week ($7.5/month), and you will receive an ad-free version. 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.
Reply