FirstDEV blog

⚞ Well, Blog First!

  • Home
  • Ruby
  • Ruby On Rails
  • Tips
  • Solutions
  • About
Subscribe
Developer tips

How to Negotiate a Promotion as a Developer — Without Playing Political Games

Most developers approach a promotion conversation like a salary negotiation: wait for performance review season, make their case, and hope the manager agrees. This approach loses promotions that should have been won, because

Rajan Bhattarai Rajan Bhattarai 11 min read
Ruby 3

Ruby Threads and Thread Safety — Practical Concurrency Without the Chaos

Threads in Ruby have a complicated reputation — partly because of the Global Interpreter Lock (GIL) in MRI Ruby, partly because concurrent code genuinely is harder to reason about, and partly because most

Rajan Bhattarai Rajan Bhattarai 10 min read
Rails

Action Mailer in Rails — Production-Ready Email Without the Footguns

Email in Rails looks deceptively simple — generate a mailer, write a template, call deliver_later. The basics take ten minutes. The production footguns take longer to find: emails sent synchronously blocking requests, views

Rajan Bhattarai Rajan Bhattarai 8 min read
Developer tips

Remote Work Survival Guide — What Nobody Tells Developers Before They Start

Remote work sounds like the obvious upgrade: no commute, flexible hours, work from anywhere. And for many developers, it is. But there’s a specific failure mode that’s invisible in job descriptions and glossy

Rajan Bhattarai Rajan Bhattarai 10 min read
Ruby 3

Metaprogramming with define_method — Writing Code That Writes Code in Ruby

Metaprogramming gets a reputation for being either magic or dangerous, depending on who you ask. Used carelessly, it produces code that’s impossible to trace and impossible to test. Used deliberately, it eliminates repetitive

Rajan Bhattarai Rajan Bhattarai 9 min read
Rails

N+1 Queries in ActiveRecord — Diagnosis, Eager Loading, and When Preloading Backfires

N+1 queries are one of those problems that makes perfect sense once you understand them, and that silently degrades production performance until a request that touches 500 records starts taking four seconds. The

Rajan Bhattarai Rajan Bhattarai 10 min read
Developer tips

How to Write a Technical Blog Post That People Actually Read

Most technical blog posts fail at the same place: the opening. They start with a definition, a history of the problem, or a tour of all the things they won’t cover. By the

Rajan Bhattarai Rajan Bhattarai 10 min read
Ruby 3

Proc vs Lambda in Ruby — Two Callable Objects, Different Rules

Ruby has two closely related callable objects — Proc and lambda — and the difference between them trips up developers more than almost any other Ruby concept. They look similar, they’re both instances

Rajan Bhattarai Rajan Bhattarai 10 min read
Rails

Active Storage — File Uploads and Attachments in Rails Without the Complexity

File uploads have a reputation for being the feature that always requires a gem, a CDN configuration, and half a day of setup. Active Storage, built into Rails 5.2+, changes that. It handles

Rajan Bhattarai Rajan Bhattarai 8 min read
Developer tips

Building a Developer Portfolio That Actually Gets You Hired

Most developer portfolios are a graveyard of half-finished to-do apps and cloned tutorials. Hiring managers have seen hundreds of them. They’re not evaluating whether you know CRUD — they’re trying to answer one

Rajan Bhattarai Rajan Bhattarai 10 min read
Ruby 3

Range Objects in Ruby — More Than Just Iteration

Most Ruby developers use ranges for iteration and not much else. (1..10).each, maybe ('a'..'z') for alphabet work, perhaps a case condition or two. But ranges in Ruby are full objects with a rich

Rajan Bhattarai Rajan Bhattarai 9 min read
Rails

Rails 8 Authentication Generator — Built-in Auth Without Devise

Authentication is one of those problems that sounds simple and isn’t. Devise has solved it for Rails developers for over a decade — but it’s also a dependency that ships with opinions, a

Rajan Bhattarai Rajan Bhattarai 8 min read
Developer tips

How Open Source Contributions Build Your Developer Career

Open source contribution has a reputation problem. The dominant narrative is heroic: submit a patch to Rails, get merged, become famous. The reality — and the more useful version — is that even

Rajan Bhattarai Rajan Bhattarai 10 min read
Ruby 3

Struct vs OpenStruct vs Data — Choosing Lightweight Value Objects in Ruby

Ruby gives you three tools for creating lightweight objects without the boilerplate of a full class definition: Struct, OpenStruct, and the newer Data (Ruby 3.2+). Each serves a different purpose, and the wrong

Rajan Bhattarai Rajan Bhattarai 11 min read
Rails

Stimulus Controllers — Adding JavaScript Behavior to Rails Views Without a SPA

The appeal of server-rendered Rails has always been that you write less — less duplication between client and server, less state management, less JavaScript infrastructure. But “less JavaScript” doesn’t mean no JavaScript. Dropdowns

Rajan Bhattarai Rajan Bhattarai 9 min read
« Newer Posts Page 5 of 10 Older Posts »
FirstDEV blog © 2026
Proudly published with Jekyll & using Jasper2
Latest Posts Twitter
FirstDEV blog

Check viewARU - Brand Newsletter!

Newsletter to DEVs by DEVs - boost your Personal Brand & career! 🚀