Reference

Programming languages

Choose TypeScript, Go, Rust or C++ and find syntax, everyday APIs, standard libraries and tools in one place.

Scope and conventions

TypeScript/Node, Go 1.23+, Rust 2024 and C++23: from a first CLI to files, JSON, HTTP, concurrency and testing. Complete programs are labeled; other examples identify their surrounding code/imports. Optional libraries and version requirements are named in each entry.

Debugging & diagnostics

Pause and inspect a failing execution

Go

Delve is an optional Go debugger that can run a program or a test binary.

Shell with Delve installed: dlv test ./path/to/package. Set a breakpoint, continue, inspect stack/locals.

Check races with a supported tool

Go

The race detector instruments supported executions. It finds races on executed paths, not all possible paths.

Shell: go test -race ./... on a supported platform/toolchain.

Choose diagnostics for memory and undefined behavior

Go

Use pprof/benchmarks to inspect allocation and retention; -race addresses a different class of problem.

Shell: go test -bench=. -benchmem. Profile a representative case rather than treating allocation count alone as correctness.

Run formatting and static checks separately from tests

Go

gofmt formats source; go vet checks selected suspicious constructs. Neither replaces behavioral tests.

Shell: gofmt -d ./example.go; go vet ./...

Reduce a failure to one repeatable case

Go

Record exact input, expected/observed behavior, version/configuration and a focused command. Reduce unrelated code while preserving the failure. Keep the result as a regression test once the cause is fixed.

Fragment

main.go
Follow appearance
GitHub Light
GitHub Dark
Rosé Pine
Catppuccin Mocha
VS Code Dark+
reproduce → narrow → inspect → change → rerun
retain the failing input or seed