Short Ruby News - Edition #46
Discover the world of Ruby in this comprehensive newsletter covering week 23 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.
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, newsletters, books and slides)
๐ธ For only $1.5 per week (just $6.5 a month), you can become a paid subscriber and contribute to the success of the flourishing Ruby community we all adore while receiving an ad-free version of the newsletter!!
๐ Our Community
๐ Friendly.Rbย announced a new speaker and the topic of Xavier's talk. If you want to participate, check friendly.rb.com
In case this does not make you want to grab some tickets, you should read what Trinity Takeiย shared about Friendly.rb in their article Catch the Wave: Europe's Ruby Scene is Heating Up
๐Andy Crollย asked for mentors forย First Ruby Friend. If you want to be a mentor just visit firstrubyfriend.org
๐ Allie Pย announced that RubyConf opened a form for people that want to be part ofย RubyConf 2023 Program Committee Fill this form if you are interested
๐Ruby On Railsย reminded us that the CFP would close on Friday, 16 Juneย โ Apply at PaperCall.io - Rails World 2023
๐ Eurukoย announced the first batch of available ticketย at 2023.euruko.org
๐ Donn Felkerย shared about seeing Rails trending:
๐ All about Code and Ruby
๐ชง Have you considered inviting your company to sponsor this newsletter? If you are using Ruby on Rails, I think your company is a perfect fit :)
You can send the sponsorship packages info to your marketing, HR, or product management teams.
I'm happy to assist you with drafting an email. Simply send me a message at hello@shortruby.com I'll do my best to draft an email for you to send inside your organization.
๐ James Beswickย announced thatย Ruby 3.2 runtime now available in AWS Lambda
๐ Moses Gathukuย announced the launch of ย hotwiredcases.dev - Hotwire Examples:
Moses Gathukuย later announced they made the repo public at gathuku/hotwiredcases
๐ Aaronย shared about the importance of testing and what strategies they use in a Rails codebase:
๐ Roland Studerย sharedย a code sample from their article about Phlex is the better way to build your views
๐ Konnor Rogersย sharedย how to maintain scroll position without data-turbo-permanent article:
๐ Kevin Newtonย shared that in Ruby now it is valid to start an identifier with an underscore since numbered params were introduced (checkout Ruby 2.7 change here)
๐ Maciej Mensfeldย shared about some attacks happening on RubyGems:
๐ Joe Masilotti shared a small tip about how to use Devise authentication with Turbo Native:
๐ Pasha Kalashnikovย shared a code sample showing two code lines that help exploring requests when using RSpec and Selenium:
๐ Ruby Cademyย shared a code showing how to customize Rails console prompt:
๐ Andrew Hodsonย shared a sample code about how to use named variants with Active Storage:
๐ Brad Gesslerย asked about what is Magic in Rails:
There are discussions in there about code loader, conventions, single table inheritance, working with components, forms and meta-programming.
๐ Mario Alberto Chรกvezย shared a code sample about how to generate embeddings:
๐ Robby Russellย shared a thread about using Drb to send messages from SVN to IRC:
Here are two code samples from the thread, but you should read it all to understand what they do and the context:
๐ Samuel Williamsย sharedย a code that shows ย the unfair scheduling of threads when using a condition variable. See the code at ruby-condition-variable-timeout
๐ Josef Strzibnyย shared a thread with gems that he recommends:
Here is the list of recommended gems, but I think you should open the thread and read it all as Josef also explains why they recommend each gem:
๐ Andrew Hodsonย shared a code sample showing how Rails has support for PostgreSQL generated columns:
๐ Kevin Newtonย shared about the performance of YARP:
๐ Adam Riceย shared about the performance of starting a big Rails codebase:
๐ Rob Zolkosย shared a tip about how to replicate flakey test failures on CI:
๐Sebastian Szturoย sharedย that Figma seems to use Ruby from this article The growing pains of database architecture
But it seems they are using Sinatra and Active Record based on this job.
๐ Ruby Cademyย shared a code sample explaining predicate methods:
๐ค I imagine that if you have read this so far, you find value in this newsletter.
๐งฐ Gems, Libraries, and Updates
๐งฐ Ronin Rbย announcedย the release of multiple projects ronin-support 1.0.2, ronin-repos 0.1.1, ronin-payloads 0.1.2, ronin-db 0.1.1, and ronin 2.0.2. Read the article announcing all these updates
๐งฐ Mario Alberto Chรกvezย announced a new release ofย chroma: Ruby client for Chroma DB
๐งฐ DragonRuby announced an update about Mid-year Update: Quacks, Steam Distribution, Sound Synthesis, and Pixel Arrays
๐งฐ Nate Hopkinsย announced a new version of model_probe: ActiveRecord schema visualization and model organization made easy
๐งฐ Any Cableย announced a second release candidate for AnyCable v1.4ย Read the release notes
๐งฐ Drifting Rubyย announced that academic email list has been updated swot: Identify email addresses or domains names that belong to colleges or universities. Help automate the process of approving or rejecting academic discounts
๐งฐ Zeke Gabrielse published a new gem typed_params - Define structured and strongly-typed parameter schemas for your Rails controllers
Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). Your contribution aids growth and maintains the quality of ShortRuby for everybody while receiving an ad-free version:
If you consider upgrading and want more information, please read Why to subscribe to paid
๐ค Related (but not Ruby-specific)
๐ค Sebastian Wilgoszย shared a tip about using Github CLI:
๐ค Samuel Williamsย shared an advice about how to think about the code:
๐ค Chris Wanstrathย shared about remote work:
๐ค Xircleboxย sharedย that Overlays are Bad
๐คPatrick Mc Kenzieย shared about how to get paid as OSS maintainer:
๐ค Taylor Poindexterย asked about reasons why people stayed at company for over 5 years. The replies are very interesting.
More content: ๐ ๐ ๐ง ๐ฅ โ๐พ
๐ Books & Slides
๐๏ธ RubyKaigi released the video for RubyKaigi 2023 - [EN][JA]Lightning Talks
๐ Thoughtbotย released a book celebrating their 20th anniversaryย A 20th Anniversary eBook
In celebration of our 20th Anniversary, weโve selected 20 amazing articles posted to our blog from over the course of our 20 years, and compiled them into a beautiful 78 page PDF book.ย View a Sample PDF
๐ Newsletters
๐ Joe Masilottiย published a new edition of their Turbo Native newsletter aboutย Interacting with Stimulus from Turbo Native apps
๐ Ruby On Railsย published a new edition ofย This Week In Rails - June 9, 2023
๐๏ธย Ruby Libhunt published a new edition of Awesome Ruby Newsletter - Issue 368
๐๏ธ Ruby Radar published a new edition about Ruby Kaigi 2023 Videos Unleashed!
๐๏ธย Ruby Weeklyย published a new edition AWS Lambda loves Ruby again
๐ง Podcasts
๐ง Drew Braggย published a new episode of Code and the Coding Coders Who Code It aboutย Episode 22 - Brittany Martin
๐ง Creston Jamisonย published a new episode of the Rubber Duck Dev Show aboutย The Making of Avalon in Dragon Ruby with James Stocks. Just a reminder that June is the DragonRuby month at RDDS and if you want to get to know DragonRuby you should also check the Code with Chris series
๐ง The Ruby On Rails Podcastย published a new episode aboutย Episode 473: Personal Branding & Strongly Held BBQ Opinions with Cody Norman
๐ง The Bike Shed published a new episode about 387: RubyKaigi 2023 with Mina Slater
๐ฝ๏ธ ๐ฅ Videos
Talks
๐ฝ๏ธ Jason Swettย published a new video from Code With Jason Meetup sessionย Matt Berg code review (2023-04-27)
๐ฝ๏ธ Yaroslav Shmarovย and Adrian Marin published a new episode ofย Friendly Show E2 Adrian and Yaro visited RailsSaaS Conference in Athens, Greece
๐ฝ๏ธ Drifting Rubyย published their video version forย This Week In Rails - June 9th, 2023
๐ฝ๏ธ Prefab published a video about 7 Ruby Feature Flag Products Compared
Screencasts
๐ฅ Dean De Hartย published a series of videos:
โ๐พ Articles
Whatโs new
Steve Polito published an article about Are you absolutely sure your `has_one` association really has one association?: โThe Rails has_one API has an unexpected limitation: It does not prevent multiple records from being associated to the parent record.โ
Takashi Kokubunย published an article aboutย Monitoring YJIT in Production โDo you use an app performance monitor like NewRelic or Scout, or check your daily performance graphs? Hereโs how you can make sure YJIT is doing what you want when you monitorโ
Julian Rubischย published a new challenge for the Hotwire Clubย Challenge 4: Turbo Drive - Form Activity Indicators โIn this challenge we will take an in-depth look at the lifecycle around Turbo Drive form submissions. We will leverage the several events Turbo emits during a form submission to display an autosave activity indicatorโ
Paweล Dฤ browskiย published an article aboutย SOLID principles in Ruby: โThis article is a quick summary easy to memorize, so you will never wonder again what this SOLID term is all aboutโ
Andrei Kaleshkaย published an article aboutย Optimize Rails app performance with ChatGPT โWe experimented and found out how ChatGPT is good with code optimization. We saw how it transforms Ruby code into performant SQL. The results were greatโ
Akshay Khot published a new article about Practical Stimulus: Capture User Input
How-Tos
Benito Sernaย published an article aboutย What to do when you need a button_to within a form in Rails โImagine that you have a form to update a record (letโs say a product record) and inside the form, you are showing a list of images, and each image needs a button to remove it. You tried to use button_to but it doesnโt work because in html you can have form within a form. What do you do?โ
Stefanni Brasilย published a new article aboutย 4 Strategies To Remove Dead Code from your Ruby App โItโs easy to believe that just because a feature is available, it is going to be used someday. But letโs face it: some features in production will go completely unnoticed and unused forever, but you still have to maintain them. How much does it cost to carry all this dead code around?โ
Dr Nic Williamsย published an article aboutย Can we add a dark mode toggle to Jumpstart Pro/Rails? โHow can we support dark and light CSS modes, using both system preferences and a dark mode switcher on our Jumpstart Pro apps? Or any Rails + Tailwind CSS + Stimulus JS appโ
Adrien Polyย published a step by step guide forย Deploying a Rails App with MRSK on Hetzner: A Beginner's Guide โWith this guide, I'll walk you through the process step by step that I used to create and deploy your first Rails application with MRSK on a Hetzner VPSโ
Matt Brictson published a new article about The 3 Vite plugins I use on every new Railsย project โIโve completely switched away from Sprockets and Webpacker and am usingย Viteย for my current Rails projects. Here are the three plugins I like to add on top of the standard Vite-Railsย setupโ
Deep Dives
Sawincpย publishedย a new introductory article aboutย Ruby and Object Oriented Programing โFor today's topic we will discuss the Ruby programming language and how it's object-oriented approach makes it fun and happy for programmers to useโ
David Haley published an article about The 80% abstraction - A method for simplifying large monoliths โPerfection protects the future but costs time & money, and is risky besides: the future is elusive & ever-changing. Speed protects the now but risks unnecessary complexity or even rework as we add features. Letโs explore that tradeoff, and how we get to monolithic software in the first placeโ
Related
Julia Evansย published a new article aboutย Some blogging myths. They talk about 8 myths: you need to be original, you need to be an expert, posts need to be 100% correct, writing boring posts is bad, you need to explain every concept, page views matter, more material is always better, everyone should blog.
Paweล Dฤ browskiย published an article aboutย Redis - a clear breakdown that contains: โstarting with some basic usage instructions, an explanation of the data structures, through the deployment process and handling Redis in production, to a deep dive to understand how Redis is workingโ
Please consider becoming a paid subscriber to support this newsletter for just $1.5/week ($6.5/month). 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.