Skip to content

Blog — page 8

664 posts on software development, newest first. Browse by topic:Rust, Go, Python, JavaScript & web, AI & data, DevOps & tooling, Mobile & Android, .NET & C#, C++ & systems, LaTeX, Investing, Everything else.

  1. JavaScript & webBranded types in TypeScript: keeping IDs and units apartUse branded types to stop TypeScript mixing up user IDs and order IDs, or cents and dollars: constructor functions, type guards, JSON and Zod's .brand().
  2. DevOps & toolingSmaller Docker images with multi-stage buildsSplit a Dockerfile into builder and runtime stages: COPY --from, slim and distroless bases, BuildKit cache mounts, .dockerignore, and how to check what an image contains.
  3. PythonManaging Python projects with uv: lockfiles, tools and inline script metadataRun a Python project with uv from init to lockfile, use uvx for CLI tools, install Python versions, and give single-file scripts their own dependencies.
  4. AI & dataPolars for pandas users: expressions, lazy frames and group_byThe same DataFrame transformations in pandas and Polars side by side: pl.col expressions, with_columns, group_by().agg, window functions, lazy scan_csv and no index.
  5. AI & dataWriting a tool-use loop for the Claude API by handBuild the tool-calling loop for Claude yourself in Python: JSON Schema tools, the stop_reason loop, tool_result blocks, errors with is_error and a turn limit.
  6. JavaScript & webValidating untrusted input at runtime with Zod 4Use Zod 4 schemas to validate request bodies and environment variables in TypeScript: z.infer, safeParse, coercion, transforms and readable error output.
  7. Pythonasyncio TaskGroup and asyncio.timeout: structured concurrency in PythonReplace asyncio.gather with TaskGroup, handle failures with ExceptionGroup and except*, add deadlines with asyncio.timeout, and cap concurrency.
  8. .NET & C#Producer/consumer queues in .NET with System.Threading.ChannelsUse System.Threading.Channels for in-process queues in .NET: bounded vs unbounded, full modes, several consumers, completion, and a background job queue for a web app.
  9. GoStructured logging in Go with log/slogUse Go's log/slog: attributes, text and JSON handlers, levels with LevelVar, With and groups, LogValuer for redacting secrets, and a context-aware handler.
  10. AI & dataRevolutionizing Web Performance: Using Gemini 3.1-Pro-Preview for AI-Generated SVGsDiscover how to replace heavy JavaScript web animations with AI-generated SVGs using Gemini 3.1-Pro-Preview. A deep dive into the devcraft repository, Vite tooling, and best prompting techniques for scalable vector graphics.
  11. RustTokio channels in Rust: mpsc, oneshot, broadcast and watchWhen to use each Tokio channel: bounded mpsc and backpressure, an actor with oneshot replies, broadcast lag, watch for config, and shutting tasks down cleanly.
  12. DevOps & toolingMatrix builds and dependency caching in GitHub ActionsTest across operating systems and runtime versions with strategy.matrix, include, exclude and fail-fast, and cache dependencies with setup-* and actions/cache.

© 2026 David Li · Home · Blog · RSS ·Classic site · Built with Astro, Starlight and three.js · Logos:Font Awesome Free (CC BY 4.0)