Programming Tutorials
Standalone programming tutorials for solving one specific problem at a time. Each guide starts with the exact error message, failing behavior, or design constraint, gives you a minimal reproducible script or query, and walks through the fix with real output.
Pick a language below or filter by topic and difficulty when you need a quick, practical reference you can test locally and apply right away.
Add // @ts-check to the top of a file and JSDoc types to your functions, and the TypeScript checker flags wrong arguments in your editor and in CI. No build step, no .ts files.
Start with the recommended rules, fix what's automatic, turn noisy rules into warnings, and make CI fail only on new problems.
Set up name, version, exports and files in package.json, check exactly what ships with npm pack --dry-run, then publish with npm publish.
Trace a detached preview from its DOM node to an application Map, repair cleanup, and verify repeated open-and-close cycles with heap snapshots.
Record one slow click in Chrome's Performance panel, read the Bottom-up tab by self time, fix the function it points at, and record again to prove the fix worked.
Your HTML file opens blank, shows as text, or downloads instead of rendering.
Measure two boxes with the same declared width, calculate padding and border, and reproduce the 100% width overflow mistake before fixing it.
Compare text alignment, a centred block and two-axis child placement, then test why centering needs available space.
Diagnose an ID rule that defeats a reusable note modifier, then keep the ID for navigation while moving presentation to classes.
Set a shared typography base, trace inherited colours and remove a local override without restyling every paragraph.
Trace a reproducible colour and spacing conflict from the rendered result to the winning rule, then verify the repair in the source file.
Build a local form with working labels and a grouped topic choice, then inspect submitted field names without sending a message.