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!

195 posts •
Developer tips

Why Developers Who Stay Quiet Get Overlooked (And How to Fix That)

You’ve shipped things that work. You’ve solved problems that stumped your team. You write clean code and know your domain deeply — but the promotion went to someone else, the consulting inquiry landed

Rajan Bhattarai Rajan Bhattarai 9 min read
Ruby-code

Find Intersection Of Arrays Or Sets Cleanly In Ruby 3

Ruby 3+ provides elegant ways to find common elements between arrays, sets, or enum collections using intersection (&) or Set#intersection. This is especially useful for filtering, authorization checks, tag matching, or data deduplication.

Rajan Bhattarai Rajan Bhattarai 1 min read
Ruby-code

Group Array Elements By Multiple Attributes In Ruby

Grouping records by a single attribute is straightforward using Enumerable#group_by. But what if you want to group by multiple attributes, such as categorizing records by both type and status? This method handles that

Rajan Bhattarai Rajan Bhattarai 1 min read
Ruby-code

Deeply Remove All Nils And Empty Values From A Nested Hash In Ruby

When handling deeply nested hashes or API payloads in Rails, it’s common to deal with nil values, empty arrays, or hashes that need to be cleaned before storage or transmission.

Rajan Bhattarai Rajan Bhattarai 1 min read
Ruby-code

Convert An Array Of Single Key Hashes Into An Attribute Hash

You may encounter a situation where you have an array of single-key hashes and need to restructure it into a grouped hash based on the keys.

Rajan Bhattarai Rajan Bhattarai 1 min read
Ruby-code

Normalize Input Parameters By Symbolizing Keys And Stripping Empty Strings In Ruby

When working with user-submitted forms or API input, it’s common to receive params with string keys and empty string values.

Rajan Bhattarai Rajan Bhattarai 1 min read
Ruby 3

Exploring Endless Method Definitions in Ruby

Ruby has a reputation for flexibility and expressiveness, often encouraging developers to explore boundaries that many other languages restrict.

Rajan Bhattarai Rajan Bhattarai 8 min read
Rails

Exploring the New Basic Authentication Generator in Rails 8

Rails 8 introduces a built-in authentication generator, streamlining the process of adding basic authentication to Rails applications.

Rajan Bhattarai Rajan Bhattarai 5 min read
Developer tips

The Right Way to Write Documentation for Codebases

Effective documentation is crucial for the success and maintainability of any codebase. It serves as a roadmap for developers, aiding in understanding, collaboration, and future development.

Rajan Bhattarai Rajan Bhattarai 8 min read
Ruby 3

Mastering Ruby’s Closures - Blocks, Procs, and Lambdas Explained

As seasoned Ruby developers, we often leverage the language’s expressive syntax and powerful features to write clean and efficient code.

Rajan Bhattarai Rajan Bhattarai 6 min read
Rails

Optimizing N+1 Queries in Rails

In the realm of Ruby on Rails development, the N+1 query problem is a notorious performance bottleneck.

Rajan Bhattarai Rajan Bhattarai 5 min read
Developer tips

How to write better Commit messages

In collaborative software development, commit messages serve as the narrative thread that weaves together the evolution of a codebase.

Rajan Bhattarai Rajan Bhattarai 5 min read
Ruby 3

How Keyword Arguments Work in Ruby 3

Ruby 3.0 introduced significant changes to how keyword arguments are handled, aiming to enhance clarity and reduce ambiguity in method calls.

Rajan Bhattarai Rajan Bhattarai 4 min read
Rails

Security features in Rails 7 & 8

Ruby on Rails has long been recognized for its emphasis on security, offering developers a robust framework to build secure web applications.

Rajan Bhattarai Rajan Bhattarai 7 min read
Developer tips

Pair Programming tips for Remote Developers

In the evolving landscape of software development, remote work has become increasingly prevalent.

Rajan Bhattarai Rajan Bhattarai 4 min read
« Newer Posts Page 13 of 13
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! 🚀