RSSAmplifier

Blog

DevelClan

In-depth articles on Ruby, Rails, and software engineering, built around original, worked examples you can learn from.

develclan.comRSS feed ↗29 posts

Latest posts

From Conditionals to Polymorphism

A conditional that keeps growing is a design problem, not a style problem. How to turn each branch into an object, one green step at a time.

Refactoring with Convergence Rules

Three rules turn duplication into abstractions through tiny steps, and catch false abstractions before they ever reach the code.

Factory Method Pattern

Creating objects is a responsibility too. What problem a factory actually solves, how the Simple Factory differs from the GoF's Factory Method, and how Ruby simplifies both because classes are objects.

Start With Ugly Code

Faced with a new problem, the elegant solution is almost always premature. Why simple code that passes the tests is the best starting point, and how to get there with TDD.

Tests That Survive Change

How to write Ruby tests that survive refactoring: what to test, what to ignore, and how to keep doubles from going stale.

Composition: Building with Parts

Building complex objects in Ruby with composition and modules as roles, and knowing when each one beats inheritance for your design.

Duck Typing and Inheritance in Ruby

When to reach for duck typing and when for inheritance in Ruby. Template Method, hook messages, and the signals that point to a hidden abstraction.

Messages Before Objects

Shift the focus from classes to conversations: sequence diagrams, stable interfaces, the Law of Demeter, and practical decoupling techniques in Ruby.

Singleton Pattern

Learn how to implement the Singleton pattern in Ruby: built-in module, manual approach, thread safety, the class variable trap, and dependency injection.

The Cost of Change in Software

Explore the philosophy behind software design: preserving changeability, measuring code friction, and balancing technical debt with over-engineering.

Dependency Inversion Principle

The Dependency Inversion Principle in Ruby: what it really means, when to use dependency injection, and when to keep your code simple.

Interface Segregation Principle

How to apply the Interface Segregation Principle in Ruby, and why taking it too far can hurt your design. Practical examples and trade-offs.

Liskov Substitution Principle

Master the Liskov Substitution Principle in Ruby. Learn to spot structural violations, handle duck typing, and write better object-oriented code.

Open-Closed Principle

Explore the Open-Closed Principle in Ruby through practical examples using inheritance and the Strategy pattern. Learn how to balance strict SOLID adherence with pragmatic design decisions.

Value Objects in Ruby: The Idiomatic Way

Master Value Objects in Ruby using the modern Data.define class. Learn about immutability, value equality, and how to eliminate boilerplate code for cleaner, safer domain modeling.

Single Responsibility Principle

Should a Ruby class do just one thing? Explore the Single Responsibility Principle, cohesion, and when to split classes through practical examples.

The N+1 Query Problem in Active Record

Master the N+1 problem in Active Record. Understand when to use joins, includes, or both to optimize Rails database queries and boost performance.

Testing in Ruby: From Scratch to Minitest and RSpec

The complete Ruby testing tutorial: understand fundamentals by building a test framework, then explore Minitest, RSpec, and Rack::Test with practical examples.

Sinatra Tutorial: Building a To-Do Application

A step-by-step tutorial for building a Sinatra web application in Ruby. Covers routes, ERB templates, sessions, and REST principles to create a full CRUD to-do list app.

Build Your Own URL Shortener with Rack

Build a complete, functional URL shortener from scratch with Ruby and Rack. This tutorial guides you in creating a real-world web application with a solid foundation to build upon.

Persistent Connections in Ruby: Streaming Bodies, SSE, and WebSockets with Rack

Learn how to implement persistent connections in Ruby using Rack, from streaming bodies and Server-Sent Events (SSE) to real-time WebSockets, with clear examples.

Rack for Ruby: The Complete Beginner’s Guide

Rack: Understand core concepts, routing, middleware basics, and learn how to create your own middleware step by step with examples.

ERB: Embedding Ruby in HTML

ERB is a Ruby templating system to embed Ruby code in HTML. Learn how it works, with examples and step-by-step rendering instructions.

Using Ruby Libraries

Explore Ruby’s libraries ecosystem, covering the Core Library, Standard Library, RubyGems, Bundler, how to load libraries, and manage dependencies.

Do Not Use the System Ruby on macOS

Learn why the preinstalled Ruby on macOS is outdated, unsupported, and incompatible with modern gems.

Install Ruby: A Step-By-Step Guide

Learn how to install Ruby on any OS with this step-by-step guide! Discover tips for managing multiple Ruby versions and optimizing your development setup with Ruby on Rails.

Installing and Using Tailwind CSS 4.0

Tailwind CSS can be installed and used in several ways. Let's take a look at the playground, the CDN and the compiler.

How to Implement a Cookie Bar in Ruby on Rails

How to build a cookie bar step by step in Ruby on Rails, and only install cookies if the user gives consent.

Seeding a Database in Ruby on Rails

How to seed your database in Rails step by step, with your own task to automate the process and using a gem to generate actual data.