Knowledge base

Notes I've written while learning. Each one belongs to a technology's roadmap, and the search covers every word.

  • Anatomy of a GitHub Actions workflow

    Workflows, events, jobs, steps, runners and actions - how they nest, what runs where, how data moves between steps and jobs, and the defaults that surprise people.

    GitHub Actions · updated 20 Nov 2026

  • Building and pushing Docker images with GitHub Actions

    Build a Go service's image on every pull request and publish multi-platform, tagged images to GitHub Container Registry from main and release tags, with metadata-action, Buildx and the Actions cache.

    GitHub Actions, Docker, Go · updated 20 Nov 2026

  • Database migrations with Alembic

    Setting up Alembic for a small inventory app, reading the URL from the environment, autogenerating and reviewing migrations, naming conventions, and data migrations.

    SQLAlchemy, PostgreSQL · updated 20 Nov 2026

  • Docker Compose for a Go service and Postgres

    A compose.yaml for a Go API and postgres:18 - healthchecks, start-up ordering, a pgx DATABASE_URL, goose migrations as a one-off service, Compose Watch rebuilds and a throwaway test database.

    Docker, PostgreSQL, Go · updated 20 Nov 2026

  • Docker images, containers and layers

    What an image actually is, how a container differs from it, why layers make builds fast, and the commands I use to run, inspect and clean up.

    Docker · updated 20 Nov 2026

  • Docker volumes and networking

    Where container data should live (named volumes, bind mounts, tmpfs) and how containers reach each other and the host, including the localhost trap.

    Docker · updated 20 Nov 2026

  • Durable work in Go with leases, fencing and an outbox

    Claiming jobs with FOR UPDATE SKIP LOCKED, leases that expire, fencing tokens that reject stale workers, attempt history, a transactional outbox with a relay, and idempotent consumers.

    Go, PostgreSQL · updated 20 Nov 2026

  • GitHub Actions security and reuse

    Least-privilege tokens, pinning actions by SHA, script injection, pull_request_target, environments and OIDC, then composite actions versus reusable workflows for sharing CI.

    GitHub Actions · updated 20 Nov 2026

  • Go and PostgreSQL with pgx, sqlc and goose

    Reviewed goose migrations, sqlc queries for pgx/v5, one pgxpool per process, a transaction helper that rolls back on error, idempotent inserts with ON CONFLICT and PgError mapping.

    Go, PostgreSQL · updated 20 Nov 2026

  • Go CI with Postgres service containers

    A complete GitHub Actions workflow for a Go module - gofmt, go vet, golangci-lint, govulncheck, a Go version matrix, and go test -race against a postgres:18 service container after goose migrations.

    GitHub Actions, Go, PostgreSQL · updated 20 Nov 2026

  • Go concurrency patterns

    Goroutine ownership, cancellation, a bounded worker pool with backpressure, semaphores, errgroup with SetLimit, pipelines, finding goroutine leaks, and why a channel is not a durable queue.

    Go · updated 20 Nov 2026

  • Go errors and domain invariants

    Wrapping with %w, errors.Is, errors.As and errors.AsType, sentinel versus typed errors, validating constructors and an explicit job state machine that refuses forbidden transitions.

    Go · updated 20 Nov 2026

  • Go HTTP servers, timeouts and graceful shutdown

    A net/http server with explicit timeouts, ServeMux patterns, ordered middleware, chi where it helps, request contexts, signal-driven shutdown with a deadline, and health versus readiness.

    Go · updated 20 Nov 2026

  • Go interfaces and dependency injection

    Accept interfaces and return structs, small consumer-owned interfaces, explicit constructors, a composition root in main, config structs versus functional options, and why no DI framework yet.

    Go · updated 20 Nov 2026

  • Go observability with slog and OpenTelemetry

    Structured logs with log/slog and request-scoped attributes, OpenTelemetry traces propagated through an outbox, RED metrics with bounded labels, and what belongs in logs, metrics or traces.

    Go · updated 20 Nov 2026

  • Go project layout and tooling

    Modules, cmd/ and internal/, tool directives in go.mod, a golangci-lint v2 config, govulncheck and the race detector, set up once so every later phase is checked the same way.

    Go · updated 20 Nov 2026

  • Go resilience patterns for outbound calls

    One reusable HTTP client with deadlines, classified failures, exponential backoff with full jitter, retry budgets, idempotency keys, circuit breakers, load shedding and per-tenant bulkheads.

    Go · updated 20 Nov 2026

  • Go testing practices

    Table-driven tests, t.Helper and t.Cleanup, fakes over mocks, httptest and golden files, the race detector, fuzzing, testing/synctest for time, and integration tests against a real Postgres.

    Go · updated 20 Nov 2026

  • PostgreSQL essentials for app developers

    Running Postgres 18 in Docker, finding my way around psql, and sketching a job-processing schema whose constraints enforce tenant-scoped idempotency.

    PostgreSQL, Docker, Go · updated 20 Nov 2026

  • PostgreSQL indexes and EXPLAIN

    How B-tree, composite and partial indexes work in PostgreSQL 18, how to read EXPLAIN ANALYZE, and which indexes a job-processing schema actually needs.

    PostgreSQL, Go · updated 20 Nov 2026

  • PostgreSQL transactions, isolation and locking

    MVCC, the three isolation levels Postgres really has, lost updates, claiming jobs with FOR UPDATE SKIP LOCKED and fencing tokens, and retrying serialisation failures from Go with pgx.

    PostgreSQL, Go · updated 20 Nov 2026

  • Querying with select() in SQLAlchemy 2.x

    Filtering, joining, aggregating and bulk-updating inventory data with select(), plus lazy loading, the N+1 problem and how eager loading options fix it.

    SQLAlchemy, PostgreSQL · updated 20 Nov 2026

  • SQLAlchemy engine, connection and session

    What the engine, connection and session each do in SQLAlchemy 2.1, how transactions begin and end, and the session-per-request pattern for the inventory example.

    SQLAlchemy, PostgreSQL · updated 20 Nov 2026

  • SQLAlchemy ORM models and relationships

    Declaring the inventory models with DeclarativeBase, Mapped and mapped_column, linking them with relationship(), and understanding object states and cascades.

    SQLAlchemy, PostgreSQL · updated 20 Nov 2026

  • Testing SQLAlchemy code with pytest and Postgres

    Fast, isolated database tests against real PostgreSQL, using pytest fixtures, Alembic migrations and a rolled-back transaction per test with join_transaction_mode.

    SQLAlchemy, PostgreSQL · updated 20 Nov 2026

  • Writing a Dockerfile for a Go service

    From a 1 GB naive image to a 13 MB multi-stage build - module caching, BuildKit cache mounts, a static binary, distroless or scratch, non-root, and health checks without a shell.

    Docker, Go · updated 20 Nov 2026