sqlite
sqlite
software-development
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
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.
Latest
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.
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'
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.
What is Architectural Kata and why should every dev try it?
Architectural Kata is a flight simulator for system design: practice big architecture decisions in a safe setting instead of waiting years for a greenfield. How a kata session works, six perspectives that change the outcome, and why architecture is communication.
How to add actions after saving in Rails models? A new approach...
after_all_transactions_commit solves a classic Rails race condition: a background job looking for a record that is not committed yet. How the new ActiveRecord callback works inside and outside transaction blocks, and when to reach for it.
How to effectively manage and terminate old PostgreSQL connections
Idle PostgreSQL connections eat memory and can hit the max_connections limit, blocking your app. How to find old sessions in pg_stat_activity, close them safely with pg_terminate_backend, and automate the cleanup so hanging connections never pile up again.
14 powerful Rails console tricks that will supercharge your debugging
Rails console tricks that speed up debugging: silence SQL logs, reuse the last result with underscore, inspect routes and schema, find where a method is defined, run rake tasks and raw SQL, time operations, and several more you probably haven't used yet.
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
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.
Ruby as a Bash replacement: Writing powerful system scripts in Ruby
Ruby can replace Bash for system scripts that outgrow a few lines: real error handling, readable syntax, easy testing. Examples of bulk folder compression, process management, file operations, making scripts executable, and when Bash is still the better pick.
How to find similar records in PostgreSQL with Trigram similarity search in your Ruby on Rails App?
PostgreSQL trigram similarity finds records despite typos: enable pg_trgm, run similarity queries from Rails, tune the threshold, order results by score, and wrap it all in a reusable scope. Great for fuzzy search and duplicate detection without external tools.
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.
How to enable or disable prefetching in Ruby on Rails and Turbo
Turbo prefetching loads pages on hover, which is great until links point at heavy reports or expensive queries. How the data-turbo-prefetch attribute works, disabling it globally or per link in Rails, and when selective prefetching saves your server.
Team Topologies: Organizing for success in modern software development
Team Topologies in practice: Conway's Law and the reverse Conway maneuver, cognitive load, the four team types (stream-aligned, platform, enabling, complicated subsystem), and three interaction modes, with advice on introducing them in your organization.
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?
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
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?
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?
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.