ruby
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.
ruby
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.
Latest
Rails Performance Optimisation - Understanding GVL in practice
Rails performance starts with understanding the GVL: why only one thread runs Ruby code at a time, how that throttles CPU-bound apps, throughput vs latency, choosing a server, offloading to background jobs, and how to instrument and measure before optimising.
From strategy to code: How the discovery process changes thinking about DDD
DDD is not aggregates first: the discovery process is the heart of it. Why strategy with domain experts beats jumping into tactical patterns, the language pitfalls that derail modelling, the 'what if' trap, and why change must come from above and below.
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.
Microservices vs Monoliths: breaking free from architectural dogma
Microservices vs monoliths is a trade-off, not a dogma. Why companies really migrate (team coordination, not speed), the complexity bill that follows, what DoorDash's transformation shows, and how to pick architecture on evidence instead of fashion.
How can large files be sent efficiently in Ruby on Rails with authentication and caching?
Sending large files through Rails wastes memory and blocks app workers. X-Sendfile hands the transfer to NGINX while Rails keeps authentication and caching: server configuration, cache headers, testing in development, other HTTP servers, and a complete example.
ActiveJob::Continuable - Interrupting and resuming jobs in Ruby on Rails
ActiveJob::Continuable lets long-running Rails jobs survive restarts: split work into steps, track progress with cursors and checkpoints, and resume exactly where the job stopped. Covers error handling, queue adapter support, and a practical example.
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.
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.
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.
Leveraging JSON in PostgreSQL 17
PostgreSQL 17 finally implements the SQL/JSON standard: constructors like JSON_OBJECT and JSON_ARRAYAGG, query functions JSON_EXISTS and JSON_QUERY, and the star of the release, JSON_TABLE, which turns JSON into rows, shown on a real IoT data example.
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.
PostgreSQL indexing for newbies - Practical Guide
PostgreSQL indexing explained for beginners: how B-tree, BRIN, GIST, and GIN indexes work, reading EXPLAIN ANALYZE to see if they are used, maintenance and hit rate tips, and clear rules for when an index helps and when it just slows your writes down.
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.
Event Sourcing in practice: Lessons from the trenches
Event Sourcing can be introduced to legacy systems incrementally, no big rewrite required. Lessons from production: the migration event technique, upcasting old events, right-sizing aggregates, stream lifecycles, and payoffs in audits, analytics, and debugging.
How to create multi trait inside trait in FactoryBot
FactoryBot traits can nest other traits, letting you compose reusable test fixtures instead of copying attribute blocks. A quick refresher on traits, then the traitception pattern: defining traits inside traits and combining them for cleaner Rails test setup.
The necessity of architectural advancement
Evolutionary architecture treats change as a design input, not a threat. Why rigid paradigms fail, how to make well-informed architecture decisions, and how identifying architectural drivers and writing fitness functions keeps your system resilient.
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.
Living documentation with the P3 model: A practical guide for engineers
Living documentation stops going stale with the P3 model: define the Purpose (why you document), the Process (how it stays current), and the Product (what readers get). A practical framework for engineers tired of outdated wikis and misleading docs.
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.