ZZeroDropinzerodrop.hashnode.dev·5d ago · 6 min readRSpec Email Testing Without MailCatcherRails developers test email one of three ways, and each verifies something different. ActionMailer::Base.deliveries — the test adapter collects would-be emails in an array, and you assert against it. 00
PMPavel Myslikinpavelmyslik.hashnode.dev·Jul 29 · 4 min read3 Action Mailer Features I Didn't Know ExistedA few weeks ago I needed to check something in the Action Mailer docs, just a quick lookup. I ended up spending much more time there than expected and found a few features I had no idea existed, even 00
YVYashika Vijayvargiyainrailswithyashika.hashnode.dev·Jul 28 · 5 min readPart 3: Optimistic Locking in Rails – Preventing Lost Updates Without Blocking UsersIntroduction In the previous article, we learned how Pessimistic Locking prevents concurrent modifications by locking database rows. While this guarantees data consistency, it also means other users m00
YVYashika Vijayvargiyainrailswithyashika.hashnode.dev·Jul 16 · 7 min readPart 2: Pessimistic Locking in Rails – Preventing Race Conditions in ProductionIntroduction In the previous article, we learned why databases need locking and how PostgreSQL uses MVCC (Multi-Version Concurrency Control) to allow multiple transactions to work simultaneously. Howe10
YVYashika Vijayvargiyainrailswithyashika.hashnode.dev·Jul 13 · 4 min readUnderstanding Database Locking in Rails & PostgreSQL (Part 1) Goal of this article: Build a strong foundation before learning pessimistic locking, optimistic locking, deadlocks, and isolation levels. When I started working with production Rails applications, I r10
Iinfoincodecraftbydinesh.hashnode.dev·Jul 2 · 5 min readThe Hidden Cost of AI-Generated Code: Why Your Startup's Tech Debt Is ExplodingAI can write code in seconds. Cleaning up after it can take months. Over the last year, I've used AI coding assistants almost every day. They're fantastic for generating boilerplate, explaining unfami00
YVYashika Vijayvargiyainrailswithyashika.hashnode.dev·Jul 1 · 6 min readPostgreSQL Index Types Explained with Real Rails ExamplesPart-1 Understanding Indexes before learning Index TypesNow that we understand what indexes are and why they matter, let's explore the different types of indexes available in PostgreSQL and when to us10
YVYashika Vijayvargiyainrailswithyashika.hashnode.dev·Jun 23 · 3 min readUnderstanding Indexes Before Learning Index TypesBefore diving into different types of indexes, let's understand why indexes are needed. Imagine a library with 100,000 books. If someone asks for a book named "Clean Code", there are two ways to find 10
YVYashika Vijayvargiyainrailswithyashika.hashnode.dev·Jun 8 · 4 min readRails Performance Optimization: Fixing N+1 Queries with includes, preload, and eager_loadWhat is an N+1 Query? Suppose we have the following models: class User < ApplicationRecord has_many :posts end class Post < ApplicationRecord belongs_to :user end We fetch all posts: @posts = Po00
RRazvaninezlogs.hashnode.dev·Jun 5 · 4 min readEvery engineering team has a translator. I wrote the thing that translatesEvery engineering team I've worked on has had the same unspoken job title. Nobody's hired into it. It just lands on whoever's been there longest and answers Slack the fastest. The translator. Someone 10