
Using Middleware in Next.js for Route Protection
Middleware in Next.js provides a straightforward way to protect routes and manage user authentication. Here, I show how to implement effective route protection.
Articles
JavaScript is probably one of the most‑used programming languages in the world, and a cornerstone of front‑end (and more general) web development. It enables the development of interactivity and features that HTML and CSS alone simply cannot, and includes more advanced concepts like closures, callbacks, and asynchronous programming.
Below you will find a subset of articles from my blog specifically about JavaScript. This is an area that I have worked with for many years, and have managed to write about quite a few times. There are three hundred collected together for you below.

Middleware in Next.js provides a straightforward way to protect routes and manage user authentication. Here, I show how to implement effective route protection.

Template‑driven vs. reactive Angular forms, and how to choose the right model for validation, scale, testing, and maintainable form logic in real apps.

Converting between camel case, snake case, kebab case is a common task in JavaScript. Here, I explore methods using regular expressions and string manipulation.

How to solve Trapping Rain Water with the two‑pointer approach, and the simple invariant that makes the O(n) solution click under interview pressure.

How lazy loading in Angular improves performance, where route‑level splitting helps most, and how to avoid messy boundaries and loading states in larger apps.

Temporal Dates and Times APIA practical look at JavaScript Temporal, why Date is awkward, and how clearer date, time, time zone, duration, and parsing APIs improve modern code.

Next.js vs. Remix compared properly, across routing, data loading, mutations, caching, and the architectural trade‑offs teams actually feel in production.

Unravel the art of finding the Longest Common Prefix in strings using TypeScript. Dive deep into Horizontal & Vertical Scanning methods with code insights.

Solve Merge Intervals in TypeScript by sorting ranges, merging overlaps, handling touching intervals, preserving inputs, and avoiding common mistakes.

Angular signals explained properly, from computed values and effects to where they simplify state, templates, and change detection without replacing RxJS.

How Vue Suspense handles async components and loading states, where it helps, where it falls short, and what still needs extra care in production.

A technical discussion about the key differences between declarative and imperative programming, focusing on development with JavaScript, ES6, and React.

How to solve Product of Array Except Self without division, using prefix and suffix products to keep the logic linear and interview‑safe in TypeScript.

Currying transforms functions into a sequence of single‑argument calls. An exploration into implementation, benefits, and comparison to partial application.

nth Node from the End of a ListHow to remove the Nth node from the end of a linked list in TypeScript. Here we break down and explore a simple double‑pass and an efficient single‑pass method.

How to build custom directives in Angular when DOM behaviour belongs outside a component, and how to keep selectors and scope readable in larger templates.

Distinguishing two approaches to detect palindrome numbers: the intuitive string method vs. the optimised mathematical technique, highlighting their merits.

Caching strategies for data fetching in Next.js, including force‑cache, revalidation, stale data trade‑offs, and the debugging traps teams hit in production.