THE GO LEARNING LIBRARY

Your Go learning map.

Choose a direction, open a branch, and follow the lessons in order — or go straight to the topic you need.

Gopher reading beneath a branching tree of Go concepts.
429 lessons & challenges51 units360 deep readings

Gin, SQLite, Kubernetes, drones, blockchain, security and game development are dedicated courses of their own; the production system-design units remain part of the Go course. App Store 1.3.7 includes complete course downloads, Continue and the Gin, SQLite, blockchain, security and game-development courses; the Kubernetes and Drones with Go downloads are planned for 1.3.7. See version history for release status. Continue saves your lesson and section in this browser. Web and app progress are stored separately.

0 of 429 completed

Saved in this browser. Web progress is independent of app progress.

Start with the basics →
Show

429 lessons in your learning map

Go foundations

From values and control flow to types, interfaces and packages.

Go coreDeclarations, zero values, multiple returns and the shapes Go repeats everywhere.0/11completed
  1. Nothing is uninitialisedPredict the value of any declared variable before it is assigned.Predict the output · 3 min
  2. := declares, = assignsChoose between := and = without guessing, and know when := is illegal.Code exercise · 3 min
  3. Read a declaration one scope at a timeFollow values through a short declaration, an assignment and a shadowed name without running the program.Read & check · 3 min
  4. Read the failure path before the happy pathTrace a result and error through a complete boundary, including wrapping and partial results.Read & check · 3 min
  5. Two returns instead of one exceptionWrite a function that returns a result and an error, and read one.Code exercise · 3 min
  6. An unused variable stops the buildRecognise the two unused errors on sight and know why they exist.Code exercise · 3 min
  7. Constants have no type until they need oneExplain why 1 << 40 compiles as a constant but overflows as an int32.Predict the output · 3 min
  8. switch does not fall throughWrite a Go switch without reaching for break.Code exercise · 3 min
  9. Go never converts a number for youFix a mismatched-type expression without guessing.Code exercise · 3 min
  10. A return can name what it is handing backWrite a short function that uses a naked return, and know when not to.Code exercise · 3 min
  11. Deferred calls stack, last one firstSay the print order of three deferred calls.Predict the output · 3 min
Types you defineStructs, methods, pointers, and functions that are values.0/5completed
  1. A struct is data, and its fields have namesDeclare a struct type and build values of it without positional guessing.Code exercise · 3 min
  2. A method is a function with a receiverPut a method on your own type and choose the receiver deliberately.Code exercise · 3 min
  3. A pointer is for changing something, not for speedSay when a pointer is required and when it is only noise.Predict the output · 3 min
  4. A function is a value, and it remembers where it came fromReturn a function that carries state, and know what it captured.Code exercise · 3 min
  5. Returning a pointer to a local is fineExplain why Go lets you return the address of a local variable.Predict the output · 3 min
Slices, maps and stringsLength against capacity, shared backing arrays, and why a string is not a []char.0/16completed
  1. A slice is a window, not a copied arrayPredict a subslice, an element write and append by tracking the backing array.Read & check · 3 min
  2. len is what you have, cap is what you can grow intoPredict when append allocates and when it writes in place.Predict the output · 3 min
  3. Two slices, one arraySpot the moment a subslice starts sharing writes with its parent.Code exercise · 3 min
  4. Shared slices and concurrent appendSeparate shared headers, shared elements and safe collection of concurrent results.Read & check · 3 min
  5. Reading a missing key is fine, writing to a nil map is notUse comma-ok, and know which map operation panics.Code exercise · 3 min
  6. A string is bytes; range gives you runesIndex, slice and iterate a string without corrupting characters.Predict the output · 3 min
  7. range works on functions tooWrite something that can be ranged over without building a slice first.Code exercise · 3 min
  8. len is what you may read; cap is what you may resliceSay which of two similar-looking index expressions panics.Predict the output · 3 min
  9. A tiny slice can keep a large buffer aliveRecognize retained backing arrays and detach small long-lived results deliberately.Read & check · 3 min
  10. Map iteration order is not specifiedProduce stable output from a map without hoping.Code exercise · 3 min
  11. Concatenating in a loop repeatedly rebuilds a stringUse strings.Builder for repeated construction without rebuilding the prefix.Code exercise · 3 min
  12. make initializes collections; new returns a pointerPick make or new for a slice, a map and a pointer.Code exercise · 3 min
  13. The length is part of an array's typeWrite a function that takes [4]int and returns [3]int.Code exercise · 3 min
  14. Comma-ok is how you tell zero from missingReport whether a key is present when its value can be zero.Code exercise · 3 min
  15. A nil slice is empty, and append still worksPredict what len, == nil and append do to a zero slice.Predict the output · 3 min
  16. A function is a value you can passApply a func(int) int to every element of a slice.Code exercise · 3 min
InterfacesImplicit satisfaction, method sets, and the nil that is not nil.0/7completed
  1. The consumer declares the interfaceWrite the smallest interface a function needs, at the call site.Code exercise · 3 min
  2. Pointer receiver, pointer method setPredict whether a value or only a pointer satisfies an interface.Predict the output · 3 min
  3. A nil pointer in an interface is not a nil interfaceExplain why err != nil can be true when the error is nil.Predict the output · 3 min
  4. Asking an interface what it is holdingRead a value out of an interface without risking a panic.Code exercise · 3 min
  5. Embedding is not inheritancePredict which method runs when an embedded type has one too.Predict the output · 3 min
  6. fmt looks for String(), not a Stringer keywordMake a type print itself as a dotted IPv4 address.Code exercise · 3 min
  7. any is interface{}, and it has no methodsReport the dynamic type of a value held in any.Code exercise · 3 min
Generics, and when not toType parameters, constraints, and the times an interface is the better answer.0/5completed
  1. A type parameter is written in square bracketsWrite a function that works for several types without interface{} and without a cast.Code exercise · 3 min
  2. A constraint is an interface with types in itConstrain a type parameter to what your code actually needs.Code exercise · 3 min
  3. A type can take parameters tooWrite a container that holds one type rather than any type.Code exercise · 3 min
  4. A method can take its own type parameterWrite the method that could only be a function before Go 1.27.Code exercise · 3 min
  5. Most code that could be generic should not beRecognise the three cases where a type parameter earns its place, and the ones where it does not.Predict the output · 3 min
ErrorsWrapping, errors.Is and errors.As, sentinels, defer and the panic boundary.0/6completed
  1. %w adds context without hiding the causeWrap an error so callers can still match the original.Code exercise · 3 min
  2. Is compares, As extractsChoose between errors.Is and errors.As without trial and error.Code exercise · 3 min
  3. defer runs last in, first outRelease what you acquired, in the right order, on every path.Predict the output · 3 min
  4. An error is any type with an Error methodWrite an error that carries data the caller can read.Code exercise · 3 min
  5. panic is for bugs, not for failuresSay which of two situations deserves a panic.Predict the output · 3 min
  6. recover belongs at the boundaryTurn a panic into an error without swallowing the rest of the program.Code exercise · 3 min
Packages, modules and toolingImport paths, go.mod, go test and go vet, without a search engine.0/17completed
  1. The import path is the module path plus the directoryPredict the import path of any package in a module.Predict the output · 3 min
  2. A capital letter is the access modifierControl visibility without keywords, and name things accordingly.Code exercise · 3 min
  3. Tests are a file, not a frameworkWrite a table-driven test and run it locally.Code exercise · 3 min
  4. The package name is half the APIName a package and its exported function without repeating yourself.Predict the output · 3 min
  5. init runs before main, and order is definedPredict the order of package variables, init and main.Predict the output · 3 min
  6. A module is a release boundary; a package is a directoryResolve module roots, import paths, internal visibility and major-version suffixes.Read & check · 3 min
  7. Explain the selected version before running go getRead minimal version selection and investigate a transitive upgrade without guessing.Read & check · 3 min
  8. Checksums, proxies and private modules solve different problemsDiagnose downloads without leaking private paths or disabling integrity checks globally.Read & check · 3 min
  9. A local workspace can hide a broken releaseUse go.work and replace for development while checking what an independent consumer builds.Read & check · 3 min
  10. Reproduce the artifact: vendor, build tags and embedded filesCheck the source and assets that a clean build actually receives.Read & check · 3 min
  11. Parallel tests must own their mutable resourcesFind races, test caching mistakes and shared integration fixtures before scaling concurrency.Read & check · 3 min
  12. A microbenchmark is not a capacity testMeasure allocations, concurrency and tail latency without mistaking closed-loop throughput for service capacity.Read & check · 3 min
  13. Profile CPU, allocation and waiting as different bottlenecksUse pprof and traces to investigate latency under load instead of increasing pools blindly.Read & check · 3 min
  14. Build concurrency also has a memory budgetSeparate compiler work, runtime goroutines and caches when CI or a small machine stalls.Read & check · 3 min
  15. Pin the compiler and the tools that generate your codeDistinguish application dependencies, development commands and toolchain selection.Read & check · 3 min
  16. Test unknown inputs and check reachable vulnerabilitiesCombine fuzzing, regression seeds and govulncheck without treating one green tool as complete assurance.Read & check · 3 min
  17. Package initialization is not a request-time connection factoryMove fallible setup to an explicit owner and close shared resources after work drains.Read & check · 3 min

Concurrency & services

Coordinate work, understand the runtime, and build useful services.

ConcurrencyGoroutines, channel ownership, select, buffers and who may send.0/18completed
  1. An unbuffered channel is a meetingSay what blocks, and for how long, on a channel with no buffer.Predict the output · 3 min
  2. go returns nothingGet a result out of a goroutine, and know when the program stops waiting.Predict the output · 3 min
  3. Cancellation is a request; joining proves exitDesign a worker so it can stop waiting and its owner can wait for it to finish.Read & check · 3 min
  4. The sender closes, the receiver rangesDecide who closes a channel, and why the other side must not.Code exercise · 3 min
  5. select waits on several things; context says stopMake a blocking operation cancellable without a flag or a kill switch.Code exercise · 3 min
  6. A mutex is for state; a channel is for handing overChoose between a mutex and a channel for a given problem.Code exercise · 3 min
  7. The worker pool, written onceBuild a fixed set of workers that finishes cleanly.Code exercise · 3 min
  8. More goroutines are not more capacityBound active workers and queued work according to the resource that actually limits throughput.Read & check · 3 min
  9. A buffer is a mailbox, not a meetingSend n values on a channel of capacity n without another goroutine.Code exercise · 3 min
  10. range over a channel ends when it closesDrain a channel with range, and close it from the sender.Code exercise · 3 min
  11. default makes select try, not waitReceive from a channel if a value is ready, and return if it is not.Code exercise · 3 min
  12. The arrow in the type is who may sendWrite a producer that takes chan<- int and closes it.Code exercise · 3 min
  13. sync.Once runs a function one time, for everyoneInitialise shared state without a lock you have to remember.Code exercise · 3 min
  14. WaitGroup.Go joins tasks; it does not collect their errorsUse modern WaitGroup task ownership and explain its limits.Read & check · 3 min
  15. Test time and cancellation without sleeping on the wall clockUse testing/synctest to assert a concurrent timeline deterministically.Read & check · 3 min
  16. errgroup: errors, cancellation and a real concurrency limitCoordinate fallible parallel work without confusing cancellation with joining.Read & check · 3 min
  17. Atomic publication is safe only when the published snapshot stays immutablePublish one consistent snapshot and preserve ownership of its reachable maps and slices.Read & check · 3 min
  18. Mutex, RWMutex and sync.Map: protect the invariant and do not copy the lockChoose synchronization around related state and return snapshots rather than copied lock owners.Read & check · 3 min
Standard library patternsio.Reader and io.Writer, encoding/json, and testing without a framework.0/14completed
  1. Two interfaces, one method eachWrite a function that works on a file, a string and a test buffer.Code exercise · 3 min
  2. Struct tags are the JSON schemaControl field names, omit empties, and know what unmarshalling leaves untouched.Predict the output · 3 min
  3. JSON v2: migrate behavior, not just importsCompare null, empty and omitted JSON values before changing a public API.Read & check · 3 min
  4. A Duration is a number of nanoseconds with a typeWrite a timeout without wondering what unit it is in.Predict the output · 3 min
  5. Sorting by whatever you likeSort a slice of structs by two keys.Code exercise · 3 min
  6. Every blocking call should take a contextMake a function that waits stop waiting when told to.Code exercise · 3 min
  7. http.Handler is one method, like ReaderServe /hello from an in-memory request, with no listen.Code exercise · 3 min
  8. strconv is how text becomes a numberParse a port with Atoi and reject anything outside 1…65535.Code exercise · 3 min
  9. image.Image is three methods, not a fileImplement a solid-colour image the standard library will accept.Code exercise · 3 min
  10. Borrow bytes briefly; copy before their owner changesTrace bytes.Buffer and Scanner views, then make retained results independent at a lifetime boundary.Read & check · 3 min
  11. JSON presence: omitted, zero and null are different statesChoose omitempty, omitzero and request presence models from the endpoint contract.Read & check · 3 min
  12. Strict JSON input: reject ambiguity before side effectsSeparate JSON syntax acceptance, unknown-member policy and domain validation.Read & check · 3 min
  13. Timers and cancellation: versioned semantics still need a single ownerExplain Stop/Reset behavior, timer ownership and why select is not a priority statement.Read & check · 3 min
  14. Outgoing HTTP: reuse the client and bound the response, not just the dialOwn the client lifetime, close bodies and classify HTTP status separately from transport failure.Read & check · 3 min
Runtime and memoryStacks, GC, goroutines, threads and diagnostic evidence.0/6completed
  1. Stacks, escape analysis and object lifetimesExplain why returning a local address is safe and why allocation placement must be measured.Read & check · 3 min
  2. What the garbage collector can and cannot freeFollow references from roots and distinguish unreachable objects from unwanted live data.Read & check · 3 min
  3. GC cost, allocation rate and memory budgetsDistinguish reducing live data from tuning collection frequency and respect a container memory limit.Read & check · 3 min
  4. Goroutines, OS threads and GOMAXPROCSExplain concurrency versus parallel execution without assuming a goroutine is an OS thread.Read & check · 3 min
  5. Find a leak by following evidenceChoose a heap profile, goroutine profile, CPU profile or trace to test a specific hypothesis.Read & check · 3 min
  6. A pool reuses temporary objects; it does not own your resultsUse sync.Pool with exclusive ownership, independent output and an explicit policy for oversized buffers.Read & check · 3 min
Go servicesHTTP, Gin, Redis and the capacity of downstream services.0/5completed
  1. An HTTP request has a lifecycle and a budgetSeparate request parsing, domain work, downstream deadlines and response writing.Read & check · 3 min
  2. Gin routes are adapters, not the whole applicationRead route groups, path parameters and injected dependencies in a small Gin API.Read & check · 3 min
  3. Validate a request before doing side effectsFollow JSON binding, size limits, validation and a safe error response.Read & check · 3 min
  4. Redis is fast; its capacity is still finiteDistinguish client pool limits, request deadlines, rate limits and bounded command batches.Read & check · 3 min
  5. Cache misses, retries and overload amplificationDesign a cache-miss path that avoids multiplying identical work and ambiguous retries.Read & check · 3 min

Architecture & clean code

Choose boundaries deliberately. Keep the implementation clear.

Go architecturesCompare monoliths, layers, hexagonal and clean designs, DDD, CQRS, events and distributed services.0/19completed
  1. Packages follow responsibilities, not a diagramChoose cohesive package boundaries and keep concrete dependencies at the edges.Read & check · 3 min
  2. Ports and adapters with a real requestTrace an HTTP adapter through an application operation to a storage port and compare test boundaries.Read & check · 3 min
  3. Choose a style; keep the code easy to changeCompare a modular monolith, layered design and microservices using concrete operational tradeoffs.Read & check · 3 min
  4. Simple monolith: start with one executableKeep a small application understandable without premature service boundaries.Read & check · 3 min
  5. Layered architecture: transport, application, storageSeparate responsibilities without confusing logical layers with deployed tiers.Read & check · 4 min
  6. Modular monolith: boundaries inside one deploymentGive business capabilities explicit APIs while retaining local transactions.Read & check · 3 min
  7. Clean and Onion: dependencies point toward policyKeep domain policy independent of framework and database details.Read & check · 3 min
  8. Vertical slices: organize around a use caseKeep feature changes together without duplicating shared invariants.Read & check · 3 min
  9. DDD: bounded contexts and aggregatesModel language and invariants before choosing storage or transport.Read & check · 3 min
  10. CQRS: different models for commands and queriesSeparate change rules from read shape without assuming two databases.Read & check · 3 min
  11. Event sourcing: state from a durable historyDistinguish a source of truth from ordinary logs and notifications.Read & check · 3 min
  12. Event-driven services: delivery and idempotencyTreat duplicate delivery as normal and define the durable boundary.Read & check · 3 min
  13. Microservices: pay for independent ownershipExtract a remote boundary only when its independence is valuable.Read & check · 3 min
  14. SOA and RPC: stable service contractsCompare service-oriented integration with smaller independently owned services.Read & check · 3 min
  15. BFF: an API shaped for one clientCompose client-specific views while retaining business ownership.Read & check · 3 min
  16. Serverless handlers: bounded work and retry-safe effectsSeparate invocation mechanics from deterministic application behavior.Read & check · 3 min
  17. Pipes and filters: data through independent stagesCompose transformations while making backpressure and errors explicit.Read & check · 3 min
  18. Microkernel: a small core with explicit extensionsExtend behavior through contracts without assuming dynamic shared libraries.Read & check · 3 min
  19. Web, queue, worker: make slow work durableSeparate request latency from background completion.Read & check · 3 min
Clean code in GoNames, interfaces, errors, ownership, tests and safe refactoring.0/8completed
  1. Names that expose responsibilityMake a caller understand units, results and ownership from the API.Read & check · 3 min
  2. Small interfaces belong near the consumerDescribe a real substitution boundary without wrapping every concrete type.Read & check · 3 min
  3. Errors: preserve cause and choose one reporting boundaryKeep failure context useful without logging the same failure at every layer.Read & check · 3 min
  4. Ownership: copy mutable data deliberatelyMake it clear whether a caller lends, shares or transfers a buffer.Read & check · 3 min
  5. Configuration: validate once at constructionTurn invalid setup into an explicit startup error.Read & check · 3 min
  6. Behavior tests: tables and boundary casesTest an observable contract with success and failure inputs.Read & check · 3 min
  7. Refactoring: make the safe change smallSeparate a behavior-preserving edit from a new requirement.Read & check · 3 min
  8. SOLID in Go: principles without class scaffoldingTranslate responsibility, substitution and dependency inversion into Go contracts.Read & check · 3 min
Architecture: consistency and evolutionTransactions, outbox/inbox, sagas, compatible changes, tenant isolation and observability.0/9completed
  1. A use case owns its transaction, not its HTTP handlerKeep the business invariant and transaction boundary in the application service.Read & check · 3 min
  2. Outbox and inbox: close the database–broker gapCommit a business change and its publication intent together, then deduplicate delivery.Read & check · 3 min
  3. Sagas: compensate business steps without pretending to roll back timeModel a distributed workflow as durable states with explicit compensation and recovery.Read & check · 3 min
  4. Evolve APIs, events and schemas across mixed deploymentsUse expand–migrate–contract changes while old and new Go processes coexist.Read & check · 3 min
  5. Tenant isolation belongs in every access pathCarry a verified tenant identity into storage predicates, cache keys and background jobs.Read & check · 3 min
  6. Observe a Go use case without drowning in cardinalityConnect structured logs, bounded metrics and traces to an explicit service objective.Read & check · 3 min
  7. gRPC and Protobuf: generated methods still need an operational contractDefine deadlines, stream ownership, status mapping and compatible message evolution.Read & check · 3 min
  8. Kafka-style consumers: commit only a contiguous completed prefixSeparate message delivery, durable effects and partition-offset ownership.Read & check · 3 min
  9. Consistency under partitions: explain an operation, not a sloganChoose per-operation consistency and failure behavior instead of treating CAP as a product rating.Read & check · 3 min
Clean code: production contractsComposition roots, context ownership, package APIs and exact time/money contracts.0/4completed
  1. A composition root makes lifetime and cleanup visibleConstruct dependencies once and make their ownership and shutdown order explicit.Read & check · 3 min
  2. Context is a cancellation contract, not a bag of dependenciesPropagate request cancellation while giving detached work an explicit owner and deadline.Read & check · 3 min
  3. Package APIs should reveal their change boundaryUse narrow consumer contracts and tests that make accidental coupling visible.Read & check · 3 min
  4. Time and money need units and presence in their typesSeparate durations, instants and exact amounts instead of passing ambiguous numbers.Read & check · 3 min

Design patterns

Creation, composition, behavior and the patterns that fit concurrent Go.

Patterns: creationFactory Method, Abstract Factory, Builder, Prototype and Singleton.0/5completed
  1. Factory Method: supply the creation stepVary product creation without duplicating the algorithm that uses it.Read & check · 3 min
  2. Abstract Factory: compatible product familiesCreate related products through one selected family.Read & check · 3 min
  3. Builder: assemble then validateRepresent staged construction without making invalid results usable.Read & check · 3 min
  4. Prototype: copy a useful starting valueChoose shallow or deep copying according to ownership.Read & check · 3 min
  5. Singleton: once does not mean global mutable stateUnderstand one-instance intent and choose an explicit lifetime.Read & check · 3 min
Patterns: compositionAdapter, Bridge, Composite, Decorator, Facade, Flyweight and Proxy.0/7completed
  1. Adapter: translate one contract into anotherKeep conversion details at the boundary that needs them.Read & check · 3 min
  2. Bridge: two independent dimensions of variationCompose an abstraction with a separately variable implementation.Read & check · 3 min
  3. Composite: treat leaves and groups uniformlyDefine recursive behavior while guarding the shape of the structure.Read & check · 3 min
  4. Decorator: add behavior while preserving the contractWrap a small operation instead of constructing a type hierarchy.Read & check · 3 min
  5. Facade: one useful entry point over a subsystemSimplify orchestration without pretending several effects are atomic.Read & check · 3 min
  6. Flyweight: share immutable intrinsic stateSeparate reusable data from per-use context before optimizing memory.Read & check · 3 min
  7. Proxy: control access to an existing operationMake caching or lazy access preserve the caller’s expectations.Read & check · 3 min
Patterns: behaviorEleven classic patterns, from Strategy and Command to State, Visitor and Interpreter.0/11completed
  1. Strategy: choose an algorithm explicitlyPass interchangeable behavior through a function or small interface.Read & check · 3 min
  2. Command: represent an action as a valueMake actions queueable or reversible without claiming every effect can be undone.Read & check · 3 min
  3. Chain of Responsibility: ordered handlersStop or delegate deliberately and make short-circuit order visible.Read & check · 3 min
  4. Iterator: yield values without exposing storageUse iter.Seq or a small Next API and honor early termination.Read & check · 3 min
  5. Mediator: centralize collaboration deliberatelyLet participants communicate through a focused coordinator.Read & check · 3 min
  6. Memento: retain a restorable snapshotLet the owner define what a valid snapshot contains.Read & check · 3 min
  7. Observer: subscribe, notify and unsubscribeKeep notification lifetime and delivery semantics explicit.Read & check · 3 min
  8. State: behavior follows a valid lifecycleRepresent legal transitions instead of scattered boolean combinations.Read & check · 3 min
  9. Template Method: fixed workflow, supplied stepsAdapt the inheritance-based intent using composition in Go.Read & check · 3 min
  10. Visitor: new operations over a stable set of nodesUnderstand the tradeoff between adding node types and adding operations.Read & check · 3 min
  11. Interpreter: evaluate a deliberately small languageModel a grammar without treating arbitrary text as executable code.Read & check · 3 min
Patterns: concurrent GoWorker pools, fan-in, cancellation, ownership, retries and circuit breakers.0/6completed
  1. Worker pool: bound simultaneous workControl active work instead of starting one goroutine for every input.Read & check · 3 min
  2. Fan-out and fan-in: merge without assuming orderCoordinate multiple producers and one result stream.Read & check · 3 min
  3. Cancellation: propagate an exit path through every handoffMake a producer stop when its consumer no longer needs results.Read & check · 3 min
  4. Single owner: serialize state through messagesUse one goroutine to own mutable state and define request completion.Read & check · 3 min
  5. Retry: bounded attempts and idempotent effectsRetry transient failures within one deadline without multiplying side effects.Read & check · 3 min
  6. Circuit breaker: stop calls while a dependency recoversSeparate retry policy from failure isolation and a controlled recovery probe.Read & check · 3 min

Around Go

The command line, containers, DevOps, databases and coding agents. Real commands, bounded services and evidence-driven Go workflows.

Around Go: command lineBash, Git, Go tools, HTTP debugging and Linux service commands.0/11completed
  1. Bash essentials: navigate, inspect and copy filesUse pwd, cd, ls, mkdir, cp and mv in a small disposable workspace.Read & check · 3 min
  2. Find code and inspect logs from the command lineCombine find, grep, head, tail, sort and uniq without hiding their exit behavior.Read & check · 3 min
  3. Bash passes arguments; quoting defines their boundariesRead a small build script without splitting paths or accidentally invoking a shell through Go.Read & check · 3 min
  4. Pipelines, exit codes and explicit failure handlingRead pipeline failure behavior and keep configuration and secrets out of command strings.Read & check · 3 min
  5. Processes, signals and exit statusStart one Go service, retain its PID, send TERM and wait for its result.Read & check · 3 min
  6. Small scripts: arguments, environment and cleanupRead required configuration, forward quoted arguments and clean a temporary workspace with a trap.Read & check · 3 min
  7. Git daily work: inspect, branch, stage and commitKeep working tree, staging area and committed history distinct.Read & check · 3 min
  8. Git collaboration: fetch, compare, stash and pushInspect upstream changes before integration and keep unfinished work recoverable.Read & check · 3 min
  9. Go toolbelt: modules, tests, vet and buildUse the native Go CLI to inspect a module and check a service before packaging it.Read & check · 3 min
  10. HTTP debugging: curl, status codes and time budgetsProbe a local API and separate DNS, connection, HTTP and application failures.Read & check · 3 min
  11. A Go service on Linux: systemctl and journalctlInspect a systemd service, follow its logs and understand its restart boundary.Read & check · 3 min
Around Go: containersBuild, run, inspect and publish with Docker, Compose and Podman.0/6completed
  1. Build a small Go image with explicit runtime needsSeparate the build stage from the runtime image and identify what a minimal image leaves out.Read & check · 3 min
  2. Docker daily commands: build, run, inspect and stopRun a named local container and diagnose it with logs, inspect and stats.Read & check · 3 min
  3. Compose: run an API and Redis as one local stackRead compose.yaml and use config, up, ps, logs, exec and down.Read & check · 3 min
  4. Container storage: bind mounts, volumes and permissionsChoose a mount for configuration or persistent state and inspect it without deleting data.Read & check · 3 min
  5. Docker and Podman: images are not running containersDistinguish image, container, host networking and persistent data while comparing local runtimes.Read & check · 3 min
  6. Publish an image: tags, digests and target platformsTag and push an image you own, inspect its digest and match its platform to the deployment.Read & check · 3 min
Around Go: KubernetesContexts, deployments, logs, services, configuration, probes and rollbacks.0/8completed
  1. kubectl first steps: context, namespace and permissionsInspect the target cluster and explicitly scope commands before making changes.Read & check · 3 min
  2. Kubernetes reconciles a workload; a Service routes to itRead Deployment, Pod labels, resource budgets and a Service without confusing them with an application build.Read & check · 3 min
  3. Deploy a manifest: explain, dry-run, diff and applyValidate a workload document and observe reconciliation rather than assuming apply means ready.Read & check · 3 min
  4. Debug Pods: get, describe, logs, events and topFind the concrete reason behind Pending, CrashLoopBackOff or an unready container.Read & check · 3 min
  5. Service routing: selectors, endpoints and port-forwardTrace a request from a local port through a Service to a ready application endpoint.Read & check · 3 min
  6. Configuration: ConfigMaps, Secrets and update behaviorCreate a non-secret setting, mount a Secret reference and understand why environment changes need replacement.Read & check · 3 min
  7. Readiness, liveness and graceful shutdownGive each health signal one purpose and arrange a bounded stop that drains owned work.Read & check · 3 min
  8. Release operations: rollout, scale and rollbackChange an image deliberately, observe revisions and understand what rollback cannot restore.Read & check · 3 min
Around Go: DevOps and reliabilityOperational CLIs, reconciliation, verified delivery, SLOs, incidents and data-safe recovery.0/9completed
  1. DevOps is a delivery feedback loop; Go builds its toolsConnect a service change to tests, delivery, operation and feedback, and choose a small automation project with a measurable outcome.Read & check · 8 min
  2. Build a small operational CLI with explicit boundariesDesign a Go command with bounded input, machine-readable output, explicit exit status and cancellation ownership.Read & check · 3 min
  3. Reconcile desired state without overwriting a newer observationSeparate observation, planning and application; use a version precondition and make a repeated successful reconciliation converge.Read & check · 3 min
  4. CI/CD: build once, verify the digest, promote the same artifactBind verification evidence and release approval to an immutable artifact, then distinguish application rollout from data recovery.Read & check · 3 min
  5. Use an SLO to decide when an incident needs attentionDefine eligible events, compute error-budget burn and require both recent and sustained evidence before paging.Read & check · 3 min
  6. Respond to an incident without destroying the accepted writesUse a bounded runbook to gather evidence, choose a reversible mitigation and distinguish binary rollback from restoring persistent data.Read & check · 3 min
  7. IAM: give a job one narrow, short-lived identitySeparate authentication, authorization and credential lifetime in a delivery workflow.Read & check · 3 min
  8. Infrastructure as code: plan, lock and inspect driftExplain state ownership, review a proposed change and recover from a failed apply without discarding evidence.Read & check · 3 min
  9. Diagnose a service boundary: DNS, transport, TLS and HTTPCollect evidence at the failing boundary without disabling peer verification.Read & check · 3 min
Around Go: MongoDB and RedisClients, queries, atomic writes, caching, streams and behavior under load.0/12completed
  1. MongoDB: one client, explicit deadlines and typed documentsConnect with the Go v2 driver and separate construction, readiness, request work and cleanup.Read & check · 3 min
  2. MongoDB: design the query and its compound index togetherUse explain evidence, tenant predicates and stable pagination rather than adding indexes blindly.Read & check · 3 min
  3. MongoDB: put the invariant in the write predicatePrevent lost updates with atomic operators and optimistic version checks.Read & check · 3 min
  4. MongoDB transactions: retry database work, not external effectsChoose transaction boundaries, concerns and idempotency for ambiguous failures.Read & check · 3 min
  5. MongoDB cursors: bound the result and close the streamAvoid loading an unbounded collection into application memory.Read & check · 3 min
  6. MongoDB under load: budget waiting before enlarging the poolSeparate server selection, pool checkout, query time and application queueing.Read & check · 3 min
  7. Redis: share the client and distinguish a miss from an outageConfigure go-redis deadlines, connection budgets and explicit cache-miss behavior.Read & check · 3 min
  8. Redis cache-aside: TTLs do not solve concurrent fillsDesign expiry, invalidation, negative caching and stampede control deliberately.Read & check · 3 min
  9. Redis pipelines save round trips; they are not transactionsBound command batches, inspect command errors and separate batching from atomicity.Read & check · 3 min
  10. Redis counters and leases need atomic transitions and ownershipAvoid split increment/expiry races and unsafe lock deletion.Read & check · 3 min
  11. Redis Streams: acknowledge after the durable effectUnderstand consumer groups, pending entries, redelivery and bounded retention.Read & check · 3 min
  12. Redis under load: hot keys, memory pressure and ambiguous retriesInspect server latency and memory while bounding client work and retry amplification.Read & check · 3 min
Around Go: SQL servicesShared pools, rows, transactions, isolation, deadlocks and retry-safe commands.0/5completed
  1. SQL: one pool, explicit capacity and observable waitingConfigure database/sql as a shared pool and measure its actual pressure.Read & check · 3 min
  2. SQL rows: close, check errors and bound the resultWrite a cancellation-aware query loop without losing iteration failures.Read & check · 3 min
  3. SQL transactions: every participating call uses the transactionPlace an atomic business transition inside one explicit transaction owner.Read & check · 3 min
  4. SQL isolation and deadlocks: test the business invariantExplain why atomic statements alone may not preserve a multi-row invariant.Read & check · 3 min
  5. SQL retries: restart a safe transaction, reconcile an unknown resultSeparate retryable transaction aborts from an ambiguous committed operation.Read & check · 3 min
Around Go: coding agentsUse Codex, Claude Code and Cursor with concrete contracts, repository context and meaningful checks.0/4completed
  1. A Go agent task starts with a contract and a failing exampleTurn an ambiguous coding request into a small, verifiable Go change.Read & check · 3 min
  2. Repository guidance for Codex, Claude Code and CursorWrite useful Go repository instructions without confusing context with permissions.Read & check · 3 min
  3. Verify generated Go against the real module and runtimeCatch invented APIs, unsafe concurrency and changed wire contracts in generated Go.Read & check · 3 min
  4. Agent trust boundaries: repository text is input dataReview commands, secrets and external writes when an agent consumes untrusted text.Read & check · 3 min

Gin web services

A Gin tutorial from the first route to a tested REST API: binding, validation, middleware, auth, rate limits and streaming.

Gin foundationsEngines, routes, parameters, groups, binding sources, validators, JSON, uploads, templates and 404/405 handling.0/11completed
  1. Your first Gin service: an engine, two routes and a test requestBuild a Gin engine, register routes with a path parameter and exercise them without opening a port.Read & check · 4 min
  2. Path parameters in Gin: :param takes one segment, *wildcard takes the rest, conflicts panic at bootDeclare Gin route templates with :param and *wildcard, predict how slashes and escapes resolve, and label metrics with c.FullPath().Read & check · 6 min
  3. Query strings and forms in Gin: tell absent from empty, parse numbers strictly, bound every limitRead query and form values with the Gin helper that matches the case, convert them with strconv and reject bad input with a clear 400.Read & check · 5 min
  4. Gin route groups: prefixes and middleware are copied at registration, so test the route tableOrganize a Gin API into nested, versioned groups with scoped middleware and prove with r.Routes() that every route has the protection you intended.Read & check · 5 min
  5. Gin JSON responses: know what each renderer writes and return a DTO, never your storage modelChoose between c.JSON, PureJSON, IndentedJSON, SecureJSON and AsciiJSON by their exact output, set status codes deliberately and render a response DTO with correct omitempty and omitzero tags.Read & check · 5 min
  6. Gin binding sources: bind path, query, headers and body separately, and cache the body to read it twiceBind each request source with its own Gin binder and tag, predict what content-type-driven ShouldBind reads, and decode one body twice with ShouldBindBodyWithJSON.Read & check · 5 min
  7. Custom validators in Gin: register domain rules once and return field errors clients can rely onRegister a custom tag and a struct-level rule on Gin's validator, validate slice elements with dive and convert validator errors into a stable field-level JSON response.Read & check · 5 min
  8. Writing Gin middleware: what c.Next returns to, what Abort does not do, and typed request valuesWrite Gin middleware that runs code after c.Next, stops the chain with Abort and return, shares typed values through c.Set and c.Get, and is ordered so logs see the final outcome.Read & check · 5 min
  9. File uploads in Gin: cap the request, sniff the bytes and never let the client name the fileAccept a multipart upload in Gin with a hard size cap, decide its type from its content, generate the storage name yourself and test it with a request built by mime/multipart.Read & check · 5 min
  10. Server-rendered HTML in Gin: embed the templates, trust contextual escaping, cache assets on purposeRender html/template pages with c.HTML from templates parsed out of an embedded file system, serve embedded static assets with StaticFS and set cache headers per kind of asset.Read & check · 5 min
  11. 404, 405 and redirects in Gin: answer misses in your own format and pick redirect codes by what must surviveConfigure NoRoute, NoMethod and HandleMethodNotAllowed for consistent JSON 404 and 405 responses with a correct Allow header, and choose between 301, 302, 303, 307 and 308 for redirects.Read & check · 5 min
Gin in productionMiddleware, bounded input, authentication, CORS, rate limits, logging, timeouts, streaming, health, caching and shutdown.0/14completed
  1. Gin routing and middleware: follow the chain and stop it deliberatelyExplain route groups, middleware order and the difference between Abort and return.Read & check · 3 min
  2. Gin input: size limits, binding and business validation are separateReject oversized or invalid input before performing a business side effect.Read & check · 3 min
  3. Gin contexts and goroutines: extract a job, do not retain the responseGive background work a bounded owner without keeping a pooled Gin context alive.Read & check · 3 min
  4. Trusted proxies: forwarded headers are not proof of identityConfigure proxy trust explicitly and keep client IP separate from authentication.Read & check · 3 min
  5. Gin errors and tests: one response owner, explicit failure casesTest handler contracts through ServeHTTP without confusing recovery with rollback.Read & check · 3 min
  6. Gin in production: the http.Server owns budgets and shutdownConfigure native server timeouts and distinguish HTTP drain from worker completion.Read & check · 3 min
  7. Bearer authentication in Gin: verify once at the group boundary, hand handlers a typed principalWrite middleware that verifies an HMAC-signed bearer token, stores a typed principal and answers 401 or 403 for the right reasons.Read & check · 6 min
  8. CORS by hand in Gin: an exact origin allow-list, real preflights and Vary: OriginImplement CORS middleware that answers preflights, echoes only allow-listed origins, sets Vary correctly and is never mistaken for access control.Read & check · 5 min
  9. Rate limiting in Gin: a token bucket per identity, a bounded map and an honest Retry-AfterLimit each client with golang.org/x/time/rate, pick a key clients cannot forge, bound the limiter map and refuse with 429 and Retry-After.Read & check · 5 min
  10. Request IDs and access logs in Gin: log the route template and the ID, never the credentialAdd request-ID middleware and a structured slog access log that records low-cardinality routes, redacts credentials and can be tested byte for byte.Read & check · 5 min
  11. Request deadlines in Gin: one context budget, cooperative handlers, no writes from a second goroutineGive each request a deadline that downstream calls inherit, map its expiry to 504, and avoid the timeout patterns that race on the response.Read & check · 5 min
  12. Server-Sent Events in Gin: flush every event, send heartbeats, stop on the request contextStream SSE from a Gin handler that flushes events, sends heartbeats, ends when the client leaves and survives http.Server's WriteTimeout.Read & check · 5 min
  13. Health and metrics in Gin: simple liveness, budgeted readiness, counters keyed by route templateSeparate liveness from readiness, check dependencies within a short budget, and count requests by route template and status class.Read & check · 5 min
  14. Conditional GETs in Gin: strong ETags from response bytes, 304 Not Modified and safe Cache-ControlServe ETag and Last-Modified validators, answer conditional requests with 304, and choose Cache-Control so private data never lands in a shared cache.Read & check · 6 min
Gin project: a complete REST APILayout, dependencies, CRUD, pagination, problem details, idempotency keys, optimistic concurrency, API tests and startup.0/9completed
  1. Lay out a Gin service so every import points toward the domainOrganize a Gin API into cmd/api, httpapi, notes and store packages whose imports point toward the domain, with all concrete wiring in main.Read & check · 5 min
  2. Give Gin handlers their dependencies through a struct, not globals or context keysWrite handlers as methods on a struct built by a constructor, depend on small consumer-defined interfaces and swap in a fake store for tests.Read & check · 5 min
  3. Full CRUD on one resource: exact status codes, a Location header and PUT versus PATCHImplement create, read, replace, patch and delete for notes with correct status codes, a Location header and presence-aware PATCH fields.Read & check · 5 min
  4. Paginate with opaque cursors, a bounded limit and a total order; filter only through allow-listsServe stable pages of notes with keyset cursors, cap the page size and accept only allow-listed filter and sort parameters.Read & check · 5 min
  5. One error envelope: RFC 9457 problem details mapped from domain errors in one middlewareReturn application/problem+json for every failure by mapping a small domain error taxonomy to HTTP statuses in a single Gin middleware.Read & check · 5 min
  6. Make POST safe to retry with Idempotency-Key: fingerprint, reserve, replay and expireAdd Idempotency-Key handling to POST /notes so retries replay the original response, conflicting reuse is rejected and in-flight duplicates wait.Read & check · 5 min
  7. Stop lost updates with versions, ETag and If-Match: 428 when missing, 412 when staleVersion the notes resource, expose the version as an ETag and require If-Match on writes so a stale client cannot overwrite a newer edit.Read & check · 5 min
  8. Table-driven API tests through the real router: status, headers and JSON compared by meaningWrite table-driven tests that send requests through the real Gin router with fakes and assert status, contract headers and semantically compared JSON bodies.Read & check · 5 min
  9. Start from validated configuration and wire the whole service in one composition rootLoad and validate configuration from the environment, fail fast with every problem listed, and wire store, service, handlers, engine and http.Server with signal-driven shutdown.Read & check · 5 min
Gin and your dataRequest contexts, JSON Merge Patch, safe filters, batched includes, response caches, streaming import and export, async jobs and signed webhooks.0/9completed
  1. *gin.Context is a pooled struct, not your request context: pass c.Request.Context() to stores and goroutinesPredict what *gin.Context returns as a context.Context under each ContextWithFallback setting and give stores and background work a context that is actually canceled, or deliberately not.Read & check · 7 min
  2. PATCH with JSON Merge Patch in Gin: keep absent, null and value apart, then validate the merged resourceImplement an RFC 7396 merge-patch endpoint in Gin that distinguishes absent from null, enforces application/merge-patch+json with 415, and validates the merged result before storing it.Read & check · 6 min
  3. Gin list filters to parameterized SQL: parse strictly, bound IN lists, escape LIKE, end with a tiebreakerWrite a pure function that turns a Gin list request into SQL text and arguments, with allow-listed sorts, a placeholder for every value, escaped LIKE patterns, bounded IN lists and a unique tiebreaker.Read & check · 6 min
  4. ?include= without N+1 in Gin: one batched loader per relation, a bounded errgroup and list-order outputServe optional related data on a Gin list endpoint with one batched lookup per relation, bounded concurrent loads and deterministic output, and prove the query count by counting store calls.Read & check · 6 min
  5. Cache public GETs in Gin: key by route template, bypass identity, coalesce misses, invalidate on writeBuild a Gin middleware that caches public GET responses under a route-template key, never stores per-user responses, coalesces concurrent misses with singleflight and stays correct across writes, TTLs and conditional requests.Read & check · 7 min
  6. NDJSON imports in Gin: cap the body, decode one bounded line at a time, report each row by its line numberBuild an NDJSON import endpoint that bounds the body and each line, validates rows one at a time and returns a per-line report whose status matches what was written.Read & check · 7 min
  7. Streaming CSV exports in Gin: keyset pages, two flushes, formula-safe cells and an abort on late failureStream a large CSV from a Gin handler page by page with a safe download filename and formula-safe cells, and make a failure after the first byte visible to the client.Read & check · 8 min
  8. Long work behind 202 Accepted in Gin: a bounded queue, fixed workers, a job resource and an honest 503Accept slow work with 202 and a job Location, bound it with a queue and a fixed worker pool, refuse overload with 503 and Retry-After, and keep jobs running after the request ends.Read & check · 7 min
  9. Signed webhooks in Gin: verify the raw bytes, reject stale timestamps, dedupe event IDs, answer fastReceive signed webhooks in Gin by authenticating the raw body before binding, rejecting replays, deduplicating deliveries and choosing status codes that make the sender retry only when a retry can help.Read & check · 8 min
Gin in the wider systemUpstream clients, retries and circuit breakers, compression, ranged downloads, content negotiation, versioning, contract tests, admin endpoints, release builds and rolling deploys.0/10completed
  1. Upstream calls from Gin: one shared client, the request deadline, a bounded body and your own error codesCall an upstream HTTP API from a Gin handler through a shared, budgeted http.Client and map every failure to your own 404, 502 or 504 without leaking upstream details.Read & check · 7 min
  2. Retrying upstream calls from Gin: only when safe, jittered backoff, a retry budget and a circuit breakerWrap upstream calls in a retry policy that respects idempotency, Retry-After and a shared budget, and use a circuit breaker so Gin answers 503 quickly while a dependency is down.Read & check · 7 min
  3. Gzip in Gin by hand: negotiate q-values, wrap the writer, add Vary and know what never to compressWrite a gzip middleware for Gin that negotiates Accept-Encoding correctly and skips responses that must not be compressed, and accept gzip request bodies without a decompression-bomb hole.Read & check · 6 min
  4. File downloads in Gin: ServeContent for ranges and validators, a safe Content-Disposition, files opened by IDServe downloadable files from Gin with correct Range, If-Range, ETag and HEAD behavior, a Content-Disposition built by mime.FormatMediaType and file access confined to an os.Root.Read & check · 6 min
  5. Content negotiation in Gin: what NegotiateFormat really matches, 406 in your format and Vary: AcceptServe JSON, CSV and HTML from one Gin handler with q-value-aware negotiation, a 406 that lists what is available, Vary: Accept for caches and a ?format= override where URLs must name the representation.Read & check · 6 min
  6. API versions in Gin: one service under /v1 and /v2, an adapter per version, and a v1 that announces its sunsetServe two API versions from one service through per-version DTO adapters, mark v1 with Deprecation, Sunset and successor-version links, and test that v1 routes survive until the announced date.Read & check · 6 min
  7. Keep the OpenAPI document and the Gin router honest: diff routes, operations and status codes in a testWrite a test that converts engine.Routes() to OpenAPI path templates, reports routes and operations that exist on only one side, and checks recorded status codes against declared responses.Read & check · 5 min
  8. Debug endpoints in Gin: pprof and expvar on a separate admin engine and listener, never on the public routerMount net/http/pprof and expvar on an admin-only Gin engine behind a network and token guard, and prove with httptest that the public engine does not serve them.Read & check · 5 min
  9. Shipping a Gin binary: release mode, a /version endpoint from build info, static builds and a non-root imageBuild a Gin service for production with release mode, -trimpath, -ldflags -X and CGO_ENABLED=0, report its identity from runtime/debug build info, and package it in a minimal non-root image.Read & check · 6 min
  10. Surviving a rolling deploy in Gin: fail readiness, keep serving through a drain delay, then ShutdownImplement and test a SIGTERM sequence that flips readiness to 503, keeps serving while load balancers stop routing, disables keep-alives, and shuts the http.Server down within a grace period the platform honors.Read & check · 6 min

Blockchain

Hashes, Merkle proofs, signatures and RLP, then Ethereum RPC, fees, transactions, events and key custody.

Blockchain foundations in GoHash chains, Merkle proofs, signatures, addresses, account and UTXO ledgers, RLP, proof of work and fork choice.0/8completed
  1. Hash chains: every block commits to the exact bytes of the block before itLink blocks with SHA-256 over a canonical byte encoding, verify the chain from genesis and report the first link that breaks.Read & check · 5 min
  2. Merkle proofs: show one transaction is in a block with about log2(n) hashesBuild a domain-separated Merkle tree, generate and verify inclusion proofs, and explain the duplicate-leaf and second-preimage pitfalls.Read & check · 5 min
  3. secp256k1 signatures: sign a 32-byte digest, recover the signer and reject high-s twinsSign a Keccak-256 digest with go-ethereum's crypto package, recover and check the signer's address, and enforce the low-s rule on untrusted signatures.Read & check · 5 min
  4. Ethereum addresses: 20 bytes of Keccak-256, an EIP-55 checksum and strict input validationDerive an address from a public key, produce and check EIP-55 checksums, and validate user-supplied addresses, including the zero address.Read & check · 5 min
  5. Account model versus UTXO: two ledgers and two ways to stop a double spendImplement minimal UTXO and account ledgers in Go, reject double spends in each, and explain what each model makes easy or hard for an indexer.Read & check · 5 min
  6. RLP: Ethereum's canonical encoding, and why its decoder rejects every other spellingEncode and decode Go structs with go-ethereum's rlp package, recognize the canonical-form rules, and bound untrusted input before decoding it.Read & check · 5 min
  7. Proof of work: finding a nonce takes thousands of hashes, checking it takes oneMine a toy block against a big.Int target, verify it with one hash, compute its expected work and retarget from observed block times.Read & check · 5 min
  8. Fork choice and reorgs: follow the heaviest chain and undo what the old branch indexedImplement a heaviest-chain fork-choice rule, compute a reorganization's undo and apply path, apply confirmation depth, and use Ethereum's safe and finalized tags.Read & check · 5 min
Blockchain infrastructurePackage roles, RPC, exact units, ABI, nonces, key custody, reorg-safe indexing, fees, raw transactions, receipts, message signing and providers.0/12completed
  1. Go in blockchain: choose packages by the protocol and the jobDistinguish RPC applications, transaction tooling and consensus/application frameworks.Read & check · 3 min
  2. Ethereum RPC: verify the chain and bound every operationUse an explicit RPC client, operation deadline and expected chain identity.Read & check · 3 min
  3. Token amounts: parse exact base units without float64Convert validated decimal text to bounded integer base units with an explicit scale.Read & check · 3 min
  4. Contract ABI: encoding is not permission and eth_call is not a transactionDistinguish ABI packing, read simulation, signed transactions and deployment identity.Read & check · 3 min
  5. Nonces, fees and unknown outcomes: one durable owner per accountCoordinate transaction intent and account nonce allocation before retrying a send.Read & check · 3 min
  6. Signing policy: bind the chain and keep key custody separateValidate transaction intent before delegating signing to an explicitly owned key service.Read & check · 3 min
  7. Index events through disconnects and reorgs, not just the happy subscriptionPersist canonical checkpoints and reconcile removed or missing events before final effects.Read & check · 3 min
  8. EIP-1559 fees: compute the effective gas price exactly and refuse to sign above a ceilingDerive maxFeePerGas and maxPriorityFeePerGas with big.Int, predict the effective gas price for any base fee and enforce a fee ceiling before signing.Read & check · 6 min
  9. Raw transactions offline: sign, encode, decode and recover the sender before anything is broadcastSign a typed transaction with a test key, round-trip its raw bytes, recover the sender and use the precomputed hash to make retries safe.Read & check · 5 min
  10. Receipts and logs: decode ERC-20 transfers from the right contract and reverse them on reorgInterpret receipt status and gas, decode an ERC-20 Transfer log with accounts/abi, and reject impostor or removed logs before crediting a balance.Read & check · 5 min
  11. Signed messages and Sign-In with Ethereum: recover the right address and refuse replaysVerify an EIP-191 personal signature, normalize its V byte, and accept an EIP-4361 sign-in only for this domain, chain and expiry with an unused server nonce.Read & check · 5 min
  12. Several RPC providers: pin reads to one block hash, outvote a lagging or lying node, retry within boundsPin multi-provider reads to an agreed block hash, quarantine providers that disagree or lag, and fail over with bounded retries and backoff.Read & check · 5 min

Security

Authorization, injection, XSS, CSRF, sessions, secrets, encryption, tokens, fuzzing and supply chain.

Service security foundationsAuthentication and authorization, cryptographic purposes, controlled egress and TLS peer identity.0/4completed
  1. Authentication and authorization: a verified token is only the beginningValidate identity separately from permission to act on a particular resource.Read & check · 3 min
  2. Passwords, MACs and randomness solve different problemsChoose purpose-specific primitives and bound their cost instead of inventing cryptography.Read & check · 3 min
  3. SSRF: let user input choose data, not an arbitrary network destinationKeep outbound destinations controlled and validate redirects and connection-time policy.Read & check · 3 min
  4. TLS: verify the peer instead of disabling the errorKeep certificate-chain and hostname verification while making trust and rotation explicit.Read & check · 3 min
Web application securitySQL injection, XSS, CSRF, session cookies, path traversal, command injection, open redirects and security headers.0/8completed
  1. SQL injection: the query text and the user's values must reach the driver separatelySend untrusted values as database/sql arguments, pick identifiers from allow-lists in code and escape LIKE wildcards with an explicit ESCAPE clause.Read & check · 6 min
  2. html/template escapes by context, and template.HTML is where that protection switches offRender untrusted data with html/template, read its context-specific escaping and treat every typed-content conversion as a reviewed trust decision.Read & check · 6 min
  3. CSRF: reject cross-origin writes with Sec-Fetch-Site and http.CrossOriginProtectionProtect cookie-authenticated endpoints with net/http's CrossOriginProtection, know what SameSite cookies add and recognize when a synchronizer token is still required.Read & check · 5 min
  4. Session cookies: lock down the attributes and keep the session's lifetime on the serverIssue a __Host- session cookie with the right attributes, rotate the ID at login and enforce idle, absolute and logout expiry in a server-side store.Read & check · 5 min
  5. Path traversal: confine file access with os.Root, because Join and Clean only edit stringsOpen user-named files through os.Root, use filepath.IsLocal and Localize for early rejection and extract archives without zip-slip.Read & check · 5 min
  6. Command injection: run tools without a shell and keep user input out of option positionStart external tools with exec.CommandContext and a fixed argv, block argument injection with validation and --, and bound the child's time and environment.Read & check · 5 min
  7. Open redirects: accept a single-slash path or an allow-listed host, not any URL that parsesValidate redirect targets so only same-site paths and allow-listed https URLs pass, including the //host, backslash and userinfo tricks that browsers and net/url read differently.Read & check · 4 min
  8. Security headers: a per-request CSP nonce, HSTS, nosniff, frame-ancestors and Referrer-PolicyWrite middleware that sets a nonce-based Content-Security-Policy and the other baseline security headers, and roll them out without breaking pages or locking in HSTS preload by accident.Read & check · 5 min
Secrets, cryptography and supply chainRedaction, constant-time checks, AEAD encryption, password storage, token design, fuzzing and dependency hygiene.0/7completed
  1. Keep secrets out of logs and errors with a type that refuses to print itselfWrap credentials in a Secret type that redacts itself in fmt, slog and JSON, redact credentials in URLs, and load secrets with errors that name the source but never the value.Read & check · 6 min
  2. Compare secrets in constant time: an early return reveals how much of a guess was rightRecognize timing-dependent comparisons and replace them with crypto/subtle or hmac.Equal over fixed-size digests, including the lookup and error paths around them.Read & check · 5 min
  3. Encrypt records with AES-GCM: random nonces, a key ID, and the record ID as additional dataSeal application records with AES-GCM so that tampering, row swapping and key rotation are handled explicitly, and explain why a repeated nonce breaks GCM.Read & check · 5 min
  4. Store passwords with argon2id: encoded parameters, rehash on login, one answer for every failureHash passwords with argon2id in a self-describing PHC-style string, upgrade parameters at login, handle bcrypt's 72-byte limit and keep login failures indistinguishable.Read & check · 5 min
  5. Design tokens deliberately: hashed opaque tokens, strictly verified signed tokens, expiry and rotationChoose between opaque and signed tokens, store opaque tokens as hashes with rotation and reuse detection, and verify HMAC-signed JWTs with a pinned algorithm and checked claims.Read & check · 5 min
  6. Fuzz the parsers that read untrusted bytes, and bound what they may allocate or inflateWrite a native Go fuzz test with seed inputs and real invariants for a binary parser, harden the parser against what it finds, and cap decompressed size with io.LimitReader.Read & check · 5 min
  7. Secure the Go supply chain: reachable vulnerabilities, verified modules, pinned tools, auditable binariesRun govulncheck in CI, rely on go.sum and the checksum database correctly, pin tools with tool directives, build with -trimpath, and audit a binary's embedded build information.Read & check · 6 min

Game development

Game loops, Ebitengine structure, input, physics, collisions, pathfinding, procedural worlds and multiplayer.

Game loop, input and physicsFixed timesteps, Ebitengine structure, vectors, input actions, state machines, components, collisions and spatial hashing.0/8completed
  1. Fix the timestep: an accumulator turns uneven frames into identical simulation stepsAdvance a simulation in fixed steps from variable frame times, draw it with an interpolation factor and cap catch-up work after a stall.Read & check · 6 min
  2. Ebitengine's Game interface: Update advances ticks, Draw only reads, Layout fixes the screenStructure an Ebitengine game so every state change happens in Update, Draw is a read-only view, and the rules run headless in tests.Read & check · 6 min
  3. A 2D vector value type: normalized input, acceleration and drag in per-tick unitsWrite a small value-semantics vector type and move a body with normalized input, per-tick acceleration and drag that behave the same on every display.Read & check · 5 min
  4. Input as actions: edge detection, jump buffering and coyote time in a tick-exact simulationMap physical keys to actions, detect presses on the action level, and implement jump buffering and coyote time as tick counters that can be tested deterministically.Read & check · 6 min
  5. Scenes and enemy behavior as explicit state machines instead of boolean flagsRun title, playing, paused and game-over scenes through a scene interface and a transition stack, and drive an enemy with a single-mode behavior machine.Read & check · 5 min
  6. Entities as IDs, components in dense generic stores, systems as plain loopsBuild a minimal entity-component store with generics, run systems over dense slices, remove with swap-delete, and judge when plain structs are the better design.Read & check · 5 min
  7. AABB and circle collisions: detect overlap, push out along the shallow axis, sweep fast moversTest boxes and circles for overlap, compute the minimum push that separates them, and stop fast objects from tunneling with sub-steps or a swept test.Read & check · 5 min
  8. A spatial hash for the broad phase: bucket by cell, query neighbors, check each pair onceBuild a uniform-grid spatial hash, insert objects by bounding box, query neighbors with deduplication, and count pair checks against the naive all-pairs loop.Read & check · 5 min
Worlds, AI and multiplayerTilemaps and cameras, A* pathfinding, seeded generation, tweens, save files, authoritative servers, prediction and frame budgets.0/8completed
  1. A camera is a coordinate transform: follow the target, clamp to the map, draw only visible tilesConvert between tile, world and screen coordinates, keep a following camera inside the map and compute the exact range of tiles to draw.Read & check · 6 min
  2. A* on a grid: a heap, a heuristic that matches the moves, and tie-breaking you can replayImplement grid A* with container/heap, choose a heuristic that matches the movement rules, make equal-cost choices deterministic and decide when a flow field beats per-unit searches.Read & check · 7 min
  3. Reproducible worlds: one seed, one random stream per system, and no global randGenerate a seeded cave with a math/rand/v2 PCG source, keep each system on its own derived stream and explain why global or shared randomness breaks replays.Read & check · 5 min
  4. Tweens and sprite frames advance with the simulation tick, not the wall clockDrive easing curves, chained and retargeted tweens and sprite animation clips from tick counts so motion is deterministic, pausable and free of jumps.Read & check · 5 min
  5. Save files are untrusted input: version them, migrate forward, validate and write atomicallyDesign a versioned JSON save format, migrate v1 saves to v2, reject unknown fields and out-of-range values, and replace a save file without ever leaving it half-written.Read & check · 6 min
  6. An authoritative server owns the world in one goroutine and accepts only validated intentBuild a server tick loop in which one goroutine owns all game state, clients send inputs over channels, movement is validated against speed and rate limits, and snapshots are copies in a deterministic order.Read & check · 6 min
  7. Client prediction replays unacknowledged inputs; remote players are interpolated from the pastHide round-trip latency by predicting local movement, reconcile with acknowledged server snapshots by replaying pending inputs, and draw remote players by interpolating a snapshot buffer.Read & check · 5 min
  8. A 16.6 ms frame budget: measure allocations per update and make the steady state allocate nothingTurn refresh rates into frame budgets, count allocations per update with testing.AllocsPerRun, remove per-frame slices, maps, closures and strings, and profile a game loop with pprof and execution traces.Read & check · 7 min

SQLite with Go

database/sql and drivers, pragmas, types and keys, transactions, WAL and locking, UPSERT, JSON, FTS5, query plans, migrations and a tested repository.

SQLite from Go: connections, drivers and typesdatabase/sql and lazy opens, drivers and DSN pragmas, :memory: and the pool, type affinity and STRICT tables, rowid keys, NULLs, time values and foreign keys.0/7completed
  1. Open a SQLite database from Go: database/sql, a driver and a fileOpen a file database through database/sql, see that sql.Open connects lazily, and run Exec, Query and QueryRow with placeholders and complete error handling.Read & check · 5 min
  2. Choose a SQLite driver and configure every connection through the DSNCompare modernc.org/sqlite, mattn/go-sqlite3 and ncruces/go-sqlite3, and use DSN parameters so that every pooled connection gets the same pragmas and transaction mode.Read & check · 4 min
  3. :memory: is per connection: the pool, SetMaxOpenConns(1), memdb and shared cacheExplain why an in-memory database vanishes between pooled connections and choose between a single connection, the memdb VFS, shared cache and a temporary file.Read & check · 3 min
  4. Type affinity, dynamic typing and STRICT tablesPredict the storage class SQLite gives each value from a column's declared type, see what Go receives when scanning into any, and use STRICT tables to reject values that do not fit.Read & check · 3 min
  5. INTEGER PRIMARY KEY, rowid, AUTOINCREMENT and WITHOUT ROWIDRecognize when a primary key is an alias for the rowid, decide whether AUTOINCREMENT is worth its cost, and know when a WITHOUT ROWID table fits.Read & check · 4 min
  6. NULLs and time values: sql.Null, pointers, COALESCE and a time format you chooseScan nullable columns with sql.NullString, sql.Null[T] and pointers, write NULL-aware SQL, and store times in a format that sorts and that SQLite's date functions understand.Read & check · 3 min
  7. Foreign keys are off until each connection turns them onShow that REFERENCES clauses are not enforced by default, enable enforcement for every connection through the DSN, use ON DELETE CASCADE and find existing violations with foreign_key_check.Read & check · 3 min
Transactions, concurrency and queriesTransactions and RETURNING, UPSERT, WAL and busy_timeout, BEGIN IMMEDIATE, JSON functions, window functions and CTEs, and query plans.0/7completed
  1. Transactions and RETURNING: all-or-nothing changes that hand back what they wroteGroup related writes in a database/sql transaction that always rolls back on failure, read generated values with RETURNING, and classify a constraint failure by its extended SQLite result code.Read & check · 4 min
  2. UPSERT with ON CONFLICT: counters, insert-if-absent and why INSERT OR REPLACE deletes rowsWrite ON CONFLICT DO UPDATE and DO NOTHING statements that use excluded values and RETURNING, and explain why INSERT OR REPLACE changes rowids and fires cascading deletes.Read & check · 4 min
  3. WAL mode, synchronous and busy_timeout: readers that never wait and writers that queueSwitch a database to write-ahead logging, explain which settings persist in the file and which are per connection, and turn SQLITE_BUSY into a bounded wait with busy_timeout.Read & check · 4 min
  4. BEGIN IMMEDIATE and one writer: avoid SQLITE_BUSY_SNAPSHOT that no timeout can fixExplain why a deferred transaction that reads and then writes can fail with SQLITE_BUSY_SNAPSHOT regardless of busy_timeout, and prevent it with BEGIN IMMEDIATE through _txlock and a single-writer pool.Read & check · 4 min
  5. JSON in SQLite: json_extract, -> and ->>, json_each and indexed generated columnsStore JSON documents with a validity check, query paths with json_extract, -> and ->>, expand arrays with json_each and index a field through a generated column.Read & check · 4 min
  6. Window functions and CTEs: running totals, top N per group and recursive queriesCompute running totals, differences and shares with window functions, select the top rows per group with row_number, and walk series and trees with recursive common table expressions.Read & check · 4 min
  7. Read EXPLAIN QUERY PLAN: SCAN, SEARCH, covering indexes, sorts and ANALYZERead EXPLAIN QUERY PLAN output from Go, add indexes that turn scans into searches and remove temporary sorts, use expression indexes for computed filters, and keep statistics fresh with ANALYZE and PRAGMA optimize.Read & check · 5 min
SQLite project: a tested notes repositoryMigrations with user_version, FTS5 search, backups and maintenance, tests with temporary databases, and a complete notes repository.0/5completed
  1. Migrate a schema with PRAGMA user_version: ordered steps, one transaction eachApply append-only migrations that record their version in PRAGMA user_version inside the same transaction, skip applied steps, roll back a failing step and refuse a newer schema.Read & check · 4 min
  2. Full-text search with FTS5: an external-content index, ranking and safe queriesIndex a table with an external-content FTS5 table kept in sync by triggers, query it with prefixes, phrases, operators and column filters, rank with bm25, and quote user input.Read & check · 4 min
  3. Back up and maintain a live database: VACUUM INTO, checkpoints, VACUUM and ANALYZETake a consistent backup of a WAL database with VACUUM INTO, verify the copy, reclaim free pages, truncate the WAL with a checkpoint and keep planner statistics current.Read & check · 4 min
  4. Test against real SQLite: a fresh migrated database file per testWrite a test helper that opens a migrated file database in t.TempDir, registers cleanup, and lets table-driven and parallel tests run against isolated databases.Read & check · 4 min
  5. Project: a tested notes repository with migrations, transactions and full-text searchBuild a small notes store on SQLite that migrates itself, writes in IMMEDIATE transactions with RETURNING and optimistic versions, cascades tags, and searches with FTS5, with a check for every behaviour.Read & check · 5 min

Kubernetes for Go developers

The control plane, Pods and Deployments, rollouts and probes, Services, Ingress and NetworkPolicy, configuration and RBAC, autoscaling and debugging, practised in a simulated cluster.

Kubernetes foundations: the cluster and kubectlControl plane and nodes, kubeconfig contexts and namespaces, the anatomy of an object, Pods, labels and selectors, declarative apply and kustomize.0/6completed
  1. How a cluster works: control plane, nodes and reconciliation loopsName the control-plane and node components, trace a kubectl apply from the API request to a running container, and inspect the nodes and system pods of a kind cluster.Read & check · 6 min
  2. kubeconfig, contexts and namespaces: know where every kubectl command goesRead a kubeconfig, list, create and switch contexts, set a default namespace, and use -n, -A and explicit contexts so that commands reach the cluster and namespace you intend.Read & check · 6 min
  3. Anatomy of an object: apiVersion, kind, metadata, spec and statusWrite a manifest from scratch or from a dry-run scaffold, tell spec from status, choose between labels and annotations, look fields up with kubectl explain, read live state with jsonpath and recognise strict validation errors.Read & check · 6 min
  4. Pods: shared containers, phases, container states and restart policyRun and inspect pods, tell the pod phase from container states and the STATUS column, choose a restartPolicy, use logs and exec, and explain why controllers rather than people should create pods.Read & check · 6 min
  5. Labels and selectors: how controllers and Services find their podsLabel objects, query them with equality-based and set-based selectors, explain how ReplicaSets and Services choose pods by label, and predict what relabelling a pod does.Read & check · 6 min
  6. Declarative configuration with kubectl apply, manifest directories and kustomizeManage objects from version-controlled manifests with kubectl apply, interpret created, configured and unchanged, apply and delete whole directories, and produce per-environment variants with kustomize.Read & check · 6 min
Workloads: Deployments, rollouts and jobsReplicaSets and self-healing, rolling updates and rollbacks, probes, requests and limits, scheduling, StatefulSets, DaemonSets, Jobs and CronJobs.0/7completed
  1. Deployments, ReplicaSets and Pods: the controller chain behind every replicaCreate a Deployment, trace its ReplicaSet and Pods through labels and owner references, read the READY, UP-TO-DATE and AVAILABLE columns, and watch the controllers scale and replace Pods.Read & check · 5 min
  2. Rolling updates: maxSurge, maxUnavailable, rollout history, undo and stalled rolloutsConfigure a Deployment's update strategy, predict how many Pods exist during a rollout, follow and steer it with kubectl rollout, and recover from a release that never becomes ready.Read & check · 5 min
  3. Readiness, liveness and startup probes: routing traffic and restarting stuck containersChoose the right probe for each question, configure its timing, implement /readyz and /healthz handlers in a Go service, and avoid the probe settings that cause outages.Read & check · 5 min
  4. Resource requests and limits, CPU throttling, OOMKills and QoS classesSet requests and limits deliberately, predict how the scheduler and the kernel use them, recognise CPU throttling and OOMKilled containers, and know which QoS class each workload gets.Read & check · 5 min
  5. Scheduling: node selection, affinity, taints and tolerations, spreading and draining nodesExplain how the scheduler filters and scores nodes, steer Pods with nodeSelector and affinity, keep them off nodes with taints, and read FailedScheduling messages after a cordon, a drain or a bad constraint.Read & check · 6 min
  6. StatefulSets for stable identity and storage, DaemonSets for one Pod per nodeRun a StatefulSet with a headless Service and volumeClaimTemplates, predict its ordering and storage behaviour, and run a DaemonSet that covers every node, tainted ones included.Read & check · 5 min
  7. Jobs and CronJobs: batch work with retries, deadlines and schedulesRun Jobs with completions, parallelism, backoffLimit and activeDeadlineSeconds, schedule them with CronJobs and a concurrency policy, trigger a run by hand, and write batch code that is safe to retry.Read & check · 5 min
Networking: Services, DNS, Ingress and policiesClusterIP, NodePort and LoadBalancer Services, endpoints and targetPort, cluster DNS, Ingress routing, NetworkPolicies and end-to-end traffic debugging.0/6completed
  1. Services: a stable virtual IP and DNS name in front of changing podsExpose a Deployment through a ClusterIP Service, trace a request from selector to endpoints to targetPort, and fix a wrong targetPort and a selector that matches no pods.Read & check · 6 min
  2. Service types: NodePort, LoadBalancer, ExternalName and headless ServicesPick the right Service type for each job, reach a NodePort and a LoadBalancer from outside the cluster, and explain what externalTrafficPolicy changes.Read & check · 5 min
  3. Cluster DNS: CoreDNS, service names, search domains and ndotsResolve Services and StatefulSet pods by short and fully qualified names across namespaces, explain the extra lookups that ndots:5 causes, and debug name resolution from inside a pod.Read & check · 6 min
  4. Ingress: route HTTP by host and path through an ingress controllerWrite an Ingress with host and path rules for an IngressClass, route two Services behind one entry point, and tell a controller 404 from a controller 503.Read & check · 6 min
  5. NetworkPolicies: default deny and label-based allow-lists for pod trafficIsolate pods with NetworkPolicies, allow traffic by pod label, namespace and IP block, build a default-deny baseline that keeps DNS working, and verify enforcement from a client pod.Read & check · 6 min
  6. Debugging traffic end to end: latency, saturation, errors and rollbacksFollow a request from client to container port, read latency, saturation and error signals under load, and fix an overloaded Service and a bad release with scaling and kubectl rollout undo.Read & check · 6 min
Configuration, secrets, storage and accessConfigMaps and Secrets as environment and files, PersistentVolumeClaims and StorageClasses, namespaces and quotas, ServiceAccounts and RBAC.0/5completed
  1. ConfigMaps: settings for pods through env, envFrom and mounted filesStore non-secret settings in a ConfigMap, consume them as environment variables or files, diagnose a missing ConfigMap or key, and roll pods so that they pick up a change.Read & check · 6 min
  2. Secrets: credentials for pods, and why base64 is not protectionCreate Secrets from literals or stringData, deliver them as variables or files, and name the controls that actually keep them confidential: RBAC, encryption at rest, external managers and careful logging.Read & check · 6 min
  3. Volumes and persistent storage: emptyDir, PersistentVolumeClaims and StorageClassesChoose between ephemeral and persistent volumes, request storage with a PersistentVolumeClaim, read binding and provisioning status, and diagnose a pod stuck Pending on its claim.Read & check · 5 min
  4. Namespaces, ResourceQuotas and LimitRanges: dividing one cluster between teamsUse namespaces to scope names, access and policy, tell which objects are cluster-wide, cap a team's consumption with ResourceQuota and LimitRange, and delete a namespace knowing what goes with it.Read & check · 5 min
  5. RBAC: ServiceAccounts, Roles and bindings for least-privilege API accessTell authentication from authorization, grant a ServiceAccount exactly the verbs it needs with a Role and RoleBinding, verify the result with kubectl auth can-i, and call the API from Go with the pod's own identity.Read & check · 6 min
Operating, scaling and debuggingA triage method for broken pods, autoscaling under load, node failures and drains, kustomize and Helm, client-go controllers and a production checklist.0/6completed
  1. Debug failing pods: get, describe, logs, exec and events in orderFind out why a pod is not working by reading its STATUS, the Events in describe, the current and previous logs, the container from inside and the namespace events, and fix the most common failures.Read & check · 5 min
  2. Autoscale pods on CPU with the HorizontalPodAutoscaler, VPA and cluster autoscalerCreate an autoscaling/v2 HorizontalPodAutoscaler on CPU utilization, predict its replica count from the formula, tune how fast it scales up and down, and place the Vertical Pod Autoscaler and the cluster autoscaler next to it.Read & check · 6 min
  3. When a node dies: NotReady, eviction, PodDisruptionBudgets and safe drainsExplain the timeline from a lost node to rescheduled pods, protect planned maintenance with a PodDisruptionBudget, drain a node safely, and spread replicas so that one node or zone cannot take a service down.Read & check · 6 min
  4. Package manifests per environment with Kustomize overlays, Helm charts and GitOpsBuild per-environment manifests from a shared base with Kustomize transformers and kubectl apply -k, explain Helm charts, values and releases, and choose between them and a GitOps controller.Read & check · 6 min
  5. Talk to the Kubernetes API from Go with client-go, informers and workqueuesBuild a clientset from in-cluster or kubeconfig credentials, watch objects through a shared informer and lister, reconcile keys from a rate-limited workqueue, and shut a Go service down cleanly on SIGTERM.Read & check · 7 min
  6. A production checklist for Deployments, applied to gopherforge/web:v2 in the labReview a Deployment against a production checklist and write one that pins its image, sizes its resources, probes its health, survives disruptions, runs with least privilege and shuts down cleanly.Read & check · 6 min

Drones with Go

MAVLink and telemetry, PID and cascaded control, Kalman filters, missions and failsafes, rangefinders, obstacle avoidance, maps and precision landing, then links, logs, preflight checks, Remote ID and fleet operations, flown in a simulator.

Drone software: architecture, MAVLink and telemetryFlight controller, companion computer and ground station, MAVLink v2 frames and checksums, telemetry rates and stale data, WGS84, ENU and NED, a Go ground station and sensor noise.0/6completed
  1. Drone software architecture: flight controller, companion computer, ground station and fleet backendPlace each piece of drone software on the right computer, explain why the inner control loops stay in real-time firmware, and fly a first simulated take-off, hold and landing from Go.Read & check · 6 min
  2. MAVLink v2 frames: header, truncated payload, CRC_EXTRA and signingEncode and decode a MAVLink v2 HEARTBEAT in pure Go with encoding/binary, compute the CRC-16/MCRF4XX checksum seeded with CRC_EXTRA, and watch corruption and mismatched definitions get rejected.Read & check · 5 min
  3. Telemetry streams: message rates, GLOBAL_POSITION_INT and stale-data detectionDecode a recorded MAVLink stream, measure per-message rates and gaps on the ground station's clock, interpret GLOBAL_POSITION_INT's scaled integers, and flag stale streams and a lost link.Read & check · 5 min
  4. Coordinates for drones: WGS84, ENU and NED, haversine and local tangent planesConvert mission waypoints between WGS84 latitude and longitude and local metres, compute great-circle distance and bearing, and know where the flat-plane approximation and spherical formulas stop being good enough.Read & check · 5 min
  5. A ground station in Go: reader goroutine, heartbeat, context and link-loss timeoutsStructure a MAVLink ground station with a reader goroutine, a periodic heartbeat, a channel of decoded frames, a select loop with a resettable link-loss timer and a context that shuts everything down cleanly.Read & check · 6 min
  6. Sensors and noise: GPS, barometer and IMU, truth against measurement, RMSE and biasCompare simulated telemetry with the true state over a flight, compute bias and RMSE per sensor, and explain why smoothing one sensor fails and sensor fusion is needed.Read & check · 6 min
Flight control: PID, cascades, filters and loopsPID altitude control and anti-windup, cascaded position and velocity loops, complementary and Kalman filters, fixed-rate loops in Go, quad X motor mixing and flight modes as a state machine.0/7completed
  1. PID altitude control: P, I and D on the collective thrustClose an altitude loop through SetThrust with a PID controller that takes its derivative from the measurement, clamps its integral and saturates its output, and judge each variant by rise time, overshoot, settling time and steady-state error.Read & check · 5 min
  2. Cascaded control: a position loop on top of a velocity loopBuild an outer position loop that sends velocity setpoints through SetVelocity, explain why inner loops must be faster and where the integrator belongs, and compare P, PI and velocity feedforward when holding a point in wind and following a moving target.Read & check · 6 min
  3. Complementary filter: fusing a fast drifting signal with a slow noisy oneEstimate altitude by integrating a biased vertical velocity at 50 Hz and correcting it with the 5 Hz barometer, choose the time constant tau and alpha = tau / (tau + dt), and measure the result as RMSE against the true altitude.Read & check · 5 min
  4. A Kalman filter for altitude and climb rateWrite a 1-D constant-velocity Kalman filter that fuses GPS altitude, barometer and a climb-rate measurement, follow its state, covariance, predict and update steps, tune process and measurement noise, and reject outliers with an innovation gate that cannot lock out the truth.Read & check · 6 min
  5. Fixed-rate loops in Go: tickers, jitter, GC and allocationsRun a supervisory control loop at a fixed rate with time.Ticker, understand dropped ticks, jitter and the monotonic clock, keep allocations out of the loop body and prove it with testing.AllocsPerRun, and decide what belongs in firmware instead.Read & check · 5 min
  6. Motor mixing for a quad X: thrust and torques to four motorsMap collective thrust and roll, pitch and yaw torque commands to four motor outputs with PX4's Quadrotor X numbering and spin directions, and handle saturation by giving up thrust and yaw before roll and pitch.Read & check · 5 min
  7. Flight modes as an explicit state machineModel flight modes as states, events and guarded transitions in a table, reject invalid requests with reasons, run pre-arm checks for battery, GPS fix and geofence, map the states onto the simulator's modes and log every transition.Read & check · 5 min
Missions, safety and fleetsWaypoint missions and the MAVLink mission protocol, geofences, failsafes and energy budgets, A* around no-fly zones, fleets with goroutines, and seeded scenario tests.0/6completed
  1. Waypoint missions: mission items, the MAVLink upload protocol and a survey patternModel a mission as numbered MAVLink-style items with acceptance radii and hold times, explain how MISSION_COUNT, MISSION_REQUEST_INT, MISSION_ITEM_INT and MISSION_ACK move it to the vehicle with retries, and generate and fly a lawnmower survey.Read & check · 6 min
  2. Geofencing: inclusion and exclusion polygons, ray casting and predicting a breachImplement point-in-polygon with an explicit boundary rule, combine inclusion zones, exclusion zones and a ceiling, predict the time to the boundary from velocity, and compare a reactive fence with a predictive guard in the simulator.Read & check · 6 min
  3. Failsafes: battery energy budgets, link-loss timeouts and which action winsExplain state of charge and voltage sag, estimate the charge needed to fly home against the wind with a reserve, compare that budget with fixed battery thresholds in the simulator, and design link-loss timeouts and failsafe priorities.Read & check · 7 min
  4. Path planning around no-fly zones: A*, line-of-sight pruning and replanningRasterize no-fly zones into an inflated grid, find the shortest path with A* and the admissible octile heuristic, prune it to a few waypoints by line of sight, fly it in the simulator and replan when a new restriction appears.Read & check · 5 min
  5. Fleets from Go: a goroutine per vehicle, telemetry fan-in and separationStructure a multi-vehicle ground station with one goroutine per vehicle, fan telemetry into a supervisor over channels, stop everything with context cancellation and monitor pairwise separation with altitude layers, while keeping the simulation deterministic.Read & check · 5 min
  6. Testing drone software: seeded scenarios, invariants, SITL, HIL and CIBuild a deterministic, table-driven scenario matrix for a mission, check safety invariants and expected outcomes on every run, and place it in a test pyramid with software in the loop, hardware in the loop and continuous integration.Read & check · 6 min
Autonomy: rangefinders, maps, avoidance and precision landingRangefinders and lidar scans, reactive avoidance and braking distance, potential fields and gap following, orbiting a structure, occupancy grids, planning in configuration space, behaviour trees, beacon landing and flying without GPS.0/10completed
  1. Rangefinders and lidar scans: rays, maximum range, noise and what a horizontal scan missesModel a rangefinder as a ray with a maximum range and noise, turn a lidar scan into clustered obstacle points in local coordinates, reject dropouts and spurious returns with a median, pack the result as MAVLink OBSTACLE_DISTANCE, and name what a horizontal scan cannot see.Read & check · 7 min
  2. Reactive avoidance: corridors, slow-down zones and stop-and-sidestepCheck the corridor a drone sweeps instead of a single ray, limit speed in proportion to the free distance with a gain that is provably safe for a measured reaction time and braking, and get past a building with stop-and-sidestep, without a map.Read & check · 6 min
  3. Potential fields: attraction, repulsion from a scan, and the local-minimum trapBuild an artificial potential field from a goal and rangefinder readings, fly its negative gradient as a velocity command, watch it stall inside a U-shaped obstacle, detect the stall, and escape by wall following, with an honest account of what fields cannot guarantee.Read & check · 6 min
  4. Gap following with a polar histogram: VFH-style sectors, widening and heading choiceBin a lidar scan into a polar histogram, threshold it with hysteresis into blocked and free sectors, widen every reading by the vehicle radius, choose the free direction with a VFH+ style cost, smooth heading and speed, and fly through a cluttered field.Read & check · 7 min
  5. Inspecting a structure: a constant-standoff orbit from rangefinder feedbackOrbit a mast at a constant distance from its surface with a radial PI loop on the rangefinder and a tangential speed, count laps, and compare per-lap standoff statistics with a GPS-only orbit around a mapped position that is a few metres off.Read & check · 6 min
  6. Occupancy grids from rangefinder scans: log-odds, Bresenham rays and clampingBuild a 2D occupancy grid in local metres from rangefinder scans: add log-odds evidence along each beam traced with Bresenham's line, mark nothing for readings without a return, clamp every cell so the map can change, and compare the built map with the true obstacles after a survey flight.Read & check · 7 min
  7. Configuration space: inflating your own map, deciding about unknown cells and flying the planTurn a self-built occupancy grid into a configuration space by growing occupied cells by the airframe radius, a margin and half a cell, decide whether unknown cells count as free or blocked, plan on the result with A*, fly the plan and check the clearance with the rangefinder.Read & check · 6 min
  8. Behaviour trees for autonomy: sequences, fallbacks, conditions and actions ticked every stepBuild a behaviour tree from Sequence, Fallback, Condition and Action nodes that return Success, Failure or Running, tick it at 10 Hz to fly 'inspect then return; on low battery return; on obstacle hold', trace its ticks deterministically and compare it with the flight-modes lesson's state machine.Read & check · 7 min
  9. Precision landing on a beacon: centring while descending, gates, aborts and retriesCompare a GPS-only landing on a pad with a beacon-guided one in gusty wind: centre on the beacon's offset with a PI loop, descend only inside a gate that narrows with height, abort and climb back when the pad is out of view or the error jumps near the ground, and cap the retries.Read & check · 6 min
  10. Flying without GPS: frozen telemetry, drift, the landing failsafe and your own policyDetect a GPS outage at the ground station from the fix flag and repeated positions rather than message age, measure how far a drone drifts in wind when its autopilot can only keep level, watch the 'no GPS for 3 s: landing' failsafe act, and compare hold, land and climb policies in an urban canyon with the failsafe on and off.Read & check · 6 min
Operations: links, logs, rules and fleets in serviceRadio range and link loss, flight logs and anomaly rules, energy planning, preflight checks as code, Remote ID, strategic deconfliction, a fleet backend, property-based flight tests and incident analysis.0/9completed
  1. Radio links in operations: tested range, what the station sees, the failsafe timeline and marginsTreat the radio link as a measured range around home, show what a ground station sees while reports stop arriving, follow the link-loss failsafe second by second, predict where the vehicle reappears, and plan and fly missions that stay inside the link with margin.Read & check · 7 min
  2. Flight logs: fixed-rate records, events, CSV export, per-flight metrics and anomaly rulesRecord state and telemetry at a fixed rate and mode changes as events, export the log as CSV without flooding the console, compute distance, maximum altitude, time per mode and battery per kilometre, and run anomaly rules for sudden battery drops, GPS divergence and mode flapping on a flight that has problems.Read & check · 6 min
  3. Energy planning before take-off: calibrating consumption, predicting a mission and go/no-goCalibrate a drain model from short test legs at known airspeeds, fit it by least squares, predict a planned route leg by leg in several wind cases including the airspeed limit, decide go or no-go with a landing reserve and a model margin, then fly the mission and compare prediction with use.Read & check · 6 min
  4. Preflight checks as code: fence legs, height limits, obstacle clearance, link and energy with errors.JoinValidate a mission before take-off against a concave geofence leg by leg, the legal height limit with a margin, obstacle clearance, the planned link range and the energy reserve; collect every problem as a typed error with errors.Join, repair what is safe with errors.As, and fly the corrected plan.Read & check · 7 min
  5. Remote ID: the broadcast message set, a binary teaching format and a validating receiverState what standard Remote ID broadcasts and how often according to the FAA, and what EASA says the European broadcast carries; encode a simplified message set (identity, position and altitude, velocity, control station, time mark, emergency status) with encoding/binary; and build a receiver that checks freshness, plausibility and missing fields on simulator telemetry.Read & check · 7 min
  6. Strategic deconfliction: 4D volumes, reservations and flying the accepted plansDescribe each operation as segmented 4D volumes (footprint, altitude band, time window), detect conflicts by overlap in time, altitude and buffered footprint, reserve intents first come, first served by moving or rejecting newcomers, then fly the accepted plans with several drones and verify conformance and separation.Read & check · 7 min
  7. A fleet backend in Go: a mission API, idempotent POST and a dispatch state machineBuild a mission API with Go 1.22 ServeMux method and wildcard patterns, make POST safe to retry with an Idempotency-Key, dispatch missions to drones through an explicit queued, assigned, flying, done or failed state machine driven by the autopilot, and exercise it all through httptest without opening a socket.Read & check · 7 min
  8. Property-based testing of flight software: generated worlds, shrinking and fuzz targetsGenerate scenarios from seeds, state invariants that must hold in every world, find a failing seed for a deliberately weak obstacle planner, shrink it to a minimal counterexample, verify the fixed planner across every seed, and express the same property as a Go fuzz target.Read & check · 7 min
  9. Post-flight incident analysis: timeline, contributing factors and a verified changeReconstruct an incident from the autopilot's event timeline and recorded telemetry, separate what the ground station saw from what happened, compute contributing factors such as time without a fix and drift against the planned stand-off, write a blameless summary, change one thing and re-fly the same fault to verify it.Read & check · 6 min

Open any branch and choose a lesson. The map suggests an order; every lesson is freely accessible.

Share a progress link with a person or AI

Publish an explicit read-only snapshot of completed lesson IDs, interview marks and Continue places. It is public to anyone with the link for 90 days. It does not update automatically or change anyone’s progress. No code, attempts, names or account.

Back up or move your local progress

Download your course marks, interview self-assessments and Continue bookmarks. No account, upload or automatic app sync. Web marks are self-reported, not compiler results.

Browse by subject.

Read each unit’s introduction and follow its lessons in order.