Tutorials
Short, focused articles on one idea at a time. Filter by level or type, or search for a topic.
-
Skip links and focus management
Add skip links, move focus deliberately after actions, and avoid focus traps and lost focus.
-
Handling forms safely
Build a contact form handler in PHP that validates input, keeps the user’s answers, escapes output, and redirects after a successful POST.
-
Accessible names: labels, aria-label and aria-labelledby
How assistive technology names controls, the naming order, and fixing unlabelled icon buttons.
-
Organising code with include and require
Use include, require and their _once variants, build paths with __DIR__, share templates and configuration, and keep private files out of the web root.
-
Accessible forms: labels, instructions and errors
Labels, hints, required fields, grouped controls and error messages that everyone can find and fix.
-
Writing testable, modular JavaScript
Separate logic from the DOM, pure functions, dependency injection and small modules that are easy to test.
-
How JavaScript engines work: parsing, JIT and hidden classes
What V8 and other engines do with your code, optimisation and deoptimisation, and what that means for everyday code.
-
Symbols and well-known symbols
Unique property keys with Symbol, and customising language behaviour with Symbol.iterator and friends.
-
Map, Set, WeakMap and WeakSet
When to use Map and Set instead of objects and arrays, and what the weak versions are for.
-
Cancellation, retries and backoff
Cancel work with AbortController, add timeouts, retry with exponential backoff and avoid race conditions.
-
Regular expressions in JavaScript
Pattern syntax, flags, testing and replacing, named groups, and when a regex is the wrong tool.
-
Designing a small JavaScript library
API design, defaults and options objects, error messages, types, versioning and publishing to npm.
-
What is PHP?
PHP is a server-side language that builds web pages before they reach the browser. Learn how it works and where it fits.
-
Timers: setTimeout, setInterval and requestAnimationFrame
Schedule work, cancel timers, and animate smoothly with requestAnimationFrame.
-
Values and references: copying and mutation bugs
Why changing a copied object changes the original, comparing objects, and writing code that avoids accidental mutation.
-
Prototypes and inheritance
The prototype chain behind objects and classes, Object.create, and how property lookup works.
-
The event loop, tasks and microtasks
How the call stack, task queue and microtask queue decide run order, with exercises.
-
Installing PHP and running your first script
Get PHP 8 running on your computer, check the version, and run scripts from the terminal and PHP’s built-in web server.
-
Promise combinators: all, allSettled, race and any
Coordinate several promises, handle partial failure, and set timeouts with race.
-
PHP syntax: tags, statements, comments and echo
Learn PHP tags, statements and semicolons, comments, echo and print, and how PHP mixes with HTML.