Stalin Pereira

Stalin Pereira

Software architect and product engineer. Writes about backend engineering, distributed systems, databases and AI. Street photographer away from the keyboard.
30
Nov
Drafting table with transparent stool and wooden sawhorses

The Model Handles Meaning, OpenCV Handles Geometry

Turning a diagram image into an editable diagram by letting a vision model read it, OpenCV measure it, and an editable JSON file sit between them.
7 min read
29
Nov
A convex security mirror mounted on the corner of a brick building reflecting a street

The Version Your Dependency Bot Can't See

The server version your tests run against usually lives where dependency bots don't look. One bump script that fails on drift, plus a weekly job, keeps it current.
5 min read
29
Nov
black traffic light turned on during night time

When the Audit Fails on a PR That Didn't Change Anything

A dependency audit can go red because the advisory database changed, not your code. Check whether main fails too, fix it there once, and rebase everything else.
5 min read
25
Nov
Vintage microphone on a dark background

Making an LLM Agent Speak: One Process, Sentence Streaming, and Text for the Ear

How I gave a CLI coding agent a voice: keep one process alive, release speech a sentence at a time, rewrite text for the ear, and don't wait for a handshake that never comes.
8 min read
23
Nov
cogs and gears

Bots That Use Your Real API: A Reproducible Simulator for a Realtime App

Persona bots as state machines, a seeded RNG, a min-heap scheduler, events that only wake, and no blind retries: how to load-test a multi-user realtime app end to end.
10 min read
18
Nov
A rusted metal wrench resting on a weathered and textured stone block

Ratchets: Build Limits That Only Tighten

Floors catch a collapse, not a slow slide. Ratchets for bundle size, coverage and docs, the tree-shaking bug one caught, and the escape hatch they need.
6 min read
16
Nov
black metal ladder leaning on white wall

Testing a Reconnect Ladder: Assert the Climb, Not the End State

A client that gives up at once and one that retries forever both pass an end-state reconnect test. Here's how to test the retries themselves, and why the test went red on a Mac.
6 min read
11
Nov
Row of metal lockers with padlocks on doors

SKIP LOCKED: Claim the Next Job in One Statement, Then Test It on Real Postgres

Claiming queue work with one FOR UPDATE SKIP LOCKED statement, and why that forces your tests onto a real Postgres with cloned template databases.
6 min read
09
Nov
Old telephone switchboard with many wires

Postgres as Your socket.io Scale-Out Bus, and Why It Needs Its Own Pool

Fan out realtime events across server instances with Postgres LISTEN/NOTIFY instead of Redis, without letting the adapter break your pool sizing, your tests, or your large broadcasts.
7 min read
04
Nov
selective focus photo of brown and blue hourglass on stones

Dependencies That Hang Are Worse Than Dependencies That Fail

A queue that silently hung on a misconfigured Redis connection, a dashboard one dead host could freeze, and the fix for both: deadlines, serve-first startup and visible health.
6 min read