When to use Module over Class in Ruby? ruby

When to use Module over Class in Ruby?

Ruby modules often beat classes for service objects: why a shell class like PasswordResetInitiator is procedural code in disguise, using a module as a toolbox, mixins instead of artificial inheritance, and Data objects for tidy parameters.

Jan 26, 2026

Ruby 4.0 - a big update for its 30th birthday

Ruby 4.0 - a big update for its 30th birthday

Ruby 4.0 marks the language's 30th birthday with maturity instead of revolution: saner syntax for multiline conditions, faster boot with fewer requires, a maturing Ractor story, hidden performance gems, and protection against command injection.

Your system is not unique - The power of business archetypes

Your system is not unique - The power of business archetypes

Business archetypes prove your 'unique' domain is usually a store selling something unusual. Map complex requirements onto universal building blocks: product catalogue, orders, entitlements, inventory for services, party and billing, and stop reinventing the wheel.

CUPID - is SOLID slowly becoming obsolete?

CUPID - is SOLID slowly becoming obsolete?

CUPID challenges SOLID with properties instead of rules: composable, Unix philosophy, predictable, idiomatic, domain-based. Where the decades-old principles show their age in the cloud era, what 'joyful software' means, and whether SOLID is really done.

How to tame race conditions in read models

How to tame race conditions in read models

Race conditions in read models are the price of parallel event-driven systems. How to handle events arriving out of order: treat the read model as an anti-corruption layer, separate facts from rumours, and build projections that survive an effect arriving before its cause.

How to control queues and concurrency in Sidekiq?

How to control queues and concurrency in Sidekiq?

Sidekiq capsules let you give each queue its own concurrency, so photo processing stops clogging urgent jobs and API calls stay under rate limits. A three-step setup: configure the capsule, assign the job, and call it, with configuration examples.

How to modularize a system and avoid 'Siamese twins'

How to modularize a system and avoid 'Siamese twins'

Siamese twin modules force a change in one place to ripple into another. How domain leakage and state-transfer events create a distributed monolith, and how contextual modularization with the right communication patterns cuts the connection, without cargo cult.