Image of Lucian Ghinda writing for notes.ghinda.com
Short posts mostly about Ruby and Ruby on Rails. You can find me at : Linkedin, Mastodon, Twitter, Bluesky or for longer posts at allaboutcoding.ghinda.com. Check goodenoughtesting.com if you want to learn to write fewer tests and cover more features. 
Subscribe via RSS here

Ruby Triathlon starts this week

The Ruby Triathlon starts this week! 

Rails World - Amsterdam, Netherlands, September 4–5

The first conference is Rails World happening in Amsterdam on 4 and 5 September. 

The tickets are sold out! So if you did not yet got your ticket, then make sure you keep an eye on it for next year :(

Rails World 2025

Friendly.rb - Bucharest, Romania, September 10–11

The next one Friendly.rb will happen next week in Bucharest, Romania on 10-11 September. Make sure you don't have plans for 12 September as we will have an outdoor day.

Tickets are still available at https://friendlyrb.com.

During the conference there will be a "Brew your own coffee corner" where you can bring your own pour overs and we will provide freshly roasted coffee beans from various roasters to delight your taste. There is also a The Friendly Gameshow a funny surprise that awaits for you part of the conference. And on Friday, we will have a Friendly trip to Sinaia, an easy outdoor trip to one of the most beautiful cities in Carpathian mountains.

Yes, I shared more details about this conference as I am one of the co-organisers - so feel free to ping me about it
I wrote 3 articles about why to join Friendly.rb this year: 

Friendly.rb conference
EuRuKo - Viana do Castelo, Portugal, September 18–19

The last one, three weeks from now, will happen in Viana do Castelo, Portugal  and it is the biggest Ruby conference in Europe: EuRuKo

Tickets are still available at https://2025.euruko.org and they have on Saturday a Ruby Safari - "Guided walking tour around Viana do Castelo, exploring local gems and hidden spots".

EuRuKo 2025

Flaky Tests, Courtesy of AI

When AI is writing tests in agentic mode, it's crucial to monitor its output. 

Sometimes, it uses tricks to pass the tests or creates unnecessary tests.

Diff from a change made by agentic LLM

For example, consider this diff that has at least two issues: 


1. The test is unnecessary for a medium-risk, medium-impact feature. It merely checks that the counter cache in Rails functions correctly. This test was written in an earlier iteration that I haven't reviewed yet to remove it. 

  1. The Category model has the following constraint:
index_categories_on_position_and_parent_id (position, parent_id) UNIQUE

Notice how it added a position: rand(1..1000) to make some tests to pass because they lacked the position?


This approach is just inviting flaky tests!

I added this to my Flakiness section: 

- Use consistent data across tests to avoid flakiness. Prefer existing fixtures instead of generating data randomly.
- Do not use `rand` or anything similar when generating data for tests.
- Use `travel_to` for all time-sensitive tests (assert time or need time to make the test work)
- Use `.sort` when the results are not guaranteed to be in a specific order.

Invisible work separates friction from flow.

Quote from Jony Ive about quality

No one will thank you for good error messages or default states, but they will feel it!
The difference between friction and flow is invisible work.

This is also true for the development process:

Sloppy names turn into messy objects and interfaces. Messy objects lead to slower teams.

The same goes for testing: Be careful about how you organise the code inside the test files because if it gets messy, it will slow down the development and debugging in the future.

It all compounds.

Details are never just details! If you are using AI to generate code, make sure it generates good names in your domain.

Remember to set the frequency for replication to Litestream!

Curious about how I ended up with an invoice nearing $100 for conducting over 20 million Class A operations on Cloudflare R2?

I initiated several Litestream processes across a variety of side projects and forgot to set the sync interval! :) It defaults to 1s

The backup I was handling was more complex than the main production database. It included slight variations in the SQLite file because it automatically queried various external services to check the status of different entities.

How to set sync-interval to litestream

Two new Ruby podcasts from Rails Foundation and Ruby Central

In case you missed this in the last period, there are two new podcasts in #Ruby world: 

On Rails - a podcast produced by the @Rails Foundation and hosted by @robbyrussell

👇

https://onrails.buzzsprout.com

https://onrails.buzzsprout.com

Ruby Gems Podcast produced by @rubycentralorg and hosted by David Hill and Marty Haught 

👇

https://www.buzzsprout.com/2509083

https://www.buzzsprout.com/2509083

PS: Both of them are hosted https://www.buzzsprout.com/ - built also with Ruby on Rails

Running all tests from the current branch

I enjoy creating small automations using Ruby and Bash. While it might be simpler to use Bash, I like #Ruby so much that I want to use it more.

Here are two examples of how to run all the tests that have changed in the current branch: an example for Minitest and one for RSpec

Don't let AIs rewrite your tests if once you agreed with them

Once you agreed to a set of tests: either written by you or written by AIs but guided by you, don't let the AIs to refactor/change the tests while they are trying to implement a feature. 

If your tests are there as specifications, then the implementation should be constrained by them. Therefore, they should not be changed unless you direct them to do so. 

A small tip for the about section of your own website

I am looking at various personal websites mostly focused on researching personal websites of technical people mostly programmers because I want to redo my own personal website - which is old and due for a redesign. 

And one thing that I noticed as a reader is that sometimes when I click on the about section the name is not written there. 

I will use my website as an example: 

website URL: ghinda.com 
the main page is the about: https://ghinda.com 

But if you read that page or use search you will notice that not even once I do write there my name: "Lucian Ghinda" 

Ruby San Francisco Scene is heating up

San Francisco Ruby scene is heating up

Source: https://sfruby.com


Already two events planned for this year:
1. SF Ruby AI Hackathon - 19 July - https://lu.ma/znhcct7v?tk=17VJ2z
2. San Francisco Ruby Conference - 19-20 November - https://sfruby.com

And of course let's not forget about Monthly Ruby Meetups -> https://lu.ma/sfrub, next one being on 4th June.

Huge props to Irina Nazarova and the team there. 
They are doing fantastic work to build up the Ruby scene in San Francisco!

Reminder to update Ruby 3.2 and Rails 7.1.x

This is your reminder that if you run #Ruby 3.2, now would be a good time to start planning an update.

It will be EOL in about 10 months - March 2026. I know that 2026 seems far away but it is not that far in terms of dependencies and upgrades.

Source: https://endoflife.date/ruby

If you are running Ruby on Rails 7.1.x then now would be a good time to schedule upgrade. 
Security support will end on 1st October 2025 - this year.

Source: https://endoflife.date/rails

I used https://endoflife.date for these nice images.

Official maintenance pages

For Ruby you can get the same information about maintenance at: https://www.ruby-lang.org/en/downloads/branches/

For Rails you can get the same information about maintenance at: 
https://rubyonrails.org/maintenance

Why choose Ruby on Rails - reliability and efficiency

Why choose #Ruby on #Rails?
I read this article from Reinteractive: https://reinteractive.com/articles/rails-8-modern-web-framework

But let’s be honest, sometimes you just want a framework that’s reliable, efficient, and doesn’t leave you wrestling with configuration files until 3 AM
Source: https://reinteractive.com/articles/rails-8-modern-web-framework

I also liked this part: 

Rails 8 empowers developers to build features rapidly with its convention-over-configuration approach and a vast library of gems.
Source: https://reinteractive.com/articles/rails-8-modern-web-framework

We should refute old and false narratives about Ruby or Rails

I happen to agree a lot with Amanda Brooke Perino here

Source: https://x.com/AmandaBPerino/status/1916800541746749817 or https://threadreaderapp.com/thread/1916800541746749817.html


That’s why I almost always comment on Hacker News or any forum where I see people still spreading old narratives about Ruby and Rails. I think we should not just accept them and move on but reply to them and show why the narrative is wrong. Maybe not with the purpose of convincing the author who is spreading that narrative but for other people who might read that without knowing Ruby and Rails. If no one refutes these statements, people from outside our community could take them as truth.


I believe it’s important to engage with empathy and try to have a dialogue with those spreading this myth.  We should try to understand where they heard about it, when they last checked the status of Ruby on Rails, and how much they know about our ecosystem.

Two YCombinator projects are using Rails and React


Work at a Startup and Bookface, two YCombinator projects are using Rails + React + PostgreSQL

Part of the Job Description talking about the tech stack


Source: 

  1. https://www.ycombinator.com/careers?ashby_jid=00c6950f-341f-4924-a456-ea32c9d5601d
  2. https://www.ycombinator.com/careers?ashby_jid=ef00c8d1-76e7-4cc3-82fe-7cc3e4679652

Update:
Here is a video from YCombinator where they explain the choice for Rails:
https://youtu.be/BJjsfNO5JTo?t=801 

Written by Lucian Ghinda - Senior Ruby Developer by day, Curator of Short Ruby Newsletter during weekends