Pages

Topics

Tools

↑↓navigate↵openescclose

All syntax guides

Short, practical guides on programming syntax, language fundamentals, and the tools developers reach for every day.

3,965 guides across 14 topics

Topics

Latest guides

3D illustration of two container boxes side by side, one with a compact musl gear and a broken wheel, the other with a larger glibc gear and a DNS path
Docker

Alpine musl vs Debian slim: DNS Timeouts and Native Builds

musl rejects manylinux wheels and linux-x64-gnu prebuilds, so the installer starts compiling without a toolchain. And ndots:5 in Kubernetes adds five seconds per lookup.

DockerAlpinemuslDNS
3D illustration of a migration gate holding an exclusive lock while a queue of query blocks piles up behind it, a clock node ticking
SQL

Zero-Downtime Postgres Migrations: lock_timeout and NOT VALID

One ALTER TABLE waiting behind a slow SELECT blocks every query that arrives after it. The timeout-retry loop, NOT VALID constraints and CONCURRENTLY index rules.

PostgreSQLMigrationsLocksOperations
3D illustration of a pooler valve switching one server cylinder between several client cubes, with lost setting tokens floating away
SQL

PgBouncer Transaction vs Session Pooling: What Breaks

Port 6543 hands out a server connection per transaction, so prepared statements, SET, LISTEN and cursors stop behaving. Driver-level settings for each stack.

PostgreSQLPgBouncerSupabasePerformance
3D illustration of a browser window cube separated from an API cube by a blocked gate, a wildcard star token rejected at the gate
Python

FastAPI CORS: Blocked Preflight and Credentials Wildcard

A wildcard origin with credentials is invalid and the browser enforces it; a 500 skips the CORS middleware entirely. Both look like CORS and neither is.

PythonFastAPICORSBrowser
3D illustration of a connection pool rotating a server socket while a client cache of statement plates collides with a red error node
Python

asyncpg DuplicatePreparedStatement on PgBouncer and Supabase

asyncpg caches prepared statements per connection while a transaction pooler rotates connections underneath it. The cache setting, pool sizing and retry that fix it.

PythonasyncpgPostgreSQLSupabase
3D illustration of a schema cube with a runtime shield overlapping a hollow type-only wireframe cube, error issue tags floating off
TypeScript

Zod infer vs TypeScript Interfaces: Runtime Validation Gaps

An interface validates nothing, z.infer is the output type and not the input, and Zod 4 renamed the error helpers. What each one actually guarantees.

TypeScriptZodValidationAPI
3D illustration of two decorator plate stacks feeding a class cube, one with a metadata tag and one without, an error badge between
TypeScript

TypeScript Decorators: Standard vs experimentalDecorators

TS1240 appears when a legacy decorator meets the stage 3 transform, and the reverse breaks NestJS DI. How the two signatures differ and which flag each stack needs.

TypeScriptDecoratorsNestJSAngular
3D illustration of a React atom cube with a ref plug becoming a plain socket and a cleanup thread unspooling from it
React

React 19 Ref Cleanup Functions and forwardRef Deprecation

ref is a normal prop now and a ref callback may return a cleanup function, which breaks every implicit-return callback. Migration steps and the leak it fixes.

ReactRefsMigrationTypeScript
3D illustration of a form panel with a redirect arrow looping back into itself and a size gauge tipping past a limit marker
Next.js

Next.js Server Actions: Swallowed Redirects and Body Limits

redirect() throws, so a try/catch swallows the navigation; the action body parser has a 1 MB limit; and useActionState cannot hold an Error. Fixes for all three.

Next.jsServer ActionsFormsDebugging
3D illustration of a cookie jar and an auth token slab being split between a server cube and a browser cube, a locked padlock between them
Next.js

Supabase SSR on Next.js: Stale Sessions and Lock Timeouts

The session flips between signed-in and signed-out because the refreshed token is written to a cookie store that no longer exists. Adapter, proxy and lock fixes.

Next.jsSupabaseAuthenticationCookies