Design Tokens: Building a Multi-Brand Design System
Three products, three brands, one design system. Tokens separate decisions from values and make theming scale.
Technical articles and thoughts on software engineering & AI
Three products, three brands, one design system. Tokens separate decisions from values and make theming scale.
Minifying JS yields 3% LCP gains. Serving correct images yields 30%. Optimizations ranked by measured production impact.
Redux became legacy. Atomic libraries and signals changed re-render costs. Comparison with render benchmarks.
Server Components change caching, state, and rendering rules. The mistakes that cost days of debugging in real projects.
Over-fetching solved, new complexity created. Where GraphQL beats REST today and where it became dead weight.
Logs say what failed. Traces show where and why. Step-by-step OTel instrumentation with context propagation.
Breaking changes without versioning burn trust. URI, header, or parameter? Contracts, deprecations, communication.
ALTER TABLE freezes production. Expand-contract splits schema changes into phases compatible with coexisting versions.
Every job runs twice eventually. Idempotency, visibility timeouts, and retry patterns that save the system.
Deploy and release are separate events. Flags decouple them and turn rollback into a config toggle.
A tenant_id column, schema-per-tenant, or database-per-tenant? Costs, risks, and when to migrate between the three.
Webhooks fail quietly: duplicates, out-of-order events, silent losses. Complete checklist for receiving events without losing any.
Choosing messaging by hype costs dearly. Honest comparison: throughput, ordering, operational cost, and use cases.
Parsing LLM JSON breaks in production. Constrained decoding, layered validation, and fallback strategies.
Users expect responses in chunks. SSE covers 90% of cases with less complexity than WebSockets.
Agents break in production without guardrails. Tool-use patterns, agent loops, and autonomy limits.
The LLM bill grows 10x in three months when nobody governs it. Three levers cut 70% without losing quality.
Unit tests miss probabilistic outputs. Golden datasets, automated judges, and regression gates in the pipeline.
Same 1M-document corpus, same queries. Recall, p95 latency, and operational cost side by side.
Start with prompting. RAG fixes knowledge. Fine-tuning fixes behavior. Real costs for each path.
Naive chunking returns garbage. Full pipeline: semantic chunking, embeddings, hybrid search, and reranking.
Generics, conditional types, and mapped types aren't TypeScript mysticism. They solve specific problems of code reuse and type safety. Learn the patterns that appear in any serious codebase.
Most APIs handle errors inconsistently. A well-defined error handling pattern reduces integration bugs, improves the consumer experience, and makes production debugging easier.
Caching is one of the most effective ways to improve performance, but cache invalidation is one of the hardest problems in computing. A practical guide to when, where, and how to cache.
Unit tests test isolated pieces. E2E tests the system as the user uses it. Playwright makes this feasible with minimal setup and reliable execution. Guide with real examples.
Micro-frontends solve real problems for large teams and monolithic applications, but introduce runtime and deployment complexity. When it's worth it and when it's over-engineering.
Rate limiting protects your API from abuse, DDoS, and excessive usage. But a poorly configured rate limit blocks legitimate users. Implement it to protect without getting in the way.
Rebase and merge solve the same problem in different ways. Neither is better: each has an ideal context. Understand the difference to stop fighting and choose with intention.
Unstructured logs are useless in production: impossible to filter, correlate, or analyze. Structured logging transforms your records into actionable data. Implementation guide.
JWT isn't just "generate a token and done." Production requires refresh tokens, invalidation, secure storage, and attack protection. Implement real JWT authentication.
SOLID isn't academic theory. It's five principles applied daily in production code. Each solves a concrete problem of maintainability and extensibility.
Code review done by a Staff Engineer shouldn't be about finding bugs. That's the minimum. The real value is in transferring knowledge, reinforcing patterns, and developing the team. How to do this without sounding arrogant.
Patterns are not recipes to memorize. They are design vocabulary. This article covers the patterns that appear constantly in production code and how to implement them in modern TypeScript.
"Vibe coding" (letting AI write everything while you approve) works for prototypes. But in production, technical responsibility doesn't vanish. Understand where the line is.
GitHub Actions is powerful and free for public repositories. This guide builds a real production pipeline (lint, tests, build, and deploy), step by step, without magic.
Strict mode is not just "making TypeScript more annoying." Each flag catches a real category of runtime bug. Understand what's being protected and stop disabling what you don't understand.
Monorepos solve real problems of consistency and code sharing, but introduce their own complexity. An honest guide to making the right decision in 2026.
Code coverage is a metric that's easy to increase and hard to interpret. What matters is confidence: do your tests let you sleep soundly before a deploy?
RSC fundamentally changed React's mental model. This guide explains what really changed, when to use Server vs Client Components, and the mistakes almost everyone makes.
A well-written PR accelerates the review cycle, documents decisions, and respects reviewers' time. Learn the practices that transform mediocre PRs into high-impact contributions.
As AI assistants generate code at high speed, quality gates become the essential line of defense for maintaining software health.