Submit a post
Post Preview
Note: Only the first pargraph is shown on the front page and overly long paragraphs may be broken up.
Rails on AWS book
Do you feel discomfort when connecting an AWS service with a Rails application because of unclear pricing rules, complex permissions, or advanced networking configuration? I felt this way for a long time until I dedicated myself entirely to learning AWS. With this book, you can master AWS in a short amount of time without spending months getting certified - Get the book now
HOTWire & Turbo Tutorial: Animated Deletions and Insertions
With the addition of the new Todo form appearing at the bottom of the Todos, and the delete action removing a Todo, we have a very functional app. It would be nice if those additions and removals had a little animation to emphasize what’s happening on the page. If there was a long list, we might miss the deletion, especially if a network request caused a delay in the removal of the Todo. We can hook into Turbo streams, and run some animations on these actions to make them appear and disappear. https://onrails.blog/2024/04/01/hotwire-turbo-tutorial-animated-deletions-and-insertions/
Clean up Your Messy Legacy Ruby on Rails Codebase With Rubocop
Setting up Rubocop on a new Rails application will get you on the path towards a well-maintained codebase. But what if you have an older project? [more inside]
Super Fast Rails
Most of the time, optimizing a Rails application requires repeating the same techniques. For example, at the database layer, it’s about creating the proper indexes, preventing 1+N queries, etc. Could we do that automatically? https://www.rorvswild.com/blog/2024/super-fast-rails
[gem] Redis-based distributed locks with "acquisition queue" capabilities
New gem (https://github.com/0exp/redis_queued_locks) [RedisQueuedLocks] that provides distributed redis-based locks with "lock acquisition" ordered queue capabilites and depends on pre-configured RedisClient istance (Reidis infrastracture layer you should provide by yourself) [more inside]
Pick a standard and move on
Don’t have standards and processes for your codebase and your team? You’re wasting so much cognitive energy! Let me try to convince you to pick one convention - any convention! - and move on to your core work.
Speeding Up Rails Assets Precompilation
There has been a lot of conversations on social media about the “NoBuild ” approach: using native browser features and plain CSS+JavaScript to avoid a precompilation step for our assets. [more inside]
Micro benchmarking value objects in Ruby: Data.define vs Struct vs OpenStruct
I did a series of benchmarks between Data class, Struct, and OpenStruct testing, creating new objects and accessing attributes. The tests consider keyword arguments and not positional arguments. [more inside]
I just released Kamal Handbook
The time has come and I released my new book Kamal Handbook: The missing manual. Kamal is an imperative deployment tool by 37signals and will be a Rails 8 default. [more inside]
OnStrum::Healthcheck - simple configurable application healthcheck ❤️ rack middleware
OnStrum::Healthcheck allows you to embed healthcheck endpoints into your rack based application to perform healthcheck probes. Make your application compatible with Docker/Kubernetes healthchecks in a seconds: https://github.com/on-strum/ruby-on-strum-healthcheck
Brute-forcing 2FA codes with Ruby
Ruby is a popular choice of scripting language in the infosec world because it makes it possible to write quick scripts to automate something. In this post, I explain how I used a little Ruby to brute-force 2FA codes: [more inside]
Secure code review checklist
Checklists are really useful to ensure you don’t forget important things, so why not create one for the security aspect your code review process? Here are my recommended checks: [more inside]
Gosu Game Jam 6 starts in 3 days!
The Gosu Game Library Discord community is hosting its 6th game jam starting on March 29. Details on itch.io
Customize your Gemfile for development and productivity
Stuck because your pals aren’t into adding a gem to your workflow? No worries! Check out this article for tips on making your development smoother without their nod. Happy coding with Ruby! [more inside]
An interactive intro to ruby debugger, in the debugger
I think the best way to learn is by doing, so I made an introduction to ruby debug gem where the instructions are in the code that you are moving through with the debugger. You get to use the debugger as you are reading about it. Turtles all the way down: An interactive intro to ruby debugger, in the debugger
HOTWire: Considering Morphing or Turbo Frames
With the new morphing features in Turbo 8, you now need to decide on when to use Turbo streams or Turbo frames instead of full page refreshing. Thankfully, all three techniques work together. https://onrails.blog/2024/03/26/hotwire-considering-morphing-or-turbo-frames/
Better Know Block Arguments
The third article in the “Argument Trilogy” – “Better Know Block Arguments” is available at https://noelrappin.com/blog/2024/03/better-know-block-arguments/
Rollup vs Esbuild for Rails
Despite ESBuild often being used as a default in new Rails apps, I was surprise to find very little experiments about Rollup. [more inside]
How to enable reusability for ActiveRecord::Base::normalizes
This article reviews the new normalizes
feature in Ruby on Rails 7.1 and shows how to increase reusability by creating normalizer modules. I also opened a feature request to add support for ActiveModel, since ActiveRecord::Normalization
only supports ActiveRecord, obviously. Please show your support.
Event Sourcing with Rails from scratch
A tutorial of how to implements event sourcing in Rails application https://www.smily.com/engineering/event-sourcing-with-rails-from-scratch