- Short Ruby Newsletter
- Posts
- π Short Ruby News - Edition #43
π 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
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.
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:
Matt Swanson replied with:
π Brad Gessler shared a code sample showing a form builder:
π Adrian Marin asked a question about integration StimulusReflex with Hotwire:
Marco Roth clarified this:
π 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:
πColleen Schnettler asked for recommendations of Rails CMS:
Here are some of the recommendations:
Sitepress (Ruby)
Bridgetown (Ruby)
Avo (Ruby)
AlchemyCMS (Ruby)
Middleman (Ruby) - check out also this repo for Middleman 4 + Tailwind CSS
Jekyll (Ruby)
SpinalCMS (Ruby)
π 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
π§° Dima Fatko announced a new gem pluck_in_batches: A faster alternative to the custom use of `in_batches` with `pluck`
π§° Nick Schwaderer announced a new gem chat_gpt_error_handler:
π§° 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
π§° PaweΕ Urbanek published a new gem rails-brotli-cache: Rails cache using Brotli algorithm offers better compression and performance
π§° 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:
π§° Atsushi Tatsuma published a new gem llama_cpp - provides Ruby bindings for the llama.cpp
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)
π€ 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
π§Rooftop Ruby published a new episode about 13: Open Source and More With Marco Roth
π§Code And The Coding Coders Who Code It published a new episode about Episode 21 - Nick Schwaderer
π§ Indie Rails published a new episode about Pascal LalibertΓ© - 6 things to avoid as a freelancer
π§ 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
Samuel Williams shared their slides from Ruby Conf AU: Asynchronous Rails
Big Binary published an article about Rails 7.1 adds ActiveRecord::Base::normalizes. On the same topic Sampat Badhe also published an article about Rails 7.1 AR adds normalizes API for attribute values
Shivam Singh Chahar published an article about Rails 7.1 adds support for responsive images.
How-Tos
MaurΓcio Maia published an article How-To Add Recommendations to a Rails App with pgvector and OpenAI
Aestimo Kirina published an article about Manage Your Ruby Logs Like a Pro
Akshay Khot published an article about How to Create Custom Flash Types in Rails
Adam Rice published an article about Debugging with introspection
Takashi Kokubun published an article about their talk at RubyKaigi about [JP] Announced how to write a JIT compiler on RubyKaigi (English version translated with Google)
Ariel Juodziukynas published an article about Handling Environment Variables in Ruby
Deep Dives
Unathi Chonco published an article about Ruby Method Lookup Demystified: Inheritance, Mixins, and Super
PaweΕ DΔ browski published an article about Unraveling the mystery of the super keyword
Related
Adam Rice published an article about Why you shouldn't exclusively hire senior developers
Dave Copeland shared an article about My 20 Year Career is Technical Debt or Deprecated
PaweΕ DΔ browski published an article about Understanding database Indexes in PostgreSQL
Jeremy Smith shared an repository about prompt-engineering: Tips and tricks for working with Large Language Models like OpenAI's GPT-4
Lucas Barret published an article about Postgres concurrency what could go wrong (part 1)
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