DEV Community

Gabriel Anhaia profile picture

Gabriel Anhaia

Senior Software Engineer @ Monta · 10+ years in backend, distributed systems & AI agents · Creator of Hermes IDE (AI-native terminal) & Neural Playground · Author of 2 books · Open-source enthusiast

Location Berlin, Germany Joined Joined on  Personal website https://xgabriel.com github website

Work

Software Engineer and Book Author

Top 7
Writing Debut
Five Year Club
Four Year Club
Three Year Club
Two Year Club
One Year Club
Your Startup's First Observability Stack: Logs, Metrics, Traces on a Budget

Your Startup's First Observability Stack: Logs, Metrics, Traces on a Budget

Comments
6 min read
Redacting PII in LLM Traces Without Losing Debuggability

Redacting PII in LLM Traces Without Losing Debuggability

Comments
6 min read
Design a News Feed: Fan-Out, Ranking, and the Celebrity Problem

Design a News Feed: Fan-Out, Ranking, and the Celebrity Problem

Comments
8 min read
Design a Distributed Lock Service: Fencing Tokens and the Failure Modes

Design a Distributed Lock Service: Fencing Tokens and the Failure Modes

Comments
9 min read
Postgres Partitioning in 2026: When the Complexity Pays Off

Postgres Partitioning in 2026: When the Complexity Pays Off

Comments
7 min read
Covering Indexes and Index-Only Scans: The Read Win You Are Missing

Covering Indexes and Index-Only Scans: The Read Win You Are Missing

Comments
6 min read
Connection Pool Sizing in 2026: The Formula and the Footguns

Connection Pool Sizing in 2026: The Formula and the Footguns

Comments
7 min read
Event Ordering and Partition Keys: The Guarantee You Think You Have

Event Ordering and Partition Keys: The Guarantee You Think You Have

Comments
6 min read
Dead-Letter Replay: Doing It Without Double-Processing

Dead-Letter Replay: Doing It Without Double-Processing

Comments
7 min read
The Idempotent Consumer: Dedup Stores That Actually Scale

The Idempotent Consumer: Dedup Stores That Actually Scale

Comments
7 min read
Temperature vs top-p: Which Knob to Turn and When

Temperature vs top-p: Which Knob to Turn and When

Comments
6 min read
Delimiters as Defense: Structuring Prompts Against Injection

Delimiters as Defense: Structuring Prompts Against Injection

Comments
5 min read
Few-Shot or Fine-Tune in 2026: The Decision Most Teams Get Backwards

Few-Shot or Fine-Tune in 2026: The Decision Most Teams Get Backwards

Comments
6 min read
Online vs Offline Evals: Where Each One Catches the Bug

Online vs Offline Evals: Where Each One Catches the Bug

Comments
6 min read
An LLM Error Taxonomy: Classifying Failures in Your Traces

An LLM Error Taxonomy: Classifying Failures in Your Traces

Comments
6 min read
TTFT vs Total Latency: Instrumenting What Users Actually Feel

TTFT vs Total Latency: Instrumenting What Users Actually Feel

Comments
6 min read
Context Compression Before the LLM: Cutting Tokens Without Cutting Recall

Context Compression Before the LLM: Cutting Tokens Without Cutting Recall

Comments
6 min read
BM25 + Dense Fusion: When Keyword Search Saves Your RAG

BM25 + Dense Fusion: When Keyword Search Saves Your RAG

Comments
7 min read
Query Rewriting Before Retrieval: The Cheap Recall Win Most Skip

Query Rewriting Before Retrieval: The Cheap Recall Win Most Skip

Comments
7 min read
Human-in-the-Loop Approval Gates: Where to Pause an Autonomous Agent

Human-in-the-Loop Approval Gates: Where to Pause an Autonomous Agent

Comments
6 min read
Context-Window Eviction: What to Drop When the Agent Fills Up

Context-Window Eviction: What to Drop When the Agent Fills Up

Comments
6 min read
ReAct vs Plan-and-Execute: Picking an Agent Loop in 2026

ReAct vs Plan-and-Execute: Picking an Agent Loop in 2026

Comments
6 min read
Idempotent Tool Calls: The Retry Safety Net Agents Forget

Idempotent Tool Calls: The Retry Safety Net Agents Forget

Comments
7 min read
PHP Arrays to TypeScript: When It Is a Record, a Tuple, or a Real Type

PHP Arrays to TypeScript: When It Is a Record, a Tuple, or a Real Type

Comments
6 min read
Java Generics to TypeScript: extends, super, and the in/out Keywords

Java Generics to TypeScript: extends, super, and the in/out Keywords

Comments
7 min read
Module Resolution in 2026: bundler, node16, and Why Your Imports Break

Module Resolution in 2026: bundler, node16, and Why Your Imports Break

Comments
7 min read
const Type Parameters: Preserving Literal Inference in Generic Functions

const Type Parameters: Preserving Literal Inference in Generic Functions

Comments
6 min read
Runtime Validation in TypeScript: Where Zod Ends and the Type System Begins

Runtime Validation in TypeScript: Where Zod Ends and the Type System Begins

Comments
6 min read
Pick, Omit, Record: The Utility Types You Should Reach For First

Pick, Omit, Record: The Utility Types You Should Reach For First

Comments
6 min read
Value Objects in Go: Making Invalid Domain State Unrepresentable

Value Objects in Go: Making Invalid Domain State Unrepresentable

Comments
6 min read
Thin Application Services in Go: Orchestration Without Business Logic

Thin Application Services in Go: Orchestration Without Business Logic

Comments
6 min read
select With Timeouts: 3 Channel Patterns That Prevent Goroutine Leaks

select With Timeouts: 3 Channel Patterns That Prevent Goroutine Leaks

Comments
8 min read
Struct Embedding in Go: Composition That Bites When You Reach for Inheritance

Struct Embedding in Go: Composition That Bites When You Reach for Inheritance

Comments
6 min read
%w and the Error Chain: Wrapping Without Losing the Cause in Go

%w and the Error Chain: Wrapping Without Losing the Cause in Go

Comments
6 min read
defer in Loops: The Resource Leak Go Still Lets You Write

defer in Loops: The Resource Leak Go Still Lets You Write

Comments
6 min read
Query Objects in PHP: Rich Filtering Without Leaking SQL Into the Domain

Query Objects in PHP: Rich Filtering Without Leaking SQL Into the Domain

Comments
7 min read
A Domain Logger Port: Decoupling From PSR-3 Without Losing Context

A Domain Logger Port: Decoupling From PSR-3 Without Losing Context

Comments
7 min read
Retries and Circuit Breakers Belong in the Adapter, Not Your Use Case

Retries and Circuit Breakers Belong in the Adapter, Not Your Use Case

Comments
6 min read
Persisting One Aggregate Across Multiple Tables, ORM-Agnostic

Persisting One Aggregate Across Multiple Tables, ORM-Agnostic

Comments
7 min read
Feature Flags Without Coupling: A Flag Port for the PHP Domain

Feature Flags Without Coupling: A Flag Port for the PHP Domain

Comments
6 min read
Modeling Money in PHP: Your Own Value Object vs brick/money Behind a Port

Modeling Money in PHP: Your Own Value Object vs brick/money Behind a Port

Comments 1
7 min read
Hand-Rolled Mappers vs AutoMapper: Keeping the PHP Domain Pure at the Boundary

Hand-Rolled Mappers vs AutoMapper: Keeping the PHP Domain Pure at the Boundary

Comments
6 min read
Read Models Without a Second Database: CQRS-Lite Projections in PHP

Read Models Without a Second Database: CQRS-Lite Projections in PHP

Comments
7 min read
A Domain Exception Hierarchy in PHP That Maps Cleanly to HTTP

A Domain Exception Hierarchy in PHP That Maps Cleanly to HTTP

Comments
6 min read
Contract Tests in PHP: Proving Every Adapter Honors Its Port

Contract Tests in PHP: Proving Every Adapter Honors Its Port

Comments
6 min read
Input and Output DTOs: Drawing the Application Boundary in PHP

Input and Output DTOs: Drawing the Application Boundary in PHP

Comments
7 min read
Cache as a Decorator: Wrap the Repository, Not the Domain

Cache as a Decorator: Wrap the Repository, Not the Domain

Comments
7 min read
Translate Infrastructure Errors at the Adapter, Not in Your Domain

Translate Infrastructure Errors at the Adapter, Not in Your Domain

Comments
6 min read
The Composition Root: Where PHP Dependency Wiring Actually Belongs

The Composition Root: Where PHP Dependency Wiring Actually Belongs

Comments
6 min read
Time Is a Dependency: Injecting a Clock Into Your PHP Domain

Time Is a Dependency: Injecting a Clock Into Your PHP Domain

Comments
6 min read
When Not to Reach for Microservices: A Startup's First 18 Months

When Not to Reach for Microservices: A Startup's First 18 Months

Comments 1
6 min read
Ship It With a Boring Stack: The 2026 Startup Default That Actually Works

Ship It With a Boring Stack: The 2026 Startup Default That Actually Works

Comments
6 min read
Trace Sampling for LLM Apps: Keep the Spans That Matter, Drop the Rest

Trace Sampling for LLM Apps: Keep the Spans That Matter, Drop the Rest

Comments
6 min read
The Cost-Quality-Latency Triangle: Instrumenting the LLM Trade-Off

The Cost-Quality-Latency Triangle: Instrumenting the LLM Trade-Off

Comments
6 min read
Design a Notification Fan-Out Service: Push, Email, SMS at Scale

Design a Notification Fan-Out Service: Push, Email, SMS at Scale

Comments
8 min read
Design a Rate Limiter: 4 Algorithms, 4 Trade-Offs

Design a Rate Limiter: 4 Algorithms, 4 Trade-Offs

Comments
8 min read
Design a URL Shortener: The Constraints Interviewers Actually Probe

Design a URL Shortener: The Constraints Interviewers Actually Probe

Comments
9 min read
UUIDv7 vs BIGINT Primary Keys: The 2026 Verdict

UUIDv7 vs BIGINT Primary Keys: The 2026 Verdict

Comments
7 min read
Soft Delete vs Archive Table: The Choice That Haunts Your Queries

Soft Delete vs Archive Table: The Choice That Haunts Your Queries

Comments
6 min read
Picking a Data Store in 2026: 5 Questions Before You Reach for Postgres

Picking a Data Store in 2026: 5 Questions Before You Reach for Postgres

Comments
7 min read
loading...