πŸ‘‹ Short Ruby News - Edition #43

Discover the world of Ruby in this comprehensive newsletter covering week 20 of 2023. Find code samples, community updates, gems, resources, and thought-provoking discussions.

You can jump directly to a section:

πŸ‘ Our Community

More content: πŸ“š πŸ—ž πŸŽ§ πŸŽ₯ βœπŸΎ (articles, podcasts, videos, newsletters, and books).

  1. The newsletter is now back to one single email sent. Read here more about this decision. TLDR: both the poll results and the stats from the newsletter show that the two newsletter format was not working correctly, while the majority prefers one email. Thus this edition contains the More Content section inside this edition as before. I will continue to publish the expanded content edition only on the web.

  2. All images are clickable. You can click on the image if you want to read the original source (article, tweet, video…).

πŸ’Έ 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!

πŸ‘ Our Community

πŸ‘ Friendly.Rb announced a new speaker, see friendlyrb.com for more details

πŸ‘ Dave Copeland shared reasons why Rails and Ruby are great:

And here are what other people added:

πŸ‘ Ruby For Good announced that registrations are open for the event in July at rubyforgood.org/events

πŸ‘ Ian announced an update for the  alterisian.github.io/helloworld website:

πŸ‘ Dave Paola shared feedback from a recent applicant:

Here are some of the replies:

There are many replies to Dave's tweet that I recommend you read.

πŸ‘ On the same topic, Gomez shared about how they use Ruby on Rails at PlanetScale:

πŸ‘‰ All about Code and Ruby

πŸ‘‰ wiki.nikiv.dev/programming-languages/ruby is an extensive wiki created by Nikita with many resources for learning or deep diving into Ruby. Here is a screenshot with just a tiny part of all the resources:

There is a similar wiki about Rails maintained by the same author.

πŸ‘‰ Noah Gibbs shared about code and the choices we have to make between them.

This triggered a lot of replies. Please read them directly, as there is a good but healthy debate.

Here are just some of the replies in a random order. This seems to me a sensible topic for our community, so please read the other replies for context:

Other links mentioned in the replies: GoodCop and Relaxed Ruby Style.

πŸ‘‰ Paul Mucur shared a TIL about create_or_find_by:

πŸ‘‰ Ben Sheldon (He/Him) shared two learning points about Regexp and a code sample showing Ruby 3.2 Regexp timeout:

πŸ‘‰Benoit shared a code sample showing how to display PSQL style tables in Rails console. Check the gist at PSQL table in Rails console

πŸ‘‰ Brandon Weaver asked a question about reducing the processing of requests for assets by Webmock with VCR:

Olivier Lacan replied with the link to Ignore Request for VCR. You might also want to read the analysis Brandon Weaver added in this issue opened on webmock gem: Performance of `WebMock::Util::Headers.normalize_headers` Β· Issue #1027

πŸ‘‰Kay Rhodes shared a tip about how to fix a MySQL gem error:

πŸ‘‰ Takashi Kokubun shared what the current purpose of RJIT is:

πŸ‘‰ Prabin Poudel shared about deployment options:

Among the replies:

πŸ‘‰ Ruby Cademy shared a code sample showing how to use Object#tap (that Ruby 3.2 seems to be defined at Kernel#tap vs in Ruby 2.7 being at Object#tap):

πŸ‘‰Alexandre Ruban asked a question about SRP on an Active Model has over 70 attributes:

πŸ‘‰ Brad Gessler shared a code sample showing a form builder:

πŸ‘‰ Adrian Marin asked a question about integration StimulusReflex with Hotwire:

πŸ‘‰Ahmed shared a code sample showing how to use metaprogramming to define methods:

πŸ‘‰ Xavier Noria shared a code sample about the break keyword used in loops:

πŸ‘‰ Josef Strzibny shared a thread with gems recommendations:

Here are the recommended gems:

  • vessel - β€œhigh-level web crawling framework”

  • mapkick - β€œCreate beautiful JavaScript maps with one line of Ruby. No more fighting with mapping libraries”

  • simple_calendar - β€œSimple Calendar is designed to do one thing well: render a calendar”

  • business_time - business hours math

  • heya - β€œHeya is a campaign mailer for Rails. Think of it like ActionMailer, but for timed email sequences. It can also perform other actions like sending a text message”

  • noticed - β€œNotifications for your Ruby on Rails app”

  • chartkick - β€œCreate beautiful JavaScript charts with one line of Ruby”

  • blind_index - β€œSecurely search encrypted database fields”

  • split - β€œSplit is a rack based A/B testing framework designed to work with Rails, Sinatra or any other rack based app”

  • store_attribute - β€œActiveRecord extension which adds typecasting to store accessors”

  • logidze - β€œLogidze provides tools for logging DB records changes when using PostgreSQL”

  • discard - β€œSoft deletes for ActiveRecord done right”

  • counter_culture - β€œTurbo-charged counter caches for your Rails app”

  • pretender - β€œAs an admin, there are times you want to see exactly what another user sees”

  • secure_headers - β€œThe gem will automatically apply several headers that are related to security”

  • ahoy - β€œSimple, powerful, first-party analytics for Rails”

  • blazer - β€œExplore your data with SQL. Easily create charts and dashboards, and share them with your team”

  • i18n-tasks - β€œi18n-tasks helps you find and manage missing and unused translations”

  • instant18n - β€œUse OpenAI's GPT large-language model to power internationalization of the text in your Rails application”

  • jsonb_accessor - β€œAdds typed jsonb backed fields as first class citizens to your ActiveRecord models”

  • invoice_printer - β€œSuper simple PDF invoicing. InvoicePrinter is a server, command line program and pure Ruby library to generate PDF invoices in no time. You can use Ruby or JSON as the invoice representation to build the final PDF”

πŸ‘‰ Brad Gessler shared a thread about batch resource manipulation. Here are the first two tweets from the thread:

πŸ‘‰ Craig shared a list of shortcuts they use when programming in Rails:

πŸ‘‰Colleen Schnettler asked for recommendations of Rails CMS:

Here are some of the recommendations:

πŸ‘‰ Ruby Cademy shared a code sample about using Rails ActiveSupport::CurrentAttributes

πŸ‘‰ Xavier Noria shared a thread about β€œreloading” naming:

He explain further about what happens in Ruby:

That indeed happens if you have reloading and eager loading enabled, a possible but rare combination.

In the app lazy loads, "reloading" only "unloads", really. That is the nuance. Unloaded classes are not loaded again during that operation.

You'll load what you use, on demand.

"Unloading" is also an abuse of language: Ruby has no way to unload code.

"Unloading" means `remove_const` autoloaded constants.

However, if the app is correct, the objects they stored will become unreachable and eventually GCed.

So, in that sense, this one is good enough.

🀞 I imagine that if you have read this so far, you find value in this newsletter.

This is a free publication that relies on the support of its readers:

🧰 Gems, Libraries, and Updates

🧰 Mike Dalessio announced the release of version 1.15.0 of nokogiri Read the release notes

🧰 Mike Dalessio announced the release of version 1.6.3 of the sqlite3-ruby gem Read the release notes

🧰 Yuta Saito announced they release version 2.0.0 of ruby.wasm Read release notes

🧰 Ivo Herweijer published a new benchmark for Roda that now includes Ruby 3.3 preview1:

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

🀝 Related (but not Ruby-specific)

🀝 Benoit shared an SQL to simulate a slow SQL update in PostgreSQL:

🀝 Nate Berkopec shared a reminder to check resources if they are over provisioned:

🀝 Chris Wanstrath shared a thread about the early days of Github and keeping it profitable:

More content: πŸ“š πŸ—ž 🎧 πŸŽ₯ ✍🏾

In case you want to read the More Content version with articles previews read it on web here

πŸ“š Books

πŸ“š Noel Rappin announced that Programming Ruby 3.2 (5th Edition) is now draft-complete

πŸ—ž Newsletters

πŸ—žοΈ Ruby Weekly published a new edition: Ruby 3.3 makes its first appearance

πŸ—žVipul A M published a new edition of This Week in Rails about Rails World CFP, ActiveRecord.disconnect_all!, optimized where query and more!

πŸ—ž Greg Molnar published a new edition of Rails Tricks about Shared examples with Minitest - Rails Tricks Issue 7

πŸ—žοΈ Ruby Libhunt published a new edition of Awesome Ruby Newsletter - Issue 365

πŸ—žοΈ Ruby Radar published a new edition about Spilling Beans

🎧 Podcasts

🎧 Remote Ruby published a new episode about Railsconf Recap | Remote Ruby | Episode 229

🎧 Ruby Rogues published an episode with Brad Gessler about Building Rails Application with Phlex

πŸ“½οΈ πŸŽ₯ Videos

Talks

πŸ“½οΈ Yaroslav Shmarov published their first episode of SupeChat Amanda Perino from Rails Foundation about Rails World

πŸ“½οΈ The Rubber Duck Dev Show published a new episode about Leveling Up For Juniors With CodeWithJulie

Screencasts

πŸŽ₯ Yaroslav Shmarov published a new episode about Rails 7 #133 API Pagination with Pagy

πŸŽ₯ Dave Kimura published a new episode about Tokenized Search

πŸŽ₯ Deanin published new episodes about:

✍🏾 Articles

What’s new

How-Tos

Deep Dives

Related

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

Reply

or to participate.