Skip to content
Write Software, Well
  • Services
  • Books
  • LinkedIn
  • Archive
  • About
Sign in Subscribe
Photo by Debby Hudson / Unsplash

How I Read Rails Source Code

Here're two techniques I've found really helpful for reading the Rails codebase, without getting overwhelmed. If you want to dive into the Rails source code for a deeper understanding, but feel intimidated by the sheer size of the codebase and don't know where to begin, this post is for you.

Rails Internals 13 min read
Build Your Own Router

Build Your Own Router in Ruby

Have you always wondered what a Router is and how it works? I know I have. In this second bonus post in my Rails Companion course, we'll build our own router in Ruby to get a deeper understanding of the Rails Router. We'll also use some meta-programming to make it look just like the Rails router.

This article is for Members only

Rails Companion 11 min read
Growing Object-Oriented Software, Guided by Tests

Growing Object-Oriented Software, Guided by Tests

Testing software is good. Period. This book gives a practical approach to building software combining the principles of object-oriented programming with test-driven development. All the buzzwords might trigger your inner sceptic, but this book is really, really good. Highly recommended.

book-notes 11 min read
Ruby's defined? Keyword

Understanding Ruby's defined? Keyword

Ruby's defined? keyword is an elegant way to check if a variable is defined or not and also to cache expensive operations. However, it's confusing, and a few gotchas await the new Rubyist. Now that I've had a few opportunities to play with it, here’s my shot at sparing you some of the confusion.

Ruby Gems 4 min read
Logging Events in HoneyBadger

Honeybadger Now Supports Logging and Event Monitoring

Honeybadger recently added support for logging and event monitoring. It's one feature that I've been waiting for a while now, and I recently stumbled upon it randomly yesterday. This post shows how you can log events from your Rails apps to Honeybadger.

2 min read
Let's Go on a Safari - Calvin and Hobbs (Credit: Bill Watterson)

Rails Companion - Build a Web Application in Ruby, without Rails

In this course, we'll build a web application in Ruby from scratch, without using Rails, to understand how web applications work and the core ideas behind Rails. In each lesson, we will build a specific feature from scratch using Ruby and understand the corresponding Rails concept in-depth.

Rails Companion 8 min read
Building a Web Application in Ruby Without Rails

Let's Build a Web Application in Ruby without Rails

Rails is great for building web apps. But it can be quite overwhelming if you don't know how web applications work. In this series of articles, we'll build a simple but complete app in plain Ruby without Rails, to get a deeper understanding and appreciation of everything Rails does for us.

Rails Companion 9 min read
What does frozen_string_literal do in Ruby?

What Does the Frozen String Literal Comment Do in Ruby?

Frozen strings not only prevent unintended modifications, but also reduce the overhead of the garbage collector by eliminating unnecessary memory allocations, thus improving application performance. This post explains the concept of freezing along with the magic comment frozen_string_literal.

Ruby Gems 7 min read
faster tests with VCR gem in Ruby

Speed Up Your Tests Using VCR Gem in Ruby

HTTP API requests can be slow. They're especially slow if you have to make them repeatedly in your tests. The VCR gem in Ruby speeds up your tests by recording the response the first time and replaying the same response for future runs. Let's understand how it works and how to use it.

Ruby Gems 5 min read
Play Sounds in Campfire

Playing Sounds in Rails with the Audio API

In this post, we'll learn how Campfire allows users to play various funny sounds by typing `/play` followed by the name of the sound. I found the entire flow pretty interesting, involving various aspects of Rails and Hotwire. Let's see how it's done.

Campfire 5 min read
Random Number Generation in Ruby

How to Generate Random Numbers in Ruby

This post covers the basics of random number generation in Ruby. As with everything in Ruby, there're multiple ways you could do it, with some approaches better than the other. We'll also explore generating random numbers in various formats as well as generating secure random numbers.

Ruby Gems 5 min read
Anonymous Block Forwarding in Ruby

Anonymous Block Forwarding in Ruby

In this post, we'll take a look at the anonymous block forwarding feature added in Ruby 3.1. It lets you replace your execute(&block) calls with execute(&). Not only it saves you from coming up with a variable (most likely blk), it also looks pretty sweet. I dig it.

Ruby Gems 2 min read

Page 5 of 17

Load More Something went wrong with loading more posts
  • Sign up
  • Homepage

© Write Software, Well 2025 - Powered by Ghost