👋 Short Ruby News - Edition #34

Briefly about everything happening in Ruby world - week 11 of 2023 (web version)

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:

🤞 You can support the Short Ruby newsletter 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:

👉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:

👉Ryan Bates asked how 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

👉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:

🧰 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

🤝 Shiva shared a new thread about GeoSpatial commands with Redis:

🤝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 newsletter, consider upgrading to paid. You will help the larger community by supporting this newsletter and thus being part of the effort to keep it freely accessible to everyone.

More content: 🎥 🎧 🗞

🗞 Newsletters

🗞️ 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

Videos

Talks

📽️ Jason Swett published a new episode of Code With Jason Meetup about Abstraction (2023-03-16)

Screencasts

🎥Yaroslav Shmarov published new videos:

🎥Deanin published new videos

🎥Pete Hawkins published new videos

Articles

What’s new

How-Tos

Deep Dives

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

Read more about what is a Founding Member or about Why pay for ShortRuby newsletter

Reply

or to participate.