- Short Ruby Newsletter
- Posts
- Short Ruby News - Edition #34
Short Ruby News - Edition #34
Briefly about everything happening in Ruby world - week 11 of 2023
You can jump directly to a section:
More content: 🎥 🎧 🗞 (articles, podcasts, videos, and newsletters)
🤗 Founding Members supporting this newsletter
✋ I am part of the organizing team for Friendly.rb conference:
There are early-bird tickets available and the call for speakers is still open in case you are considering submitting a talk proposal.
👐 Our Community
👐 rubyandrails.info is part of ShortRuby's effort to aggregate resources about Ruby. You can find there a good collection of books, courses, screencasts, newsletters, podcasts, communities and Youtube channels
If there is a resource that is not yet on the website, you can request to add it on the Github repo
👐 Adrian Marin shared their gratitude for the work Xavier Noria is doing in the community:
Adrian also shared a link to a discussion where Xavier explained in depth how autoreload works in Ruby on Rails and how Zeitwerk comes into play: [Question] Are classes in nested directories not auto-reloaded with `push_dir`?
👐 Pragmatic Programmers asked what the biggest advantages of using Rails today are:
Here are two of the answers:
🤝Robby Russell invited us to be greateful and endorse our colleagues:
🤝 Blue Ridge Ruby shared their final agenda for June 2023 in Asheville, NC
🤝 Emmanuel Hayford announced a new podcast called The Rails Changelog
🤝 Nate Berkopec asked how we can make the Ruby on Rails API docs more SEO friendly:
👐 DHH shared they started a discord for MRSK Discord - A New Way to Chat with Friends & Communities
🤞 Enjoy the free subscription to Short Ruby Newsletter! Subscribe to receive it weekly in your inbox:
You can support this Ruby community for just $1.5/week ($6.5/month) by becoming a paid subscriber. 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
👉 All about Code and Ruby
👉Benoit shared an image showing a performance made using Perfetto UI
👉 Joel Drapper shared a code sample showing how to stream a view in phlex-rails:
He also added a code sample about an async API request:
👉 Tim Riley announced a new ERB engine that will be used in Hanami 2 view layer (check the PR here):
👉Esparta shared a code showing how to use coerce (see class Integer#coerce):
👉 Josef Strzibny shared a thread about gems:
Here is the list of the gems:
There are a couple of replies to the last tweet that contains more gem recommendations.
👉Steve Polito shared a sample code showing how to click on links inside emails when doing integration tests in Rails:
👉Adrien Poly asked if in Rails 7, there is still a need to use database_cleaner gem:
The general response is no.
👉Rishi Pithadiya shared an explanation about two configuration options for Rails:
👉 Stanislav (Stas) Katkov asked what tricks people use to reduce memory consumption in Ruby:
👉 Scott Watermasysk shared a code sample showing Quick Ruby implementation of https://www.npmjs.com/package/clsx
👉Maxime Chevalier shared a performance comparison between latest CRuby with the interpreter only vs CRuby with YJIT enabled:
👉Omkar Joshi reminded us about link_to_if in Rails:
Talking about conditionally rendering things there exists:
👉 Andrea Rocca continues the series about Hotwire. Here is a screenshot from only one of the many tips shared this week:
Here is the full list of all threads Andrea shared this week:
Hotwire tip 24/30 Gmail-style bulk select (source)
Hotwire tip 25/30 Reddit-like lazy loaded nested comments (source)
Howire tip 26/30 Fancy scroll animations with Stimulus (source)
Hotwire tip 27/30 Full Calendar with stimulus target callbacks (source)
Hotwire tip 28/30 Custom turbo destroy dialogs (source)
👉Ryan Bates asked how do we handle pagination in automated tests:
Here are some of the answers:
👉Brad Gessler shared a code sample about:
👉Simon Chiu shared a tip for debugging Turbo Streams:
👉Chris Oliver shared a code sample showing a Hotwire tip about using Element.scrollIntoView() - Web APIs | MDN
👉Prabin Poudel shared a code sample showing how to use thor to write an overcommit config file:
👉Andrew Culver shared a small snipped that uses Ruby gsub to replace the content inside a file bullet_train/portable-string-replace
👉Jess Brown shared how they use table_print ruby gem:
👉Sam Saffron shared a code sample about using ChatGPT as a writing assistant
Here is a snippet from the GitHub gist:
If you like this content and want to receive it every week by email
🧰 Gems, Libraries, and Updates
🧰 Ruby On Rails announced new versions to fix two vulnerabilities Rails 7.0.4.3 and 6.1.7.3 have been released!
You can read the discussions here:
🧰 Joel Drapper shared a PR for Phlex where they are showing how to implement Smart chunking:
🧰 The J Ruby Team shared they released a new version of PostgreSQL driver that passed 99.8% of AR tests:
🧰 Shibata Hiroshi shared a PR they merged where they combined the cops from Bundler and RubyGems. Merge rubocop configuration: 2nd PR. Check the commits - each one contains one cop
🧰 Jean Boussier shared a PR they are working on for Rails about PoC: Cache Extended Collection Proxies
You can check the conversation on Ruby.social here and the one on Twitter here
🧰 Camilo announced the release of standardrb v 1.25.0. Checkout the release notes
🧰Avo announced they reached 1000 stars on GitHub and announced a new release, read the changelog or the thread:
🧰Maciej Mensfeld shared an update about Kafka topics as code - declarative Kafka topics management in Ruby - Closer to Code
🧰Paweł świątkowski announced they open-sourced their Hanami 2 app at katafrakt/palaver: a toy forum software in Hanami 2
🧰 Greg Molnar shared that Active Support 7.1 will Implement `Object#with`
🧰 Carlos Antonio shared a PR they work on for Devise gem about Respect locale set by controller in the failure app
🤝 Related (but not Ruby-specific)
🤝Paul Mucur shared a tip on how always to run a step in GitHub Actions, even if a preceding step fails (see Expressions - GitHub Docs)
🤝 Nate Berkopec shared a tip about changing the ratio when doing benchmarking:
🤝Paul Cantrell shared what they think is hard or important in the job of a programmer:
🤝 Jhey Tompkins shared a future proposal for HTML to display a popover (check the codepen):
🤝Jess Brown shared a short alias that helps with switching to another branch
🤝Mike Coutermarsh shared an insight (funny but also mostly true) about code that initially was named a hack but remained in production years:
🤝Moncef Belyamani shared a thread about their consultancy business:
Here is the main part that Moncef shared, but you should read the entire thread
🤝 Eleftheria Batsou asked about tools used by developers to save time and speed up development:
She received a lot of replies, and she gathered them in an article From TDD to AI: Techniques & Tools for Devs, Save Time & Speed up Your Development Process
If you like this content and want to receive it every week by email:
More content: 🎥 🎧 🗞
🗞 Newsletters
🗞 Emmanuel Hayford published a new edition of This Week in Rails about TestFixtures#fixture_path deprecation, FinderMethods#find support f...
🗞 Ruby/Rails performance newsletter published a new edition about All performance metrics exist on a spectrum from low to high level
🗞️ Ruby Weekly published a new edition: Deep dives into Rails routing and WASI
🗞 Ruby Radar published a new edition Ruby Radar #94 - Protips
🗞️ Ruby LibHunt published a new edition of the Awesome Ruby Newsletter
Podcasts
🎧The Ruby On Rails Podcast published a new episode The Ruby on Rails Podcast Episode 461: ccyalater and Merge Conflict Hit the Track! (with Colleen Leonard)
🎧Ruby For All published a new episode about From Bootcamp to Community Advocate and Mentor | Ruby for All | Episode 34
Videos
Talks
📽️Moncef Belyamani published their video about Setting Up a Personal Mastodon Instance
📽️ Jason Swett published a new episode of Code With Jason Meetup about Abstraction (2023-03-16)
📽️ Drifting Ruby published the video version of This Week in Rails - March 17th, 2023
📽️ The Rubber Duck Dev Show published a new episode about Things Your Editor Should Have with Amir Rajan
📽️ Paweł Strzałkowski published a Webinar about Domain Modeling in Ruby on Rails with introduction to Domain-Driven Design
Screencasts
🎥Yaroslav Shmarov published new videos:
🎥 Justin Searls published a new episode of their series Searls After Dark #4 - Refactoring vs. Testing
🎥 Equivalent shared a video created about Build a View Component library in Rails with LookBook
🎥 The Rubber Duck Dev Show published a new video from the series Coding with Chris about Cave Lords Part 9: Test Fixing and Play Map - Coding with Chris
🎥Pete Hawkins published new videos
🎥 Adam Pallozzi published a video on Twitter about Using ActiveStorage to upload large files in chunks
🎥 Amir Rajan published a video about DragonRuby Game Toolkit - Gameplay recording and replay capabilities in action.
Articles
What’s new
Joseph Izaguirre published an article about How I got my first Rails job → “I’m saying that when it came time to choose which language and framework to learn, I looked where everyone else was going, and I went the other way”
Rafael Montás published a new article about Implementing Data Structures in Ruby: Arrays
How-Tos
Andy Croll published a new article about Assign a default value to an attribute in Active Record → “If you ever needed to set a default value in an instance of an Active Record model, you probably used a callback. Since Rails 5.0 there’s been a better way.”
Sulman Baig published a new article about Clean Code Tip: Create a Service Object and Improve Your GraphQL Mutations in Rails
Felipe Vogel published an article about Parsing text in Ruby, part 1
Aestimo Kirina published an article about Working With Markdown in Ruby
Kon Yu published a new article about How to debug Rails running on Ruby 3.1 using VSCode and Dev Containers
Carla Urrea Stabile published a new article about Add Authorization to a Sinatra API using Auth0 → “Learn how to implement a Sinatra API and protect its endpoints using Auth0”
Steve Polito published an article about How to click links in Rails Mailers when writing tests
Benito Serna published an article about how to Use after_touch to avoid to handle race conditions saving computed values → “When saving computed values in the database in your rails app, you must be aware that is possible to find unexpected errors in the result thanks to race conditions.”
Miriamfark published a new article about Using Action Mailer to Send Emails from a Rails App
Moses Gathuku published an article about Custom Rails form submit debounce → “In some cases, this isn’t necessary, but this technique can drastically improve network overhead if costly server requests are involved. The form submit event is only triggered when the user finishes typing"
Suraj Mishra published an article about Must-know hash initialization tricks in Ruby
Max Braga published an article about RSpec for Rails: Advanced Techniques #3 - Metadata
Deep Dives
Dhaval Singh published an article about Why Every User Without a Profile Picture on GitHub Was Yehuda Katz
Lucas Barret published a new article about Mastering PostgreSQL Views and CTEs for Rails Developers: A Comprehensive Guide
Faraaz Ahmad published a deep dive article into Ruby 3.2's WASI Integration: A Closer Look
Akshay Khot published a deep dive into Understanding the Rails Router: Why, What, and How
Related
Kent Beck published a new article about Fool Proof Design → “We’ve talked frequently about the cost reduction aspect of design change, but always from the perspective of making the changes we want to make. There’s a lurking cost, however, that I’m starting to realize deserves more attention”
Lauren Ellsworth published a new article about Uniqueness in PostgreSQL: Constraints versus Indexes → “Constraints and indexes come at a cost: they add write overhead with each INSERT and UPDATE and they can take up significant amounts of space. Since a unique constraint and a unique index both enforce uniqueness, which one should we prefer? And are they different?”
🤗 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