But what is interesting is also that Matz hinted that
this should be seen as a low-level API, with potential plans for a
higher-level API in the future. This development is exciting as it could
unlock new possibilities:
Noel Rappin continues his series of writing about Ruby and languages
that inspire it (if you have not read yet part 1 Ruby
And Its Neighbors: Perl) and this time it is about Smalltalk.
I liked very much this article as it goes into talking about the
innovations that Smalltalk brings to the table, and at the end I almost
felt sad that I never used Smalltalk professionally:
While Noel's article was writting from the persperctive of someone that
wrote Smalltalk professionally here Vinay explores the influence of
Smalltalk as someone who does not know Smalltalk. It is still refreshing
to see how the influence can be identified:
I'm certain, although I haven't had the time to develop a proper data
scraper to confirm, that Ruby articles are appearing more frequently on
the front page of Hacker News this year.
I'm specifically referring to technical articles.
Here's the latest example: Yesterday, there were two posts:
Joe Masilotti's article about "Ruby Already Solved My Problem" was on the front page and remained in the active list for a while.
I encourage everyone in the #Ruby community to move beyond the mindset
that "Ruby is declining." From what I observe, Ruby is growing in terms
of its presence in public discourse and the resources being created.
Let's discuss Ruby more openly. Yes, there are many other languages and
frameworks, both new and old.
I'm not a fan of criticizing others, so I believe we can talk about Ruby
without dissing other technologies. Engage with others and share what we
have.
Amabile, Teresa M. “A Model of Creativity and Innovation in
Organizations.” Research in Organizational Behavior 10, no. 10
(January 1, 1988): 123–67. https://ci.nii.ac.jp/naid/20000708825.
Here is how someone described where they were looking for inspiration:
in variations and deviations
Amabile, Teresa M. “A Model of Creativity and Innovation in Organizations.”
And then talking about their work environment they hint at something
that I also talked in the past: there has to be slack time (and not time
on Slack) during the work to be able to thinker with things without
having the pressure of always making something that is directly
productive:
Amabile, Teresa M. “A Model of Creativity and Innovation in Organizations.”
I've been using git worktree for at least five years now.
Here's how I set things up at work.
How I use git corktree
Say I work on short_ruby project.
I create a folder called short_ruby and inside I have:
`short_ruby/main` -> which will always remain as head main
`short_ruby/pairing` is where I pull branches for code reviews, dig deeper into changes, or show draft code to a colleague.
`short_ruby/feature_<id>` is a new worktree I create for each feature I work on, and I remove it when I'm done.
Why these folders:
I always keep a local copy of the current main branch. This helps me review changes or start something new, since I can quickly check how production works if main is what's deployed.
I also want to quickly access any branch I'm reviewing, while still being able to see the main branch. Having separate folders makes it easy to switch between them.
I keep a folder for each feature, which is similar to using branches. The difference is that I can always check main or another branch while working on a new feature.
In case you wonder what do I do with DB:
When using SQLite this problem is solved by default as each folder will have their own database
When using with PostgreSQL/MySQL I keep a single database and always do: rails db:reset + rails db:migrate when I have to run migrations inside a folder. In practice it works well.
Why do I activate Vim in any code editor I work with? Imagine a
list of emails in a Google Sheet in a single column, one per row, and
need to convert it to a Ruby array.
1️⃣ Open Vim
2️⃣ Paste the list
3️⃣ :%s/^/"/
4️⃣ :%s/$/",/
5️⃣ Add `[` and `]`
Why start this newsletter? I had newsletters set up in multiple places,
and managing them became challenging. I want to focus on writing.
What will you find inside? Mostly the same content I share on
social media: Ruby, Rails, Testing, Creativity, and tech-related topics
that I find interesting and worth sharing.
If you enjoy my content here, you'll appreciate what you find there.
This isn't a replacement for the Short Ruby Newsletter, which will
continue as usual. My personal newsletter is about my interests,
passions, and writings, all related to Ruby, Rails, and tech.
In the Short Ruby Newsletter, my role is as a curator, ensuring we
include what's essential for the Ruby community. In my personal
newsletter, I can focus on what I personally enjoy and find intriguing,
while also compiling my writings from various sources.
Whenever I create a new table or column in a web app, I aim for clarity
so that anyone connecting directly to the database can easily understand
it.
My heuristic involves designing the database so that direct
queries yield sensible results without needing any additional
information beyond the database itself.
There are trade-offs with this approach. For example, you might
sacrifice some performance, so keep that in mind.
Let me give some examples:
1. Enums: String vs IntegerUsing integer
enums like priority = 0, 1, 2 can be confusing when querying directly.
Using string enums like priority = 'urgent', 'medium', 'low' makes
results instantly clear when running SELECT *.
👉 Use string enums unless performance is critical.
2. Nullable vs Non-NullableIf something is
required logically, enforce NOT NULL.Don’t leave half your schema
nullable "just in case."
👉 This makes the schema self-documenting.
3. More generally any validation that can be added on the
DB should be there
Eg: user_invoices might contain a unique validation on user_id +
invoice_id so add a unique index on ['invoice_id', 'user_id'] on
that table
4. Relationship context
If you need to store the creator of a record, don't just add user_id.
Consider a more descriptive name like creator_id or even
created_by_author_id.
Inspired by Igor Aleksandrov post on running migrations multiple times:
This article is a perfect base for understanding working with Time and
timezones in Ruby and Ruby on Rails.
I think the core idea of the article is always keeping in mind in Rails there are 3 timezones:
Source: It's About Time (Zones) by Elle Meredith
Scheduling events in user time zone
For this there are two articles that you should read:
I will add here the main idea that I extracted from both of them but you
should make sure to read them as they present more ideas and options and
specific recommendations when scheduling events in user timezone.
For recurring events that must run at a user's specific local time (e.g., "every day at 9:00 AM"), one option is to calculate and persist the event's hour relative to UTC (hour_in_utc). Another option is to use a library that knows how to compute the next occuring event and not do the calculation yourself.
When considering timezones,please remember that time zones are data that change over time (due to reasons that could be social or political so future DST/rules can change), and you'll need to make sure that you sync your Timezone data.
From Scheduling things in user's time zone by Julik Tarkhanov
How to create a new Rails app with Rails 8.1.0.beta1
gem install -v 8.1.0.beta1 rails
rails _8.1.0.beta1_ new mynewrails81app
You can also generate a new Rails app using the main branch. Rails
has a long history of being used by major companies on the main branch,
making it as safe as possible to run. While it's not an official
release, any bugs that appear are likely to be resolved quickly.
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.
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 itI 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".