Stalin Pereira

Stalin Pereira

Software architect and product engineer. Writes about backend engineering, distributed systems, databases and AI. Street photographer away from the keyboard.
02
Nov
A glowing fingerprint on a dark circular scanner surface with concentric lines

Don't Let the LLM Name Your Entities

An LLM called one credit card three different names and my app created three accounts. Use model output for meaning, never for identity: key records on facts the model copies, not labels it writes.
6 min read
28
Oct
magnifying glass on white table

Design the Image the Model Sees, Not Just the Prompt

Vision models shrink what you send them. For an AI photo-culling tool, the real work was building a composite image the model can actually judge.
7 min read
26
Oct
a wall full of clocks

Offline Sync Without Lost Edits: Stale-Write Triggers and Partial Unique Indexes

Order conflicts by when the edit happened, let a Postgres trigger drop stale writes, keep balances in a ledger, and make 'only once' a partial unique index.
7 min read
21
Oct
a group of mannequins sitting next to each other

Green Tests, Broken LLM: Five Things the First Real Model Call Exposed

Mocks repeat your assumptions back to you. Five integration failures that only appeared on the first real LLM call, and the smoke test that catches them.
6 min read
19
Oct
a tower with a sunset in the background

Realtime Events Should Invalidate the Cache, Not Carry State

Let socket events say what changed and let the server say what it is now: one projection, no client drift, and a polling fallback that is the same code path.
6 min read
17
Oct
gray safety harness on focus photo

The Harness Is the New Model: Why AI Agents Live or Die by Their Scaffolding

What an AI harness is, why it suddenly matters more than which model you pick, and seven habits for getting real work out of one.
9 min read
17
Oct
cable network

The Three Gaps in a Self-Hosted Deploy

The container is green, but the deploy isn't done: the network you silently lost, the setup page anyone can claim, and the second domain that needs a redirect.
4 min read
20
Feb
Street photograph by Stalin Pereira

The README That Gets Read: Documentation Templates Every Project Needs

Providing a framework for READMEs that actually help new developers onboard quickly
2 min read
15
Feb
Street photograph by Stalin Pereira

Time Zones Will Break Your Code: A Developer's Guide to Handling Dates Correctly

Explaining UTC storage timezone conversion and the bugs that plague datetime handling
2 min read
15
Feb
Street photograph by Stalin Pereira

Logs Are Not Debugging: Structured Logging Patterns That Actually Help

Teaching log levels structured formats and context that make logs searchable and useful
2 min read