Blog
Programming, software engineering and computer science, explained from the ground up. Each article starts free to read; the rest needs a free account.
- 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.
- Databases5 min read
The N+1 query problem
What the N+1 query problem is and how to fix it in any stack: how ORMs and lazy loading cause it, spotting it in logs and tests, fixes with joins, fetch joins and entity graphs in JPA, select_related and prefetch_related in Django, eager loading in Prisma and Rails-style ORMs, batching with IN queries and DataLoader, and preventing regressions.
- Networking6 min read
The OSI model
The seven layers of the OSI model explained with what happens when you open a web page: physical, data link, network, transport, session, presentation and application, the simpler TCP/IP model, encapsulation, which devices and protocols live at each layer, and using the layers to troubleshoot.
- Security6 min read
The OWASP Top 10
A developer's tour of the OWASP Top 10 web application security risks: broken access control, cryptographic failures, injection, insecure design, misconfiguration, vulnerable components, authentication failures, integrity failures, logging gaps and SSRF, with an example and the key defences for each.
- Careers5 min read
The system design interview
What interviewers look for in a system design round, a step-by-step framework for the 45 minutes, back-of-the-envelope estimation, the building blocks to know, a worked outline for a URL shortener, and common mistakes.
- Programming6 min read
Threads explained
What a thread is and how to use threads safely: threads versus processes, creating threads in Java and Python, thread pools, shared memory and race conditions, locks, atomic variables and thread-safe collections, deadlocks, and Java's virtual threads.
- Databases5 min read
Transactions and ACID
What a database transaction is and the four ACID guarantees behind it: atomicity, consistency, isolation and durability, explained with a money transfer, plus commit and rollback in SQL and code, and the mistakes that leave data half-changed.
- Security5 min read
Two-factor authentication and TOTP
How the six-digit codes in authenticator apps work: the shared secret behind the QR code, HMAC and the 30-second clock, a working TOTP implementation, verifying codes safely, backup codes, and how TOTP compares with SMS and passkeys.
- 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.
- Programming6 min read
Unit testing
What makes a good unit test and how to write them in any language: what a unit is, the arrange-act-assert structure, examples in Python with pytest and JavaScript with Vitest, test doubles (stubs, mocks and fakes), testing edge cases, designing code that is easy to test, the testing pyramid, coverage, and the habits that keep tests fast and trustworthy.
- 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.
- Java and Spring6 min read
Virtual threads
Java's virtual threads in depth: why platform threads limit servers, how virtual threads mount and unmount on carrier threads, creating them, what they speed up and what they do not, pinning and how Java 24 reduced it, ThreadLocal and pooling pitfalls, limiting concurrency, and using them in Spring Boot.
- Networking4 min read
WebSockets explained
How WebSockets give browsers a two-way, always-open connection to a server: the HTTP upgrade handshake, frames, a working chat example in JavaScript and Python, heartbeats and reconnection, scaling across servers, security, and when server-sent events or polling are simpler.
- DevOps5 min read
Writing a good Dockerfile
Turn a slow, bloated Dockerfile into a small, fast, secure one: choosing a base image, ordering layers for the cache, .dockerignore, multi-stage builds, running as a non-root user, keeping secrets out, and health checks.
- Security5 min read
XSS explained
How cross-site scripting works and how to prevent it: stored, reflected and DOM-based XSS with examples, what an attacker can do with a script on your page, context-aware output encoding, the safe defaults of modern frameworks and their escape hatches, sanitising HTML, Content Security Policy, and HttpOnly cookies.
- Setup guides4 min read
Install Java (JDK) on Windows
Install the Java Development Kit on Windows 10 or 11 the reliable way, set JAVA_HOME and PATH, check it works, and fix the problems people hit most.
- Databases6 min read
Redis from the ground up
What Redis is, why keeping data in memory makes it so fast, the data structures it offers, how it survives a restart, and the jobs it is actually good at.
- Security6 min read
OAuth 2.0 and "Sign in with Google", step by step
What happens between clicking "Sign in with Google" and landing back on the site signed in: the authorization code flow, PKCE, state, the ID token, and the mistakes that let someone else's login become yours.
- Security7 min read
JWT from the ground up
What is actually inside a JSON Web Token, how the signature makes it trustworthy, why you cannot take one back, and the mistakes that turn a token into a skeleton key.
- DevOps8 min read
Docker from A to Z
Images, containers, layers, volumes, networks and Compose, built up from one small program, with the Dockerfile habits that keep images small, builds fast and secrets out of the layers.