SQL is the language for talking to a relational database. This guide works through SELECT, WHERE, GROUP BY, JOIN, LEFT JOIN, subqueries, window functions, the NULL trap, parameter binding against injection, and transaction rollback on a fictional bookshop's two tables, ending with a daily revenue report. Standard-library sqlite3 only, Python 3.12.3.
VIBEFIX GUIDES
AI Coding Guides
Practical knowledge for tools, deployment, workflows, and building projects.
Python offers three concurrency models — threading, multiprocessing, and asyncio — and the wrong pick adds bugs without adding speed. Measured on a fictional bookshop order program: threads and asyncio both cut five I/O waits from 1.00 s to 0.20 s, threads match sequential code on CPU work while processes speed up, plus a shared-counter race, timeouts, and a decision table. Standard library only, Python 3.12.3.
If your vibe project feeds user input to an AI and lets it act, one sentence can talk it into leaking secrets or clicking the wrong button. Four attack patterns, three layers of defense, a high-risk list, and a 20-case test suite — with a fictional 1000→380→130→25 funnel.
Sync is just the pipe — collaborative editing is a set of rules: three permission levels, visible cursors, conflict handling that never silently loses words, offline safety, and version history, with a worked funnel.
The order page lists 24 dishes, and clicking one adds it to the order — all through event bubbling. This guide follows MDN's addEventListener, event bubbling, target, closest, matches, and stopPropagation references: bubbling vs capturing, target vs currentTarget, delegation itself, the closest() safety net, new nodes, stopping propagation, once, passive, signal, anonymous functions, this, and passing parameters with closures.
A closure is a function plus the environment it was born in. This guide follows MDN's Closures guide and the JavaScript execution model: lexical scope, var vs let/const, function factories, private variables, the scope chain, the famous var-in-a-loop trap, and the cost of creating functions for nothing.
Dates and times are easy to get wrong: the wrong time zone, a day off, or mixing naive and aware datetimes. This guide covers the datetime module from scratch — date, time, datetime, timedelta, time zones with ZoneInfo, strftime/strptime, timestamps, daylight saving time, and calendar math — with a small class schedule as its demo. Standard library only, Python 3.12.3, every output a real measured run.
Python lets you write price: float and -> float, yet passes a string and the program still runs. This guide uses a fictional bookshop inventory to explain type hints from scratch: Optional and X | Y, generics, TypedDict, Literal, Protocol, TypeVar, get_type_hints, and a hand-rolled runtime checker. Standard library only, Python 3.12.3, every output a real measured run.
A Promise is not magic: it is a way of saying what happens when a result comes back. This guide follows MDN's Using promises guide and the Promise reference: three states, the return rule for then, flat chains, async/await, the four concurrency tools, microtask timing, and a five-category failure breakdown.
Grid layout is not about guessing where things land: it is lines, tracks, and named areas. This guide follows MDN's basic concepts of grid layout and grid template areas: containers and items, fr and repeat, explicit vs implicit grids, line-based placement, named areas, gap, overlap, and subgrid, with a five-category rework breakdown.