FirstDEV blog
  • Home
  • Ruby
  • Ruby On Rails
  • Tips
  • Solutions
  • About
Subscribe
cdrrazan

Rajan Bhattarai

Full Stack Software Developer! 💻 🏡 Grad. Student, MCS. 🎓 Class of '23. GitKraken Ambassador 🇳🇵 2021/22. Works with Ruby / Rails. Photography when no coding. Also tweets a lot at TW / @cdrrazan!

118 posts •
Ruby-code

Flatten A Deeply Nested Array In Ruby

Arrays in Ruby can be nested arbitrarily deep — arrays of arrays of arrays. flatten collapses them into a single level, but knowing when to flatten fully versus partially is what separates clean

Rajan Bhattarai Rajan Bhattarai 1 min read
Ruby 3

Ractor — True Parallelism in Ruby 3 Without the Shared State Nightmare

Ruby’s GIL — the Global Interpreter Lock — has been the punchline of many conversations about concurrency for a long time. The lock means that even with multiple threads, only one can execute

Rajan Bhattarai Rajan Bhattarai 8 min read
Rails

Active Storage — File Uploads in Rails Without the Ceremony

File uploads have a reputation for being one of those features that look simple and turn out to be a multi-day project. Pick a storage backend, configure credentials, handle direct uploads, generate variants,

Rajan Bhattarai Rajan Bhattarai 8 min read
Developer tips

Contributing to Open Source — The Career Move Most Developers Overthink

The phrase “contribute to open source” carries a weight it doesn’t deserve. Somewhere along the way it became synonymous with submitting a pull request to a major framework, getting accepted by Matz himself,

Rajan Bhattarai Rajan Bhattarai 10 min read
Ruby-code

Sort An Array Of Hashes By Multiple Keys In Ruby

Sorting a collection of hashes by a single key is straightforward, but sorting by multiple keys — primary sort by one field, secondary sort by another — requires a slightly different approach using

Rajan Bhattarai Rajan Bhattarai 2 min read
Ruby 3

Ruby 3.2's Data Class — Immutable Value Objects Done Right

If you’ve been writing Ruby for a while, you’ve probably cobbled together something to represent simple value objects — a Struct, a frozen hash, maybe a plain class with an attr_reader and a

Rajan Bhattarai Rajan Bhattarai 7 min read
Rails

Stimulus.js — Adding Interactivity to Hotwire Without a Frontend Framework

Turbo handles navigation and real-time updates beautifully — page transitions, stream updates, frame replacement, all without writing JavaScript. But there’s always that next layer of requirement: a dropdown that opens and closes, a

Rajan Bhattarai Rajan Bhattarai 8 min read
Developer tips

Writing in Public — How Developers Build Authority Without Becoming Influencers

Most developers I know are suspicious of “building an audience.” It sounds like something that requires a ring light, a content calendar, and a willingness to perform enthusiasm for things you don’t actually

Rajan Bhattarai Rajan Bhattarai 10 min read
Ruby 3

Ruby's Fiber Scheduler — Concurrency That Actually Makes Sense

Most Ruby developers have a complicated relationship with concurrency. Threads feel dangerous. Processes feel heavy. And the GIL — the Global Interpreter Lock — has been the villain in so many horror stories

Rajan Bhattarai Rajan Bhattarai 8 min read
« Newer Posts Page 11 of 14 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! 🚀