Skip to content
Write Software, Well
  • Services
  • Books
  • LinkedIn
  • Archive
  • About
Sign in Subscribe
Business Logic - Write Software, Well

Decoding the Business Layer of Software

Announcing a new newsletter where I write about topics beyond Ruby on Rails: running a software services business, freelancing, positioning and marketing for developers, working with AI, hiring and tech recruiting, etc. Business Logic is about everything that happens around writing software, well.

Business Logic 2 min read
Creating a New Rails App - all aboard the train!

Let's Create a New Rails Application for the Blog

This is the first post in the series where I'm building my blog in Ruby on Rails. I'll create a new Rails application and we'll walk through some of the important files and directories in a fresh Rails project. By the end of this post, we'll have a basic app up and running in the browser.

Rails in Practice 7 min read
Rebuilding Write Software, Well in Rails

I am Rebuilding this Blog with Rails

After three years on Ghost, I'm rebuilding this blog from scratch with Ruby on Rails. In a new series, I'll document the journey of building a production Rails application, from development to deployment. Follow along as I build the new home for Write Software, Well.

Rails in Practice 4 min read
Serving Static Files with Reverse Proxy using X-Sendfile

Serving Large Files in Rails with a Reverse Proxy Server

If your Rails app deals with large files, let a reverse proxy like Nginx or Thruster serve them. In this post, we'll learn how X-Accel-Redirect (or X-Sendfile) header hands off file delivery to Nginx. We'll also read Thruster’s source code to learn how this pattern is implemented at the proxy level.

13 min read
How to fetch a single record from has_many relationship with SQL Subquery

Fix N+1 Queries Without Eager Loading Using SQL Subqueries

In this post, we'll learn how to use a SQL subquery in a Rails app to eliminate N+1 queries and improve performance. We'll profile a real-world example, showing how to fetch a single record from associated has_many records efficiently without eager loading or excessive memory usage.

14 min read
Select Specific Columns

Reduce Memory Usage by Selecting Specific Columns

As your application grows, so do your database tables. If you keep fetching all columns, those extra fields, especially large text or JSON blobs can quietly eat up a lot of memory. This post shows how to reduce memory usage in your Rails apps by selecting only the columns you need from the database.

5 min read
Rails Debugbar

Profiling Ruby on Rails Applications with Rails Debugbar

This post shows how you can get a better understanding of your Ruby on Rails application performance with the Rails Debugbar, a profiling tool inspired by Laravel Debugbar. It also covers how to spot N+1 queries, reduce object allocations, and optimize SQL queries to improve page load times.

11 min read
Strong Parameters in Rails

Why You Need Strong Parameters in Rails

In 2012, GitHub was compromised by Mass Assignment vulnerability. A GitHub user used mass assignment that gave him administrator privileges to none other than the Ruby on Rails project. In this post, I will explain this vulnerability and how you can use the Rails strong parameters API to address it.

Controllers 7 min read
Working with HTTP Response in Rails

Working with HTTP Responses in Rails

In this post, we'll learn how to work with the response object in Rails controllers — from inspecting response bodies and headers to setting status codes and content types. This guide also covers key methods like body, status=, content_type, cookies, and more, with practical examples.

Controllers 4 min read
Working with HTTP Requests in Rails

Working with HTTP Requests in Rails

Every web application needs to process incoming HTTP requests. In this post, we’ll take a closer look at how Rails handles requests, how you can access the request object in the controller, and some of the most useful methods it provides to gather meaningful data from the request.

Controllers 8 min read
Rails Parameters

Understanding Rails Parameters

Rails parameters let you access data sent by the browser, both via the URL and forms. In this article, we'll cover the basics of parameters, including what they are, how they work, and why they're important. We'll also learn how you can pass parameters in different formats such as arrays and hashes.

Controllers 9 min read
A Rails Controller for Books

New Series on Rails Controllers

This is the first post in a new series that explores the Rails controllers in detail. This post covers the basics, providing a brief overview of controllers, why we need a controller, and how to create one. We'll start exploring more advanced stuff about controllers starting from the next post.

Controllers 6 min read

Page 2 of 18

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

© Write Software, Well 2025 - Powered by Ghost