Insights / Topic
Engineering
Modernization, architecture decisions and the craft of shipping software.
Engineering · Illustrative scenario
Postgres NULL uniqueness: define the missing-key rule
Choose whether an absent locale is an unknown draft or the one tenant default, then carry that meaning through duplicate resolution, unique enforcement and upsert behavior.
Engineering · Illustrative scenario
Promise.all failures: stop admission, then drain work
Separate the first failed result from admission, cooperative cancellation and final settlement; preserve input-indexed outcomes and wait before releasing shared resources.
Engineering · Illustrative scenario
Python loop callbacks: bind values, choose snapshots
Fix loop-name binding, then separately test mutable-object aliasing and callback argument shape; an early-bound object is not a historical snapshot.
Engineering · Illustrative scenario
Postgres JSONB indexes: test the rewrite’s meaning
Making a predicate index-compatible can change its answer. Compare typed fixtures before choosing a JSONB access path.
Engineering · Illustrative scenario
Python Requests timeout: bound the worker lifetime
Socket inactivity and worker ownership are different limits. Give a read-only import a process boundary and let the parent accept the result.
Engineering · Illustrative scenario
Postgres NOT IN with NULL: choose the missing-row rule
An empty export can hide a choice about missing data. Make nulls, tenant boundaries and the expected account set explicit before changing the query.
Engineering · Illustrative scenario
Python duplicate logs: trace handler ownership
The same console line can come from one record taking several paths. Trace those paths before changing propagation or deleting handlers.
Engineering · Illustrative scenario
Postgres keyset cursors: preserve timestamp precision
Preserve the exact database sort tuple in the cursor, separate display formatting from continuation, and test microseconds as well as ties.
Engineering · Illustrative scenario
Postgres ALTER TABLE: limit the lock queue
A waiting schema change can block later readers. Reconstruct the queue, scope the timeouts and keep the migration transaction short.
Engineering · Illustrative scenario
Node.js stream backpressure: bound the whole export
A stopped export consumer should stop its source. Build a pull-driven pipeline, cap record size and test the failure boundary.
Engineering · Illustrative scenario
asyncio timeout: your thread may still be running
A request deadline can expire while a blocking SDK still occupies its thread. Keep admission tied to executor completion, then test the cancellation path.
Engineering · Illustrative scenario
Postgres too many clients: budget the whole fleet
A worked deployment review: count process-owned pools, preserve operational reserves and reject unsafe rollout or failover commitments before Postgres runs out of slots.