architecture
architecture
ruby
How to build Rails AI code quality workflow
AI writes confident Rails code that quietly breaks production standards. Build a quality workflow that catches it: Lefthook gates, Strong Migrations as a hard line, N+1 detection with Prosopite, database checks in layers, and CI that mirrors local hooks.
ruby-on-rails
Safely removing Rails database columns without breaking production
Removing a Rails database column can crash old processes mid-deploy. This walkthrough shows the safe order: ignored_columns first, migration later, plus how to handle columns that still hold data and what the schema cache does behind your back.
Latest
Messaging problems and solutions you should know before going to production
Messaging looks clean on a diagram and gets messy in production. Duplicate messages, slow consumers, fat events, DLQs used as trash cans: what each problem really costs and the patterns (idempotency, event design, async UX) that keep a broker-based system honest.
How to configure Fail2ban
Fail2ban turns brute-force noise on SSH and your reverse proxy into a boring automated reaction. A practical setup for a VPS or homelab: sane jail config, testing before trusting, notifications without a siren, and where it fits in the wider security story.
What is the DORA framework and how can it help your company
DORA metrics explained for engineering leaders: deployment frequency, lead time, change failure rate, time to restore and reliability. What each one really tells you, how to use them to improve delivery, and the anti-patterns that turn them into dashboard theater.
21 engineering lessons for real teams
21 engineering lessons that survive contact with production: why simple code beats clever code, technical debt as a communication problem, what actually builds trust in teams, and how senior engineers pick problems. Field notes for real teams, not conference slides.
HTTP caching for engineers who forgot the sharp edges
HTTP caching refresher for engineers: how freshness, revalidation, Vary and Cache-Control really interact, why stale responses can still be useful, what reload actually does, and the boring headers that keep private content out of shared caches.
Rails view rendering performance: when render gets expensive
Rails partials feel free until a page renders hundreds of them. Benchmarks of five rendering strategies (inline ERB, partial loops, collection rendering and more) show which is fastest, why the helper trick backfires, and a practical rule for when to optimize views.
UUIDv7 from PostgreSQL 18 in practice
UUIDv7 arrives in PostgreSQL 18 as a built-in uuidv7() function. See what it changes in practice: friendlier indexes than UUIDv4, simpler Rails migrations, a schema example, and the security caveat that time-ordered does not mean secret.
How to audit a legacy Rails codebase without getting lost
Auditing a legacy Rails codebase starts with one question: what is the team afraid to change? A practical method for finding real hotspots, building a small audit ledger, using tools and AI without drowning in output, and delivering one page that people act on.
How to scale software like Elon Musk: delete first, automate last
Delete first, automate last: Elon Musk's five-step algorithm applied to software. Why questioning requirements and deleting code must come before optimization, and how automating a broken process just gives you a faster version of the wrong machine.
Getting structured input and output from Ollama
Structured output from Ollama takes more than JSON mode. Learn the reliable pattern for a Rails app: shape the input, constrain output with JSON Schema, parse defensively, and retry with feedback so a local LLM survives production instead of just a demo.
Be aware of possible problems with SQLite on Production
SQLite in production works better than its toy reputation, but only if you know the traps: why WAL mode is non-negotiable, how blue-green deployments break your setup, missing ILIKE, quirky JSON types, and what you honestly gain in return.
Your architecture choice is the most important decision you'll make
Architecture is the set of decisions that feel permanent after six months. An honest tour of monolith, layered, modular monolith, SOA, microservices and event-driven options: what each really costs and why the modular monolith deserves more attention than it gets.
How to correctly order messages in distributed systems
Message ordering in distributed systems does not come from a FIFO queue. What actually keeps events sane: idempotency as the real safety net, partition keys when order truly matters, optimistic locking as a version guard, and the traps of multiple consumers.
Cynefin framework - decide when to use Agile vs Waterfall
Cynefin framework in practice for engineers: classify a problem as clear, complicated, complex or chaotic before picking a process, so you know when Agile experiments beat Waterfall plans and what to do when production is down.
Risk management - The illusions of intuition in software engineering
Risk management for engineers, without the vibes: use expected value to judge a rewrite, spot base rate neglect and sunk cost in tech choices, apply Bayesian thinking during outages, and price technical debt with a four-step calculation you can run today.
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.
Structured logging in Rails 8.1 with Rails.event
Structured logging lands in Rails 8.1 with the Rails.event API. How the Structured Event Reporter replaces regex-parsed log lines with JSON events, plus tags, context, schemas, debug mode, and how to subscribe and test events in your own app.
Ruby 4.0 and the magic of isolation - How Ruby::Box ends the nightmare of monkey patching
Ruby::Box in Ruby 4.0 isolates monkey patches so one gem's core-class override stops breaking the rest of your process. How the isolation works, what problems with global state it ends, and the limitations to weigh before you rely on it.
Forget about technical debt and finally start delivering
Technical debt is not the real enemy: cognitive load is. Why messy abstractions hurt because of what they do to your brain, how the database quietly kills flow, and how to stop chasing code cleanliness for its own sake and start delivering again.
How to serve 800 million users without database sharding?
OpenAI serves over 800 million weekly ChatGPT users without database sharding. Inside the architecture: a single primary PostgreSQL, cascading read replicas, aggressive caching against thundering herds, and connection pooling pushed to its limits.