Python and JavaScript
- Python and JavaScript4 min read
asyncio explained
Python's asyncio from the ground up: coroutines, async and await, the event loop, running tasks concurrently with gather and TaskGroup, timeouts, limiting concurrency with semaphores, async HTTP, and the blocking-call mistake that freezes everything.
- Python and JavaScript5 min read
Flask vs Django vs FastAPI
Python's three most popular web frameworks compared with the same small API in each: Django's batteries-included approach, Flask's minimalism, FastAPI's type-driven validation and async support, performance, learning curve, and how to choose for your project.
- Python and JavaScript5 min read
JSON explained
Everything a developer needs to know about JSON: the syntax and its six types, common mistakes, parsing and generating JSON in JavaScript, Python and Java, dates, big numbers and other pitfalls, JSON Schema for validation, JSON Lines, querying with jq, and JSON compared with XML and YAML.
- Python and JavaScript5 min read
Lists vs tuples vs sets
Python's three everyday collections compared: ordered and mutable lists, fixed tuples that can be dictionary keys, and sets for fast membership and deduplication, with their performance, common operations, gotchas and a quick guide to choosing.
- Python and JavaScript5 min read
Node.js for beginners
Get started with Node.js: what it is and how it differs from browser JavaScript, running scripts, modules with import and export, the built-in fs, path and http modules, npm packages, building a small JSON API with Express, environment variables, error handling, and running it in production.
- Python and JavaScript5 min read
npm explained
How npm, the Node.js package manager, works: package.json and scripts, installing dependencies and devDependencies, semantic versioning and version ranges, package-lock.json and npm ci, node_modules, npx, updating and auditing, workspaces, publishing, and alternatives like pnpm and Yarn.
- Python and JavaScript4 min read
pip and packages
How Python packages work: PyPI, installing with pip and python -m pip, version specifiers, requirements files, upgrading and uninstalling, why system Python refuses installs, and keeping dependencies safe and reproducible.
- Python and JavaScript5 min read
Promises explained
JavaScript promises from the ground up: the three states, creating and consuming promises, chaining with then, error handling with catch and finally, Promise.all, allSettled, race and any, converting callbacks, async and await on top, and the common mistakes.
- Python and JavaScript4 min read
Python decorators
How the @ syntax wraps a function: functions as values, writing a decorator step by step, functools.wraps, decorators with arguments, timing, logging, retries and caching, class decorators, and the decorators you already use.
- Python and JavaScript4 min read
Python generators
How yield turns a function into a lazy sequence: generator functions and expressions, how they save memory on large data, iterators and next(), pipelines of generators, infinite sequences, yield from, and the one-pass catch.
- Python and JavaScript4 min read
Python virtual environments
Why every Python project needs its own environment, creating and activating one with venv on Windows, macOS and Linux, installing packages, recording them in requirements.txt, and how uv and Poetry fit in.
- Python and JavaScript5 min read
React for beginners
Learn React from the ground up: creating a project with Vite, components and JSX, props, state with useState, events, rendering lists with keys, conditional rendering, forms, side effects and data fetching with useEffect, lifting state up, and where to go next with routing and frameworks.
- Python and JavaScript4 min read
The JavaScript event loop
How JavaScript runs asynchronous code on a single thread: the call stack, web APIs, the task queue and the microtask queue, why promises run before setTimeout, a step-by-step trace of a classic output puzzle, async and await, rendering, and blocking the loop in browsers and Node.js.
- Python and JavaScript6 min read
TypeScript for beginners
Learn TypeScript from a JavaScript background: why types help, installing and running it, basic types, inference, interfaces and type aliases, unions and narrowing, functions, generics, typing API data, strict mode and tsconfig, and how to adopt TypeScript gradually.
- Python and JavaScript5 min read
var, let and const
The three ways to declare variables in JavaScript compared: function scope versus block scope, hoisting and the temporal dead zone, redeclaration, the classic loop and closure bug, what const really prevents, freezing objects, and the simple rule most teams follow.