AI Agents System Architecture - Possible strategies ai

AI Agents System Architecture - Possible strategies

AI agent architecture comes down to three strategies: single agent, sequential, and parallel. When one big prompt loses the plot, how sequential chains buy reliability, where parallel agents crush latency, and the pitfalls of each before you commit.

Mar 23, 2026

When to use Module over Class in 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.

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.

How to create a custom rubocop rule to improve code quality?

How to create a custom rubocop rule to improve code quality?

Custom RuboCop cops let you enforce your project's own conventions. Step by step: how cops inspect the abstract syntax tree, writing a cop that bans hardcoded phone numbers, wiring it into your RuboCop config, and watching it flag offenses in action.

Transforming YAML config files into Ruby objects with helpers

Transforming YAML config files into Ruby objects with helpers

YAML config files don't have to end up as messy nested hashes. Turn them into real Ruby objects with validation and custom methods: a small model class that loads the YAML, exposes clean accessors, and grows with your Rails app's configuration needs.

Creating predictable randomness in Ruby: The magic of seeds

Creating predictable randomness in Ruby: The magic of seeds

Reproducible randomness in Ruby sounds like a contradiction, but seeds make it easy: how pseudo-random generators work, fixed seeds for tests, debugging, and procedural generation, creative ways to pick seeds, and the pitfalls that quietly break determinism.

Embracing Hexagonal Architecture in Ruby

Embracing Hexagonal Architecture in Ruby

Hexagonal Architecture separates your business logic from databases, UIs, and external services using ports and adapters. What the pattern really means, a practical Ruby implementation, when it pays off, and the common problems teams hit when adopting it.

What is ENVIRONMENT in rake task?

What is ENVIRONMENT in rake task?

The :environment dependency in Rake tasks is what loads your Rails app, models, and database connections. What task my_task: :environment actually does behind the scenes, how the Rake dependency syntax works, and why skipping it breaks your custom tasks.

What's new in Ruby 3.4

What's new in Ruby 3.4

Ruby 3.4 adds the new 'it' block parameter that makes .then chains and maps cleaner than numbered parameters, chilled strings as a step toward immutability, and enhanced Range operations. What each change looks like in practice, with before and after code.

How to run Rails console in safe sandbox mode?

How to run Rails console in safe sandbox mode?

Rails console sandbox mode wraps every database operation in a transaction and rolls it all back on exit, so you can experiment safely. How to launch it, plus the traps: database locking, non-rollbackable operations, and why production use still needs care.

How to get table size in PostgreSQL database?

How to get table size in PostgreSQL database?

PostgreSQL table size is more than the data: pg_table_size, pg_indexes_size, and pg_total_relation_size each measure different things. One ready SQL query lists every table with data, index, and total size, sorted by the biggest disk consumers first.