Lessons

Every lesson, free to read

70 lessons and 14 system design concepts, written to explain why code behaves the way it does. Read them here; practise each one in the app, with 470 exercises checked by real tests.

JavaScript 12

The language under every frontend and Node service: values and coercion, scope and closures, this, prototypes and classes, arrays and objects, async code and the event loop. Exercises are plain modern JavaScript, run in strict mode with the same tests as the TypeScript track.

  1. 01

    Values, Types and Coercion

    The eight kinds of value JavaScript has, how typeof, ===, == and Object.is see them, the conversion rules behind the famous surprises, and how numbers, NaN, -0, BigInt and strings really behave.

    Lesson14 min readVideo8 exercises
  2. 02

    Scope, Hoisting and Strict Mode

    Where a name is visible (block, function, module and global scope), when it exists (hoisting and the temporal dead zone), why var in a loop breaks callbacks, what const really protects, and what strict mode changes.

    Lesson12 min readVideo7 exercises
  3. 03

    Functions and Closures

    Functions are values you can pass, return and store, and every function remembers the variables around it; that one idea gives you private state, factories, once, memoize, curry and pipe.

    Lesson12 min readVideo7 exercises
  4. 04

    How this Works

    In JavaScript, this is decided by how a function is called, not where it's written; four rules plus arrow functions explain every case, including the lost-this bugs in callbacks and class methods.

    Lesson11 min readVideo7 exercises
  5. 05

    Objects and Prototypes

    What a JavaScript object really is (a set of properties plus a link to another object), how lookups walk the prototype chain, and how to copy, freeze, compare and serialize objects without surprises.

    Lesson14 min readVideo8 exercises
  6. 06

    Classes

    How class syntax builds constructor functions and prototypes for you, and how to use fields, private members, static members, getters, extends and super well, plus when composition or a mixin beats inheritance.

    Lesson11 min readVideo8 exercises
  7. 07

    Arrays

    Creating arrays, the methods that change an array versus the ones that return a new one, map, filter and reduce, sorting with comparators, grouping, and the performance traps that turn a fast loop into a slow one.

    Lesson13 min readVideo8 exercises
  8. 08

    Modern Syntax: Destructuring, Spread and Friends

    The syntax every modern codebase is written in (destructuring, spread and rest, optional chaining, nullish coalescing, logical assignment, template literals and tagged templates, shorthand and computed properties) plus how modules work.

    Lesson13 min readVideo7 exercises
  9. 09

    Iterators, Generators, Map and Set

    The iteration protocol behind for...of and spread, generator functions for lazy and infinite sequences, Map and Set as the right tools for lookups and uniqueness, WeakMap and WeakSet for data attached to objects, and a first look at async iteration.

    Lesson16 min readVideo8 exercises
  10. 10

    Errors and Error Handling

    How throw, try/catch/finally and Error objects really work in JavaScript, how to design error classes with causes, how to handle values you can't trust, and when to return a result object instead of throwing.

    Lesson14 min readVideo8 exercises
  11. 11

    Promises and async/await

    How JavaScript handles work that finishes later, from callbacks to promises to async/await, plus chaining, error handling, running things in sequence or in parallel, timeouts, retries and the mistakes everyone makes once.

    Lesson16 min readVideo8 exercises
  12. 12

    The Event Loop

    How JavaScript runs one piece of code at a time on one thread, and still handles timers, promises, clicks and network responses, plus why order surprises people, how await splits a function, and how to keep long work from freezing the page.

    Lesson13 min readVideo7 exercises

TypeScript 12

From narrowing and generics to type-level programming, data structures, async and RxJS. Every exercise is checked by the real TypeScript compiler plus runtime tests.

  1. 01

    Types & Narrowing

    unknown vs any, literal types, as const, satisfies, type guards, assertion functions and control-flow analysis.

    Lesson6 min readVideo7 exercises
  2. 02

    Generics

    Type parameters, constraints, keyof and T[K], inference, const type parameters and generic higher-order functions.

    Lesson5 min readVideo7 exercises
  3. 03

    Union Types

    Unions vs intersections, discriminated unions, exhaustive matching with never, state modelling, reducers, Extract/Exclude and branded types.

    Lesson6 min readVideo7 exercises
  4. 04

    Mapped Types

    Transform object types key by key - Partial, Pick, Record and friends, modifiers, key remapping with as, and getters-style transforms.

    Lesson5 min readVideo6 exercises
  5. 05

    Conditional Types

    Type-level if/else, infer, distribution over unions, template literal types and recursive types like DeepReadonly and Paths.

    Lesson4 min readVideo6 exercises
  6. 06

    Data Structures

    Build the classic containers (stack, queue, list, heap, LRU, trie, BST, graph) as generic, well-typed TypeScript classes.

    Lesson5 min readVideo8 exercises
  7. 07

    Algorithms

    Binary search, sliding windows, two pointers, memoization, grouping and Dijkstra, written as reusable, precisely typed generic functions.

    Lesson4 min readVideo7 exercises
  8. 08

    Functional Patterns (bridge to F#)

    Option, Result, pipe, immutable updates and typed events in TypeScript, each shown next to its F# equivalent.

    Lesson5 min readVideo6 exercises
  9. 09

    React & Angular patterns

    How TypeScript shows up in real React and Angular code (props, reducers, hooks, context, effects, DI, RxJS, signals), with the core mechanics rebuilt without the libraries.

    Lesson7 min readVideo7 exercises
  10. 10

    Event loop & async

    How JavaScript runs one thing at a time and still juggles timers, promises and I/O, plus the async patterns built on it (timeouts, debounce, retries, concurrency limits, yielding) and how React and Angular use them.

    Lesson10 min readVideo7 exercises
  11. 11

    Advanced async TypeScript

    Typing async code precisely, async iterators and generators, race conditions without threads, using / await using, single-flight caching, backpressure and structured concurrency, with how React, Angular, cloud SDKs and F# handle the same problems.

    Lesson10 min readVideo7 exercises
  12. 12

    RxJS & Observables

    RxJS the way Angular uses it, with the real library. Observables and subscriptions, operators and marble diagrams, Subjects, the four flattening operators, error handling, multicasting, leaks, signals interop and marble testing.

    Lesson9 min readVideo8 exercises

React 7

React the way a TypeScript team writes it: components and props, state, effects, context, performance and testing. React can't run inside the exercises, so each one rebuilds the mechanism in plain TypeScript; the lessons show the real React code.

  1. 01

    Components & props

    Components as plain functions from props to UI, what JSX really is, typing props in TypeScript (required and optional, children, unions, generics), composition instead of inheritance, and lists with keys.

    Lesson13 min readVideo6 exercises
  2. 02

    State

    How React state really works, with useState and useReducer, state as a snapshot, functional updates, batching, immutable updates, derived versus duplicated state, lifting state up, and why hooks depend on their call order.

    Lesson12 min readVideo6 exercises
  3. 03

    Effects

    What useEffect is for (keeping a component in sync with something outside React) and what it isn't for, dependency arrays and Object.is, cleanup order, Strict Mode's double run, race-free data fetching, useLayoutEffect, and refs.

    Lesson13 min readVideo6 exercises
  4. 04

    Context & custom hooks

    Sharing values without prop drilling and what context costs in re-renders, custom hooks as reusable logic, composition patterns (children, render props, compound components), external stores with useSyncExternalStore, and when Zustand or Redux Toolkit is the better tool.

    Lesson12 min readVideo6 exercises
  5. 05

    Rendering & performance

    What a render really is, how reconciliation and keys decide what survives, when memo, useMemo and useCallback help (and when they don't), the React Compiler, virtualised lists, transitions and deferred values, and how to measure with the Profiler.

    Lesson18 min readVideo6 exercises
  6. 06

    Forms & data

    Controlled and uncontrolled inputs, validation with typed errors, React 19 actions (useActionState, useFormStatus, useOptimistic), server state vs client state, a query cache like TanStack Query, and optimistic updates with rollback.

    Lesson13 min readVideo7 exercises
  7. 07

    Testing & architecture

    React Testing Library the way it's meant to be used (behaviour, roles, user-event), mocking the network with MSW, feature folders and where state lives, React Router data routers (loaders, actions, nested routes), and error and Suspense boundaries.

    Lesson15 min readVideo7 exercises

Angular 7

Modern Angular: standalone components, signals, dependency injection, RxJS, change detection, routing, forms and HttpClient. Angular can't run inside the exercises, so each one rebuilds the mechanism in plain TypeScript (RxJS is the real library); the lessons show the real Angular code.

  1. 01

    Components & templates

    Standalone components, template bindings, signal inputs and outputs (`input()`, `output()`, `model()`), the built-in control flow (`@if`, `@for`, `@switch`, `@defer`), content projection and the component lifecycle.

    Lesson13 min readVideo7 exercises
  2. 02

    Signals

    Angular's reactive state. `signal`, `computed` and `effect`, equality and immutable updates, `untracked`, `linkedSignal`, `resource`, how glitch-free derivation works, and when to use signals or RxJS.

    Lesson11 min readVideo6 exercises
  3. 03

    Dependency injection

    How Angular creates and shares objects. `inject()` and the injection context, providers (`useClass`, `useValue`, `useFactory`, `useExisting`), `providedIn: 'root'`, environment and element injectors, `InjectionToken`, multi providers, resolution modifiers, and overriding providers in tests.

    Lesson10 min readVideo7 exercises
  4. 04

    Change detection

    How Angular decides what to re-render. What a check does, zone.js and why it triggers checks, `OnPush`, `markForCheck` and immutability, signal-based and zoneless change detection (the default for new apps since Angular 21), `ExpressionChangedAfterItHasBeenChecked`, and performance tips.

    Lesson11 min readVideo6 exercises
  5. 05

    HTTP & RxJS in Angular

    HttpClient with typed responses, functional interceptors (auth headers, retries, error mapping, a single-flight 401 refresh), the async pipe, takeUntilDestroyed, toSignal and toObservable, httpResource, and error handling patterns that keep the UI honest.

    Lesson14 min readVideo7 exercises
  6. 06

    Routing & forms

    The Angular router (route config, lazy loading, functional guards and resolvers, route params bound to inputs) and typed reactive forms (FormControl<T>, FormGroup, nonNullable, sync and async validators, cross-field validation).

    Lesson13 min readVideo7 exercises
  7. 07

    Testing & architecture

    Testing Angular code with TestBed, component harnesses, HttpTestingController, fake time and signals, and structuring an app so it stays testable: feature folders, smart and presentational components, state in signal-based services, when to reach for NgRx, and sharing code in an Nx monorepo.

    Lesson11 min readVideo6 exercises

Python 12

Python as it is written today (3.13): values and collections, comprehensions, functions and closures, classes and dataclasses, iterators and generators, decorators, errors and context managers, the standard library, async, and the patterns coding interviews ask for. Exercises run on real CPython, in your browser.

  1. 01

    Python Basics

    How Python reads (indentation, names, dynamic types), its numbers and strings, truthiness and None, == versus is, and the loops and conditionals everything else is built from.

    Lesson7 min readVideo6 exercises
  2. 02

    Collections

    Lists, tuples, dicts and sets, slicing and unpacking, aliasing and shallow versus deep copies, dict ordering and views, hashability, and why membership in a set is fast while membership in a list is not.

    Lesson13 min readVideo7 exercises
  3. 03

    Comprehensions and Iteration

    List, dict and set comprehensions, generator expressions, enumerate and zip, sorting with key functions and stable multi-key sorts, any and all, sum, map and filter, and when a plain loop reads better.

    Lesson11 min readVideo7 exercises
  4. 04

    Functions and Closures

    Functions as values, every way to pass arguments (defaults, *args, **kwargs, keyword-only and positional-only), the mutable default trap, LEGB scope with global and nonlocal, closures and late binding, higher-order functions and functools.partial.

    Lesson14 min readVideo7 exercises
  5. 05

    Classes

    How Python classes work (explicit self, instance versus class attributes), properties, classmethods and staticmethods, the dunder methods that make objects compare, hash, print and behave like containers, inheritance with super(), composition and duck typing.

    Lesson12 min readVideo7 exercises
  6. 06

    Dataclasses, Enums, Pattern Matching and Type Hints

    Model data with @dataclass (defaults, frozen, order, slots, __post_init__), NamedTuple and Enum, take it apart with match, and describe it with type hints, generics, Protocol, TypedDict and Literal that tools check and the runtime ignores.

    Lesson17 min readVideo7 exercises
  7. 07

    Errors and Context Managers

    How Python raises and catches exceptions, the built-in hierarchy, try/except/else/finally, domain exception classes, chaining with raise from, ExceptionGroup and except*, EAFP, and the with statement, contextlib and ExitStack that guarantee cleanup.

    Lesson14 min readVideo7 exercises
  8. 08

    Iterators and Generators

    The iterator protocol behind every for loop, one-shot iterators, writing __iter__ and __next__, generator functions and yield, lazy and infinite sequences, yield from, generator expressions and pipelines, send and close, and the itertools functions that replace most hand-written loops.

    Lesson17 min readVideo7 exercises
  9. 09

    Decorators

    Functions as values, writing decorators and why functools.wraps matters, decorators with arguments, stacking order, decorators that keep state, class-based decorators, functools.cache and lru_cache, singledispatch, property and classmethod, class decorators, and the everyday uses (retry, timing, caching, access checks, registration).

    Lesson13 min readVideo7 exercises
  10. 10

    The Standard Library

    The batteries interviews and real code lean on: Counter, defaultdict, deque, OrderedDict, namedtuple and ChainMap, heapq and bisect, functools and itertools, datetime with time zones, json, re, decimal for money, and statistics, each with when to reach for it.

    Lesson13 min readVideo7 exercises
  11. 11

    Async and await

    How asyncio runs many I/O-bound tasks on one thread: coroutines and the event loop, gather and create_task, TaskGroup, timeouts and cancellation, Semaphore and Queue, async generators and context managers, the classic mistakes, and how it maps to JavaScript promises and C# Task.

    Lesson12 min readVideo7 exercises
  12. 12

    Interview Patterns in Python

    The coding-interview patterns written the Python way (hash maps, two pointers, sliding windows, prefix sums, stacks, BFS and DFS, binary search, heaps, intervals and dynamic programming), what each costs, how to recognise it, and how to talk through a solution.

    Lesson19 min readVideo8 exercises

F# 12

Zero to productive. Every lesson shows the TypeScript equivalent next to the F#, and every exercise runs on the real F# compiler (dotnet fsi).

  1. 01

    Basics

    let bindings, immutability, primitive types, string formatting and if/else as expressions.

    Lesson8 min readVideo6 exercises
  2. 02

    Functions

    Currying, partial application, lambdas, the pipe |> and composition >>, higher-order and generic functions.

    Lesson7 min readVideo6 exercises
  3. 03

    Collections

    Lists, arrays and lazy sequences, the List module (map, filter, fold, groupBy...) and data pipelines.

    Lesson7 min readVideo6 exercises
  4. 04

    Records & Tuples

    Tuples and destructuring, records, copy-and-update, structural equality, record patterns, anonymous records and members.

    Lesson7 min readVideo6 exercises
  5. 05

    Unions & Pattern Matching

    Discriminated unions, match with guards and nested/list patterns, single-case domain types, and making illegal states unrepresentable.

    Lesson7 min readVideo7 exercises
  6. 06

    Option and Result

    Model "might be missing" with Option and "might fail" with Result, then chain steps into railway-style pipelines instead of null checks and exceptions.

    Lesson8 min readVideo6 exercises
  7. 07

    Recursion and Recursive Types

    let rec, tail recursion with accumulators, mutual recursion with `and`, and recursive unions such as trees and expression evaluators.

    Lesson7 min readVideo6 exercises
  8. 08

    Maps and Sets

    Immutable Map and Set, grouping and counting, building lookup indexes, and when a mutable Dictionary or HashSet is the right call.

    Lesson6 min readVideo6 exercises
  9. 09

    Modules, Members and Classes

    Organise code with modules, add members to records and unions, use interfaces, object expressions and classes, and call .NET APIs.

    Lesson7 min readVideo6 exercises
  10. 10

    Computation Expressions

    seq, async and task blocks, list comprehensions, and writing your own option/result builders with let! and return.

    Lesson7 min readVideo7 exercises
  11. 11

    .NET and C# interop

    Use C# libraries from F# (named and optional arguments, overloads, null, Task and task { }, IDisposable, extension methods, interfaces, abstract classes, events, LINQ, System.Text.Json) and expose F# code that C# callers enjoy.

    Lesson19 min readVideo6 exercises
  12. 12

    Designing an F# web API

    Model the domain so illegal states can't be built, guard it with smart constructors and DTOs, validate in pipelines, carry errors as Result across layers to the right HTTP status, and wire dependencies as functions or with ASP.NET Core DI, in minimal APIs and Giraffe.

    Lesson18 min readVideo6 exercises

C# 8

Modern C# for a TypeScript developer: types and records, LINQ, async/await, generics, pattern matching and nullable references. Every exercise is compiled and run with the .NET SDK, and the tests use xUnit-style Assert calls.

  1. 01

    C# basics for TypeScript developers

    How a .NET project is organised, value and reference types, numbers (int, long, double, decimal), strings and formatting, static methods, control flow, arrays, const and readonly, and switch expressions, each next to the TypeScript you already know.

    Lesson18 min readVideo6 exercises
  2. 02

    Classes, records and structs

    Classes with properties and constructors, primary constructors, records with value equality and `with`, structs vs classes, Equals/GetHashCode/ToString, immutability and encapsulation, compared with TypeScript classes and object literals.

    Lesson14 min readVideo6 exercises
  3. 03

    Collections & LINQ

    List, Dictionary, HashSet and arrays, IEnumerable and deferred execution, LINQ (Where, Select, GroupBy, OrderBy, Join, Aggregate, ToDictionary, DistinctBy, Chunk) in method and query syntax, the multiple-enumeration trap, and how it all maps to TypeScript array methods.

    Lesson12 min readVideo6 exercises
  4. 04

    Generics, interfaces & delegates

    Interfaces and why C# typing is nominal, generic types and methods with constraints, covariance and contravariance, extension methods, IComparable/IEquatable/IComparer, delegates and lambdas (Func, Action, Predicate, closures) and events, next to their TypeScript equivalents.

    Lesson13 min readVideo6 exercises
  5. 05

    Pattern matching & nullable references

    Switch expressions and the full pattern toolbox (type, property, positional, relational, list), nullable reference types and flow analysis, Try-style APIs, and modelling a domain with records and patterns, compared with F# unions and TypeScript discriminated unions.

    Lesson15 min readVideo6 exercises
  6. 06

    Async/await and Tasks

    Task and Task<T>, what await really does, running work concurrently with WhenAll and WhenAny, cancellation and timeouts, IAsyncEnumerable and Channel<T>, ConfigureAwait and the sync-over-async deadlock, compared with JavaScript promises and F# async.

    Lesson13 min readVideo6 exercises
  7. 07

    Exceptions, guards and resources

    Throwing and catching well in .NET (which exceptions to use, custom types, `when` filters, `throw;` vs `throw ex;`), guard clauses, when a result type beats an exception, deterministic cleanup with `IDisposable`, `IAsyncDisposable`, `using` and `finally`, and logging errors with context.

    Lesson12 min readVideo6 exercises
  8. 08

    .NET backend building blocks

    What day-to-day work on an ASP.NET Core service in the cloud looks like: dependency injection and lifetimes, options and configuration, minimal APIs and controllers, middleware, HttpClient, cloud SDK clients with workload identity, and background services.

    Lesson14 min readVideo6 exercises

System design 14

The ideas behind every design problem: scaling, caching, queues, consistency and more. Each concept comes with a short video and a concept check in the app.

  1. 01

    How to Approach a Design Problem

    A repeatable seven-step framework for interview-style and day-to-day design discussions, with time boxes and what reviewers look for.

    Concept7 min readVideo
  2. 02

    Back-of-the-Envelope Estimation

    Latency numbers, powers of two and quick QPS, storage and bandwidth math so your design decisions rest on numbers instead of vibes.

    Concept7 min readVideo
  3. 03

    Scaling Basics

    Vertical vs horizontal scaling, stateless services, load balancing algorithms, autoscaling and where session state should live.

    Concept7 min readVideo
  4. 04

    Caching

    Cache-aside, read-through, write-through and write-back; TTLs, invalidation, eviction, hot keys, stampede protection and CDNs.

    Concept7 min readVideo
  5. 05

    Databases: SQL, NoSQL, Replication and Sharding

    How to choose a datastore, use indexes well, replicate for reads and availability, and partition data without creating hot spots.

    Concept7 min readVideo
  6. 06

    Consistency, CAP and Distributed Transactions

    CAP and PACELC, the consistency spectrum, idempotency, and how sagas and the outbox pattern replace distributed transactions.

    Concept6 min readVideo
  7. 07

    Async Messaging: Queues and Streams

    When to put a queue or a log between services, delivery guarantees, ordering, dead-letter queues, backpressure and fan-out patterns.

    Concept6 min readVideo
  8. 08

    Reliability Patterns and Observability

    Timeouts, retries with jitter, circuit breakers, bulkheads, rate limiting algorithms, SLIs/SLOs/SLAs and the three pillars of observability.

    Concept7 min readVideo
  9. 09

    API Design

    Choosing REST, gRPC, GraphQL, WebSockets or SSE, plus pagination, versioning, idempotency keys and authentication basics.

    Concept7 min readVideo
  10. 10

    Cloud Building Blocks

    Design with generic boxes, then name the service that plays each role and say why. Maps every board component to AWS, Azure, Google Cloud and self-hosted options, and covers the decisions that recur in hosting, edge, identity, data, messaging, observability, resilience and cost.

    Concept14 min readVideo
  11. 11

    Frontend Architecture

    Rendering strategies, the BFF pattern, caching from browser to CDN, state management, real-time updates, Core Web Vitals, micro-frontends and SPA auth for React and Angular teams.

    Concept19 min readVideo
  12. 12

    Identity and Secrets

    Authentication vs authorization, OAuth 2.0 and OIDC flows, access, refresh and ID tokens, scopes and roles, workforce vs customer identity, workload identity without stored secrets, secrets stores and rotation, least privilege and multi-tenant concerns.

    Concept17 min readVideo
  13. 13

    Compute and Hosting

    Matching workloads to hosting models (virtual machines, PaaS, managed containers, Kubernetes, serverless functions, durable workflow engines, static hosting), plus scaling signals and limits, zero-downtime deploys, private networking, cost, and the equivalent services on AWS, Azure and Google Cloud.

    Concept17 min readVideo
  14. 14

    Observability and Delivery

    Logs, metrics and traces with OpenTelemetry, correlation across services and queues, cardinality, sampling, SLO burn-rate alerts, runbooks and health checks; then CI/CD, infrastructure as code, pipelines that sign in with OIDC, environments, rolling, blue-green and canary releases, feature flags, expand-and-contract migrations and rollback.

    Concept18 min readVideo

Reading is the start. Practice is what sticks.

Start practising free