
Understanding Tail Call Optimisation in JavaScript
Tail call optimisation in JavaScript, why it matters conceptually, and why patchy engine support still makes it unreliable for production recursion.
Articles from more than two decades of building, rebuilding, debugging and leading web projects.

Tail call optimisation in JavaScript, why it matters conceptually, and why patchy engine support still makes it unreliable for production recursion.

WeakMap and WeakSet in JavaScriptUnderstand WeakMap and WeakSet in JavaScript, including weak references, metadata storage, private data patterns, memory behaviour, and Map or Set differences.

JavaScript Symbols explained in plain English, including unique keys, well‑known symbols, hidden metadata, and the cases where they are genuinely useful.

React's virtual DOM optimises performance by reducing updates to the real DOM. Here, I explain how it works, how it compares, and why it improves efficiency.

Managing routes in large Vue applications can become challenging. Here, I share practical best practices for structuring Vue Router to keep apps organised.

Garbage collection in JavaScript frees up unused memory automatically. Here, I explain how it works and how to prevent memory leaks in your applications.

How to implement server‑side rendering in Vue, with a clearer mental model for hydration, data loading, caching, and where SSR actually pays off.

Solve Daily Temperatures with a monotonic stack in TypeScript, storing indices to find the next warmer day without repeated scanning and common mistakes.

Dive into solving the 'Generate Parentheses' problem using TypeScript. This guide covers the backtracking solution and explains each step in detail.

Implement a Trie prefix tree in TypeScript with Map‑based nodes, insert, search, startsWith, shared prefixes, complexity, and alternative child storage.

How to build efficient recursive functions in JavaScript, with better base cases, less repeated work, and a clearer sense of when recursion fits naturally.

Execution context defines how JavaScript code runs, from global scope to function calls. Here, I explore how it works in browsers, React, Next.js, and Node.js.

useMemo and useCallbackOptimise React performance with useMemo and useCallback only where profiling shows expensive calculations, unstable functions, or avoidable re‑renders.

Solve Binary Tree Zigzag Level Order Traversal with breadth‑first search, level sizing, alternating output order, and TypeScript implementation details.


How ISR improves Next.js performance by mixing static speed with controlled freshness, and where it fits best over fully dynamic rendering for changing content.

Reversing an array in JavaScript can be done with `.reverse()`, but it mutates the original array. Here, I explore immutable methods and older techniques.

Memory leaks in React can cause sluggish performance and excessive memory usage. Here, I explore common causes, how to prevent them, and debugging techniques.

How to create custom Vue directives for DOM‑level behaviour, without reaching for them when a component, prop, or composable would do better in real interfaces.

Solve Binary Tree Level Order Traversal with breadth‑first search in TypeScript, using a queue, level sizing, edge cases, and cleaner iteration well.

Solve Subarray Sum Equals K with prefix sums and a hash map in TypeScript, including negative numbers, count storage, and why sliding window fails.