Software writing with a long memory.

Notes on Ruby, Rails, infrastructure, distributed systems, and the small choices that make code easier to change.

Independent technical writing from 2016 to today. Practical, direct, and kept as an archive worth returning to.

Double-click to submit form pattern with Stimulus (revisited)Some months ago, I wrote about something I built, a component to submit forms with a double-click, where the user has to confirm the action, potentially avoiding miss-clicks and doing something irreve"Double-click to submit" pattern with StimulusWhile tinkering around with a home lab and CasaOS, I encountered this pattern where certain actions require a "double click", like this: I wanted to see how hard it was to copy this with Stimulus, anTraefik with Kamal: Tips and TricksIt took me some time to finally figure out Traefik and some more time to put two and two together, so I'd like to share some things I learned on how to get it to work smoothly with Kamal. Traefik is Production-Grade (ish) Rails deployment on Hetzner with KamalI've been toying around with Kamal for some time now, and I believe I have come up with a nice setup for a reasonably robust deployment. It includes two servers, one for the application and another foTaming complex Service Objects with dry-rbAs your Rails app grows, MVC feels inadequate. Should I put complex business rules in the models or the controllers? Should I just put everything in Concerns? At this point, most developers fall back Using concurrent-ruby in a Rails applicationConcurrency in Ruby is still a gray zone for many developers. If you know anything about concurrency, you probably know that Ruby is thread-safe by default because the Global VM Lock only uses one thrValidating Mandrill webhook signature on Ruby on RailsI'm writing this post partially because I couldn't find anything exactly like this and to keep a log for me, in case I have to deal with this once again. Since Mandrill does not provide a way to authEncapsulation in Ruby on RailsIn Object-Oriented Programming, encapsulation is one of the fundamentals concept. Understand encapsulation will help you write concise and easy to maintain code. But what exactly is encapsulation? If A simple solution to scalability problems: Event SourcingIn the past months I've been playing around with Kotlin and Spring's event sourcing engine. To get to know it better, I build a really simple clone of Untappd. If you don't know Untappd, a tl;dr is: FDeploying Spring Cloud Netflix apps on KubernetesIf you are deploying containers on production, Kubernetes is a no-brainer solution. It takes some time to get familiar with all concepts but once you understand it, piece of cake 🍰. So today I wannRefactoring legacy Ruby on Rails appsI have this idea: Chathub, an app that turns Github's organizations and/or repositories into chat rooms, pretty much like Gitter. I use this idea every time I want to build a new PoC. So I did it in RNetflix OSS: A beginner's guide [pt4]When a system grows, you need some kind of monitoring as well. If you have a monolithic app, that is not really a hard task, but when it comes to microservices word, things change. How to keep track Netflix OSS: A beginner's guide [pt3]So far, we created an Eureka server, a microservice and registered it in Eureka. You can access this microservice directly through his IP, but later, when you service grow and you need to scale it, pNetflix OSS: A beginner's guide [pt2]In the last post, I showed how to create a Eureka server. Now we'll go through the process of creating microservice and register it on Eureka. To begin, you can create a simple project with one entiNetflix OSS: A beginner's guide [pt1]In this series of posts, I'll try to get you inside the Netflix stack: understand how it works and get your feet wet in the microservices world. So, to begin, we need to know the first component of