Rails, Front-End developer, Indie maker, and building products and Sass for startups. Write articles to help startups and developers with technical content.
Rails’ turbo streams broadcasts let you update your UI in real time using a range of handy methods. In this series, I’ll break down these methods in pairs—highlighting their similarities and key differences that can significantly impact data consiste...
I want to share a practical solution to a common challenge in Rails development I face it with almost every application I work with: combining UUID-based models with user-friendly URLs. If you've ever wondered how to maintain the security benefits o...
Before Rails 7.1 Once upon a time, way long before the Rails 7.1 era, a smart Rails developer (like yourself) needed to ensure user email addresses were properly normalized (sanitized and formatted correctly). Back then, they used clever techniques s...
When creating a component in Rails, especially when using a component-based architecture like ViewComponent or similar, I was faced with a question, how should I pass around and manage data, especially configuration data. Here i have 2 options. Pass...
Recently, I was inspired by Coby's reflection on channeling his inner Purple Cow, a concept introduced by Seth Godin. It made me reconsider my self-image and how others perceive me. The idea of "being remarkable, in a way that compels others to talk ...
In the ever-evolving landscape of Ruby on Rails, how we choose to handle code can be as diverse as the developers themselves. Recently, my exploration into refactoring Rails helper to generate UI component names dynamically, led me down the path of m...
Writing code is a journey of continuous improvement, learning, adaptation, and, yes, refactoring. As our applications grow and evolve, we often find ourselves revisiting and rethinking our code to make it more maintainable, scalable, and flexible. To...
Hey Rails dev! Ever struggled with handling different types of data in your Rails applications? Well, ActiveRecord::DelegatedType is here to make your life easier. In this guide, I'll walk through how you can use DelegatedType to manage diverse data ...
🌟 Introduction Welcome back 😀! In a previous post, I tackled the classic "99 Bottles of Beer" problem using a procedural approach, leveraging Ruby's case expression to create a straightforward solution. Today, I revisit this catchy tune with a fres...
Hello, budding Ruby enthusiasts! 🌟 Have you ever heard of the song 99 Bottles of Beer on The Wall? It's the kind of catchy tune that’s perfect for passing time with friends or family as you cruise down the vast stretches of highways in the US or Can...
Years ago, Phil Karlton mentioned once, "that during my dad's time at Netscape, he did indeed throw a quote around, on more than one occasion, it is": There are only two hard things in Computer Science: cache invalidation and naming things In every d...
Welcome to Part 2 (you are reading) of our Rails Web Navigation tutorial! In Part 1, we embarked on a cosmic journey through the Rails galaxy, exploring the intricacies of the Rails web navigation system. We delved deep into how Rails handles web req...
Note: This tutorial is divided into two parts. In Part 1 (you are reading), we'll explore the Rails web navigation system, understand how Rails handles requests, and delve deep into the world of middleware. In Part 2, we'll focus on mastering the lin...
Ideas come and go. Yet, a select few manage to take root in our minds, demanding our attention and action. To garner quick feedback, we need reliable tools—those simple to grasp, operate, and seamlessly navigate their ecosystem. A robust community of...
Originally posted on my blog ahmednadar.com Three months ago, I embarked on an exciting journey, the creation of Connectroots. As the days turned into weeks and weeks into months, the pace of progress was exhilarating. Between cycles of design iterat...
Originally posted on my blog ahmednadar.com. We've all been there-happily adding new tables and columns to our applications in the development environment. And when things go wrong, we drop the table and start fresh, no harm, no foul 😎. But what hap...
originally posted on my blog You know that feeling when you're in the mood to crack on some code and do a 'brain dump' of ideas and code it? I'm sure everyone does, and it's perfectly fine. But sometimes, we forget about the initial brain dump and ca...
This is a unique post. It is not about development or design as I like to write, but it is a business collaboration. What is unique here, you might ask? My partner. The post is written by my partner, and every word and emoji. Nothing from me. I know ...
Every time I run a new rails application, I’d need to configure essential tools for my front-end stacks such as TailwindCSS and esbuild. I’ve adopted my configuration from my friend Pete Hawkins’s post on The best way to run Tailwind CSS on Rails. An...
In Rails applications, N+1 queries can cause significant performance issues. They occur when you have a list of items and perform a separate query to retrieve associated data for each item. This can result in poor performance, and even more so if the...