Backend & databases
Design dependable APIs, protect account data, and diagnose database queries, transactions, and migrations.
Showing 1–12 of 20 articles

Use synthetic data to test AI generated database changes
Build deterministic synthetic fixtures around invariants, legacy shapes, races, and privacy boundaries so AI-generated database changes can fail meaningfully.

Avoid exposing private fields through populated database records
Trace selected and populated fields through public serialization, use explicit response views, and test records that contain private extras and missing relations.

Debug date grouping that changes across server timezones
Store instants separately from calendar dates, choose an IANA business timezone, and group with explicit boundaries that survive server moves and daylight shifts.

Decide when several database writes need a transaction
Identify the invariant shared by multiple writes, compare single-document modeling, and test rollback without including external side effects in a retryable transaction.

Normalize account email addresses without merging users accidentally
Define email identity policy, preview normalization collisions, and protect login uniqueness without silently combining distinct accounts or provider-specific aliases.

Design a migration that can be checked before it writes
Preview migration candidates, enforce write-time preconditions, process bounded batches, and verify invariants so a dry run predicts a reviewable change.

Fix a cached database connection that never recovers
Reset failed connection initialization without discarding healthy pooled clients, distinguish query errors from connection setup, and test recovery in one process.

Design deletion behavior without leaving invisible orphan records
Choose deletion semantics for each relationship, prevent new dependents during cleanup, and verify retained history and removed private data separately.

Choose an index from a slow query rather than a guess
Choose a candidate index from the real filter, sort, projection, and explain plan, then compare examined work and write costs in a controlled dataset.

Find an N plus one query before optimizing the wrong layer
Count storage operations across a complete request, distinguish ORM population from per-row reads, and batch only the relationships the response needs.

Use AI to audit an API without leaking credentials or private data
Create a synthetic API evidence bundle, redact secrets without erasing the bug, and bound AI review tools to the exact contract being audited.

Handle third party API failure without misleading the user
Represent local persistence and remote delivery as separate states, handle timeouts as uncertain outcomes, and give retries a durable operation identity.
Explore topics
Subscribe to Newsletter
Get the latest articles and updates delivered to your inbox.