General coding principles plus per-language pages. Start with general-principles and then drill into the language you are working in.

Pages

  • general-principles: Naming, comments, errors, dependencies, testing.
  • git: Commit hygiene, rebase vs merge, Conventional Commits, hooks.
  • testing: Trophy shape, flake budget, determinism, coverage as floor.
  • python: Modern Python: types, ruff, pytest, async.
  • typescript: Strict TypeScript, narrow types, runtime validation.
  • typescript-strict-mode: strict: true plus noUncheckedIndexedAccess and exactOptionalPropertyTypes; migrating a loose codebase.
  • typescript-types-vs-interfaces: type by default; interface for public, mergeable APIs; intersection vs extension.
  • typescript-generics: Generic functions, extends constraints, inference, defaults; Repository and Result patterns.
  • typescript-narrowing: typeof, instanceof, in, discriminated unions, user-defined predicates, never exhaustiveness, assertion functions.
  • typescript-utility-types: Pick, Omit, Partial, Required, Readonly, Record, Exclude, Extract, NonNullable, ReturnType, Awaited; rolling your own.
  • typescript-runtime-validation: Zod by default; Valibot for bundle size; tRPC for typed RPC; validate every boundary.
  • typescript-tsconfig: target, module, moduleResolution, esModuleInterop, skipLibCheck, forceConsistentCasingInFileNames; project references for monorepos.
  • swift: Swift 6 concurrency and idiomatic API design.
  • swift-actors: actors, @MainActor, nonisolated, and Sendable to eliminate data races at compile time.
  • swift-async-await: async/await ergonomics, TaskGroup, cancellation, and bridging callbacks with withCheckedContinuation.
  • swift-error-handling: throws over optionals, group errors by domain, typed throws in Swift 6, handle at the boundary.
  • swift-modules: SPM layout, import semantics, private-by-default access, and resource handling.
  • swift-optionals: never force-unwrap; if let, guard let, and ?? to handle Optional values safely.
  • swift-protocols: protocol-oriented design, associated types, composition, existentials with any, generics vs type erasure.
  • swift-value-types: why structs are the default, when classes are justified, and copy-on-write in collections.
  • python-async: asyncio foundations, TaskGroup for structured concurrency, cancellation, mixing sync and async.
  • python-dependency-management: uv over pip+venv, pyproject.toml extras, pipx for global tools, pip-audit.
  • python-packaging: pyproject.toml as single source of truth, src layout, entry points, wheel building, PyPI with uv.
  • python-performance: profile first, algorithmic wins over micro-optimizations, numpy vectorization, GIL constraints.
  • python-security: Pydantic for input validation, parameterized SQL, pickle avoidance, secrets via env, SSRF prevention.
  • python-testing: pytest fixtures, parametrize, Hypothesis, pytest-cov, monkeypatch over MagicMock.
  • python-typing: TypeVar, Protocol, Self, TypeAlias, Annotated, TypeGuard, and runtime introspection in Python 3.12+.
  • pine-script: Pine v5 for TradingView indicators and strategies.
  • shell: Bash with set -euo pipefail, quoting, shellcheck.

33 items under this folder.