- Short Ruby Newsletter
- Posts
- đź‘‹ Short Ruby News - Edition #58
đź‘‹ Short Ruby News - Edition #58
Discover the world of Ruby in this comprehensive newsletter covering week 35 and part of week 35 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
You can jump directly to a section:
More content: 📚 🗞 🎧 🎥 ✍🏾 (articles, podcasts, videos, newsletters)
If you want to support this newsletter, one way is to choose to upgrade to paid, and another way is to talk with your company to sponsor it
🚀 New Products
🚀 Kasper Timm Hansen launched a service called Idiomatic Rails for your app
🚀 Igor Alexandrov announced the launch of One Tribe – HR And Leave Management System
🚀 Paweł Strzałkowski lanuched a game they wrote using Rails and Hotwire → Tetris on Ruby
🚀 Kevin Newton announced they build a new website Ruby Representations to show how various tools represent Ruby code:
đź“… Events
đź“… Friendly.Rb announced they published the schedule at Friendly.rb - Your friendy European Ruby conference
đź“… Rocky Mountain Ruby announced tickets for Rocky Mountain Ruby 2023: And we're back! are available
📅 Helvetic Ruby announced that CFP for lightning talks is now open → Helvetic Ruby Conference 2023
👉 All about Code and Ruby
👉Nate Berkopec shared a tip about Active Record pool size:
👉 Opsitive shared about what they love about Ruby:
👉Tim Riley shared the roadmap for Hanami 2:
👉I shared a thread showing how I used Cursor IDE to create some small Pull Requests for rubyandrails.info
👉 John Nunemaker shared a code sample:
Kasper Timm Hansen replied with a proposal:
Esparta replied with another proposal:
Stephann V. replied with another suggestion:
👉 Vidar Hokstad shared the progress they are doing for their pure Ruby terminal:
👉 Postmodern asked about an elegant way to create a scale of Symbols:
Here are some solutions proposed:
👉 John Nunemaker shared a code sample showing how they use application_form:
👉 Nate Berkopec shared about service objects:
👉 Deepak Mahakale shared a Ruby tip about using filter_map over map.compact:
👉 Vincent Rolea shared how Active Storage blogs are uploaded to the storage service after the model transaction commits:
Victor Campos proposed a solution by using create_and_upload!
If you want to support this newsletter, one way is to choose to upgrade to paid, and another way is to talk with your company to sponsor it.
👉 Moses Gathuku shared a tip about disabling multiple form controls:
👉 Matt Swanson shared a code sample about changing behavior of Rails apps based on user agent using platform_agent gem:
👉 Deepak Mahakale shared about adding a message to the assertion:
👉 Matt Swanson shared an advice about using Rails attributes API for casting instead of Date.parse and to_i:
👉 Eric Berry shared a gist Tailwind Grid Helper that helps creating grids with same width and height:
👉 Nate Berkopec shared a thought about replacing SQL with key/value stores
👉 Nate Hopkins shared a Docker file about Ruby + SQLite Dockerfile
👉 Vincent Rolea shared a code sample about how to create a method that has params that act like kwargs without being a kwarg:
👉 Daniel Hoelzgen shared about eager loading scoped associations:
👉 Jesper Christiansen shared about using class_names helper with current_page? in Rails:
👉 It's A&L shared a tip about delegate_missing_to in Rails:
👉 u/Nesdnt asked about learning Ruby:
👉 u/devanil asked about how to combine multiple services/programs without going to microservices:
There are not many replies, but I think it is a great question to think about. Here is one of the suggestions:
🧰 Gems, Libraries, Tools and Updates
🧰 Ruby on Rails announced a new release for version 7.0.8 Ruby On Rails &Mdash; Rails 7.0.8 Has Been Released
🧰 Typescript was removed from Hotwire with this PR
This move generated a wide range of reactions in our community. I could not follow all discussions about this everywhere. Here is a sample in case you want to read what people are saying about this, here are some places:
First, I do recommend reading the comments in the PR itself
HackerNews has two stories: this one (with 79 comments) and this one (with 119 comments)
There were various discussions on Ruby.social: one, two, three
There were various discussions on Twitter: one (nitter), two (nitter), three (nitter), four (nitter), five (nitter), six (nitter), seven (nitter), and probably many more
🆕🧰 Nate Berkopec shared a new profiles vernier: next generation CRuby profiler
🧰 Avi Flombaum announced a new release of shadcn/ui on Rails version 0.0.12:
🧰 Stanislav Katkov announced the release of POSH TUI v0.5
🆕🧰 Lázaro Nixon announced a new gem turbo-native-initializer
🆕🧰 Equivalent announce a new gem dude_policy: policy objects for Ruby on Rails from perspective of current user/account
🧰 Brad Gessler announced that nopassword gem now includes Google OAuth with just a plain ol' Rails controller (no OmniAuth!)
🧰 Paul Mucur announced a new release of re2 - Ruby bindings to re2, an "efficient, principled regular expression library”
🧰 Ilya Zykin published a new release for their Rails Starter Kit pReleases · The Teacher/Rails7 Startkit
🆕🧰 Sven Schwyn published a new gem called minitest-substitute-Substitute values for the duration of a block or a group of tests
🆕🧰 Rahoul Baruah published a new gem standard-procedure/standard-procedure-attribute - Signal-style observable attributes in Ruby
🧰 Kevin Newton announced a new release for yarp Release v0.11.0 · ruby/yarp
🆕🧰 Andrey Novikov announced a new gem freezolite: Automatically add frozen_string_literals to selected files at compile time
🤝 Related (but not Ruby-specific)
🤝 Jason Swett shared about what is a good code:
🤝 Matt Swanson shared a trick from Chrome inspector:
🤝 Konnor Rogers shared about building web components when SSR:
🤝 Mike Perham asked if is there a use strict for CSS:
Stephann V. tried to propose a solution via using iframe:
🤝 Nate Hopkins shared the result of a 2019 survery:
🤝 Cezar Halmagean shared about SaaS pricing:
🤝 Catalin Pit shared about talking in public about salary:
More content: 📚 🗞 🎧 🎥 ✍🏾
đź—ž Newsletters
đź—ž Harrison Broadbent published a new edition about The Rails Notes Newsletter Issue #10
đź—ž Ruby Weekly published a new edition about Ruby Weekly Issue 668: September 7, 2023
đź—ž Awesome Ruby Newsletter published a new edition about Awesome Ruby Newsletter Issue 381
đź—ž Greg Molnar published a new edition of Rails Tricks about Throttling Rails Logins With Rack Attack
🗞 Vipul A M published a new edition about This Week in Rails → Infer Primary Key: :Id On Associations With Composite Primary Key Models, Add Validation Option For Enum And More
🗞 Allison Pike published a new edition about Once A Maintainer: Marc André Lafortune
🗞️ Joël Quenneville and Stephanie Minn published a new edition of The Bike Shed about 400: How To Search
🗞️ RubyRadar published a new edition about What’S All The Type About?
🎧 Podcasts
🎧 Remote Ruby published a new episode about Remote Ruby | Sorry For Slandering Yet Another Gem
🎧 The Ruby on Rails Podcast published an article about Episode 486: High Performance Postgre Sql For Rails With Andrew Atkinson
🎧 Lucas Barret published a new episode of GemRuby Show about about Vladimir Dementyev, Action Policy
🎧 Indie Rails published a new podcast about IndieRails | Adam McCrea - Scaling Up an Autoscaling SaaS
📽️ 🎥 Videos
Talks
📽️ Rubber Duck Dev Show published a new edition of their show Rubber Duck Dev about Should You Resolve All Of Your Exceptions?
📽️ Honeypot published an episode about David Heinemeier Hansson: Microservices vs. Monolith
📽️ Visuality published the videos from Ruby Warsaw Community Conference → See them all on this Youtube Playlist
📽️ Jason Swett published new videos about How to plan a software project and Setting up CI with GitHub Actions
Screencasts
🎥 Joe Masilotti published a new video about How to add SwiftUI views to Turbo Native apps (see it here on nitter or on Piped.video)
🎥 Yaroslav Shmarov published a new video about Stripe Subscriptions With Rails 7 You Tube
🎥 Dean De Hart published new videos about:
🎥 Drifting Ruby published a new video about:
🎥 Adam Mccrea published a new video about published an article about Pair With Me As We Build An Alpine.Js Component From Scratch
✍🏾 Articles
What’s new 🆕
David Heinemeier Hansson published a new article announcing Turbo 8 is dropping TypeScript → “Just because Turbo 8 is dropping TypeScript won't mean you can't write your client code in it, or use any other library that employs it. We get to mix and match, which is wonderful”
I published an article about How To Use Cursor Ide To Make Changes In A Rails App → “Path of my learning path about using AI/LLMs to augment my developer productivity. I started using Cursor IDE. Here let me show you how I made two changes to the rubyandrails.info website”
Stephen Margheim published a series of articles about SQLite: Branch-specific databases, Fine-tuning your database, Loading extensions, Setting up Litestream, Optimising Compilation → “I want to dig into the ways that we can take advantage of and empower using SQLite as the database engine for our Rails applications”
Andy Maleh published an article about Intro To Ruby In The Browser → “This talk will help Ruby on Rails software engineers get started with Ruby in the browser while providing demos along the way via an actual Rails app”
Alkesh Ghorpade published an article about Rails 7.1 Makes It Possible To Execute Tests For A Given Range Of Lines In A File → “In Rails 7.1, developers can now run tests for a specific section of code by passing a line range (a-b) to the rails test command”
Ruby Central published an article about Community Day At Ruby Conf 2023 Highlights Connection, Collaboration’s Mentorship → “Ruby Central, Inc. announced a completely reimagined format for RubyConf 2023. The 23rd annual Ruby Conference, taking place in San Diego, California, will kick off with Community Day, which is replacing one day of talks”
Alkesh Ghorpade published an article about Rails 7.1 Removes The Secrets:Setup Command And Deprecates Secrets:Edit And Secrets:Show Commands → “In Rails 7.1, the deprecated secrets:setup command is removed, and deprecation warnings are now issued for secrets:edit and secrets:show commands”
Luan Gonçalves Barbosa published an article about Ruby and the State of Artificial Intelligence → “In this article, we delve into the State of Artificial Intelligence and Machine Learning in the Ruby Ecosystem, exploring the tools available, challenges faced, progress made, and the potential for the future”
Joël Quenneville and Neil Carvalho published an article about A Peek Behind The Curtain Of Our New Open Source Page → Talks about the technical challenges encountered while building their open source page
Deep Dives 🔍
Jacob Daddario published a new article about The Proper Use of Ruby Mocks → “The problem with this is that developers often learn how to use mocks but not why to use them. This post seeks to bridge that gap by discussing why and when to use mocks in a Ruby application”
Akshay Khot published an article about Let’s Read The Turbo Source: What Happens When You Click A Link? → “In this post, we'll explore the source code of Hotwire's Turbo library to understand exactly what happens when you click a link. I hope you'll appreciate Turbo much more after this deep dive”
Karol Galanciak published an article about Integration Patterns For Distributed Architecture → “Let’s examine the four primary ways services can be integrated and how they all play their part in our architecture in Smily (formerly BookingSync). This article aims to provide a general overview of these patterns, and we will cover them in more detail in the upcoming blog posts”
Felipe Vogel published an article about Server Sent Events → “In my last post, I rewrote a little Rails app with Roda and Turbo Streams. In this post I’ll show how I solved the app’s last and biggest problem: slow API calls. So slow that the user had to wait several seconds between pressing the “Next article” button, and actually seeing a new article”
Szymon Fiedler published an article about The Most Underused Pattern In Ruby → “I believe that Value Object is a totally underused pattern in Ruby ecosystem. That’s why I wanted to provide yet another example which differs from typical Money one you usually see. It’s a great tool to reduce complexity of your code by removing unnecessary or repeatable branching”
Kyle D'oliveira published an article about Off To The Races: 3 Ways To Avoid Race Conditions Dev Community → “There are two example categories of race conditions that I would like to talk about and then touch on how to approach addressing them: Read-modify-write and Check-then-act”
How-Tos đź“ť
evait security GmbH team published an article about Implementing Accessed At To Active Storage Blob In Ruby On Rails → “In this technical blog post, we’ll explore how to enhance your RoR application by adding an accessed_at column to ActiveStorage Blobs and customizing the ActiveStorage::Blobs::RedirectController. This will allow you to track when someone accesses a specific blob or file, such as through a download action”
Stephen Margheim published an article about Linked Headings In Your Bridgetown Rb Site → “One feature that I wanted to support with my blog is having headings that provide a quick anchor link to that section of the page. In this post, I want to walk you through the simple steps to add this feature to a Bridgetown site”
Thomas Riboulet published an article about An Introduction To Rubo Cop For Ruby On Rails → “Here follows an introduction to RuboCop: what it is, how it helps developers, how to use it, and some key practical use cases”
James Brooks published an article about Enhanced Broadcasting With Action Cable | James Brooks → “An extract of a technique I’ve been running successfully to only render and broadcast payloads over ActionCable for users that are actively subscribed to the channel”
Ashwini Sukale published an article about 7 Common Techniques To Improve Your Debugging Skills Fast Ruby.Io | Rails Upgrade Service → “When we work on Rails upgrades, most of the time we have to solve issues after updating the gems. These problems can go from simple and straightforward to really complex and hard to debug. Here we will discuss different skills and techniques that we use to complete the upgrade”
Gorka Pitarch published an article about Nested Attributes On A Has Many :Through Polymorphic Association With Validations In Ruby On Rails → “A very common functionality for websites is the possibility of adding tags or categories. In this post, I’m going to implement this functionality in a way that you can categorize different models. In this example, I’m only going to create a Post model but you can repeat this process for any other model you want to”
Nicholas Galante published an article about Using Regular Expressions (Reg Ex) For Validations In Rails Dev Community → “In this blog post, first we'll look at some of the basic characters used in RegEx. Then, we'll explore some examples o to use RegEx to create various validations in Rails, including formatting for password strength, special character requirements, monetary amounts, email addresses, and zip codes”
Josh Smith published an article about Emmet Snippets In Rails Views → “Support for this is built in for the current most popular editor: VSCode. But if you work with Rails a lot, you'll probably notice that it does not work in erb template files out of the box. Let's enable it!”
Dom Christie published an article about Ui Context And Rails Variants → “Rather than a 1:1 mapping of routes to controller actions, Kasper suggested mapping different routes to a single controller action, and switching the response based on the variant. The variant could be sent as a default param and set in the controller”
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