Tutorials
Practical tutorials for the work we actually do. Pick one, read it in order, and apply it.
Count what each strict flag costs, turn them on one at a time, park one stubborn error with ts-expect-error, and finish with strict true. After this, an old project can move to strict in steps.
Read a long assignability error from the bottom, then fix the usual causes: a wrong value, a wrong type and a literal widened to string. After this, a nested mismatch points to one property.
Install typescript-eslint on TypeScript 7, switch the rules on as warnings, count them by rule and hold the count down. After this, you can adopt type-aware linting without blocking the team for a week.
Find the cause of the column does not exist error from the five usual ones: a typo, double quotes, an alias in WHERE, a quoted name and a missing table. After this, you can fix it in a minute instead of changing the table.
Read the error, then fix it the right way: group by the column, aggregate it or move the aggregate into a subquery. After this, you know which fix keeps your numbers correct.
Run one slow query with EXPLAIN ANALYZE and read it with a five-question checklist: rows touched, filtered rows, estimates, loops and sort spills. After this, you can find the slow node of a plan and check your fix.
Turn on pg_stat_statements in a Docker container and list the statements that cost the most in total. After this, you know which query to tune first, and you do not have to guess.
Reproduce a deadlock between two money transfers, read the message, and fix it by locking rows in the same order. After this, you can turn a deadlock detected error into a plain wait.
Check virtualization, WSL, the docker-desktop distribution, the engine context and memory in the order that finds the cause fastest. After this, you can get a stuck Docker Desktop running without resetting it.
Find a stopped container, read its exit code and log, and tell a crash from a kill. After this, you can see why a container stopped in under a minute.
Add a pg_isready health check to a database and make the app wait for it with service_healthy. After this, you can stop an app from failing on a database that is still starting.
Break an app on purpose and compare three health checks, then put the one that works in the Dockerfile. After this, unhealthy means the app is broken, not the check.