Skip to content

Sync

Easy — everyone uses thisGeneral Dev

ELI5 — The Vibe Check

Sync means one thing at a time, in order. You order food, stare at the kitchen wall, and only get to sit down when the food arrives. Simple and predictable, but you're stuck waiting for each thing to finish before moving on.

Real Talk

Synchronous code executes sequentially — each operation blocks until it completes before the next one starts. Simple and easy to reason about, but it can freeze the entire program while waiting for slow operations like file reads or network calls.

Show Me The Code

// Synchronous — blocks until file is read
const fs = require("fs");
const data = fs.readFileSync("file.txt", "utf-8");
console.log(data); // only runs after file is fully read

When You'll Hear This

"That's a sync call — it'll block the event loop." / "Use async operations for I/O — sync only makes sense for startup config loading."

Made with passive-aggressive love by manoga.digital. Powered by Claude.