Blog
Notes on software architecture, the .NET ecosystem and things I learn.
- 8 min read
Keeping state in the URL in React: search params for filters, sorting and pagination
Keeping filter, sort and page state in URL search params in React apps: typed parsing, push versus replace, a debounced search box and deriving data from the URL.
- 9 min read
Configuration in ASP.NET Core: the options pattern, validation and failing fast at startup
Binding ASP.NET Core settings to typed classes, catching invalid values at startup, and choosing correctly between IOptions, IOptionsSnapshot and IOptionsMonitor.
- 9 min read
A testable API client in Swift: endpoint model, typed errors and token refresh
Structuring an iOS network layer: endpoints as data, status codes as typed errors, token refresh deduplicated with an actor, and tests using URLProtocol.
- 7 min read
Streaming LLM responses: SSE in ASP.NET Core, cancellation and error handling in React
Delivering LLM responses piece by piece: Server-Sent Events in ASP.NET Core, reading it in React, cancellation, proxy buffering, interrupted answers and persistence.
- 7 min read
Transaction isolation levels in practice: race conditions, row locks and deadlocks
Choosing transaction isolation levels deliberately: lost updates and write skew, atomic updates, row locks, retrying serialization failures and reducing deadlocks.
- 7 min read
Keeping your CI pipeline fast and reliable: caching, parallel jobs and flaky tests
Keeping a CI pipeline fast and trustworthy: ordering stages, dependency caching, parallel jobs, dealing with flaky tests and securing the pipeline itself.
- 7 min read
Managing RxJS streams in Angular: the right operator, cancellation and subscription leaks
Keeping RxJS streams predictable in Angular: subscription lifetime, switchMap and the other flattening operators, request cancellation, error handling and shareReplay.
- 8 min read
Resilient HTTP calls in .NET: timeouts, retries and circuit breakers
Hardening outbound service calls with IHttpClientFactory and Microsoft.Extensions.Http.Resilience: timeout budgets, safe retries, circuit breakers and error handling.
- 9 min read
Receiving webhooks: signature verification, replay protection and idempotent processing
Building a secure, resilient webhook endpoint: HMAC signatures over the raw body, timestamp-based replay protection, fast responses and harmless duplicate events.
- 9 min read
End-to-end tests with Playwright: stable locators, waiting and isolated test data
What makes end-to-end tests flaky and how to fix it: role-based locators, condition-based waiting, per-test data, a single sign-in and traces in CI.
- 9 min read
The transactional outbox pattern: keeping your database and message queue consistent
Why writing to the database and then publishing a message is unreliable, and how an outbox table, a relay and idempotent consumers deliver events without loss.
- 8 min read
Measuring .NET performance with BenchmarkDotNet: reliable data instead of guesses
Why Stopwatch measurements mislead, and how to write correct benchmarks with BenchmarkDotNet, read the results and avoid the most common measurement mistakes.
- 8 min read
Keyset pagination: using a cursor instead of OFFSET for large lists
Why OFFSET pagination slows down and drifts on large tables, and how to build keyset, cursor-based pagination across EF Core, indexes and the API contract.
- 7 min read
Prompt injection in LLM applications: keeping tools and data within safe boundaries
Reducing prompt injection risk in tool-using LLM applications: separating untrusted content, narrowing permissions, validating tool calls and adding approval steps.
- 8 min read
Navigation in SwiftUI: NavigationStack, typed routes and deep links
Modelling navigation as data in SwiftUI: typed routes with NavigationStack, a router object, deep link parsing, sheet and tab state, and restoring the stack.
- 8 min read
Optimistic updates in React: a fast UI with consistent server state
Building optimistic updates in React safely: separating confirmed state from pending changes, temporary IDs, rollback on failure, race conditions, and testing.
- 8 min read
Producer-consumer in .NET with Channels: bounded queues and backpressure
Building an in-process work queue with System.Threading.Channels: bounded capacity, backpressure, parallel consumers, batching and a clean shutdown with BackgroundService.
- 8 min read
Keeping tokens out of the browser: the BFF pattern for SPA authentication
Keeping access tokens out of the browser in React or Angular apps: a BFF with ASP.NET Core, secure cookies, an API proxy, CSRF protection and session management.
- 7 min read
Secrets management in .NET and Docker: keeping passwords out of code, images and logs
Managing connection strings and API keys in .NET and Docker without leaking them into the repository, image layers or logs, using configuration, BuildKit secrets and secret files.
- 7 min read
Finding the right context in RAG: chunking, hybrid search and reranking
Improving the retrieval step that decides answer quality in RAG applications: chunking documents meaningfully, combining keyword and vector search, and reranking results.
- 7 min read
Health checks and graceful shutdown in ASP.NET Core: zero-downtime deployments in containers
Separating liveness and readiness checks, handling SIGTERM correctly and not losing requests during deployments for ASP.NET Core services running in containers.
- 8 min read
Optimistic concurrency in EF Core: preventing lost updates with versions and ETags
Stop changes from silently disappearing when two users edit the same record, using EF Core concurrency tokens, DbUpdateConcurrencyException and HTTP ETag/If-Match.
- 8 min read
Form validation in React: client rules, server errors, and a single contract
Keeping React form validation in a schema, showing errors at the right moment, mapping Problem Details errors from the server to fields, and preventing double submits.
- 7 min read
Async work in SwiftUI: predictable data loading with .task, cancellation, and MainActor
Tying data loading to the view lifecycle in SwiftUI: .task and .task(id:), cooperative cancellation, debouncing, MainActor isolation, and testable loaders.
- 6 min read
Testing time-dependent code in .NET: taking control of the clock with TimeProvider
Making code that uses DateTime.UtcNow and Task.Delay testable: the TimeProvider abstraction, a fake clock with FakeTimeProvider, timers, and time zone pitfalls.
- 5 min read
Wiring LLM output into code: schema, validation and a repair loop
How to use JSON from a language model safely: schema design, server-side validation, a bounded repair attempt and a safe fallback path when the output cannot be trusted.
- 6 min read
Caching in .NET: cache-aside, stampede protection and HybridCache
How to set up caching correctly in ASP.NET Core: the cache-aside pattern, expiration and invalidation decisions, the stampede problem, and a practical approach with HybridCache.
- 5 min read
Consistent error handling in ASP.NET Core: IExceptionHandler and Problem Details
A practical guide to catching errors in one place in ASP.NET Core APIs, returning consistent RFC 9457 Problem Details responses and logging without leaking internals.
- 5 min read
Speeding up Docker image builds: layer cache and multi-stage Dockerfiles
How to cut Docker image build time with smart layer ordering, .dockerignore, multi-stage Dockerfiles, BuildKit cache mounts and a CI cache, step by step.
- 5 min read
Content Security Policy against XSS: report, tighten, enforce
Adding Content Security Policy to a live application without breaking it: report-only mode, nonces, strict-dynamic, violation reports and common mistakes.
- 5 min read
State management with Angular Signals: using signal, computed and effect where they belong
Keeping component and service state simple with Angular Signals: what signal, computed and effect are for, where RxJS still fits, immutability, and common mistakes.
- 6 min read
Rate limiting in ASP.NET Core: protecting your API from abuse
How to use ASP.NET Core's built-in rate limiting middleware: choosing an algorithm, partitioning per user, returning a useful 429, and understanding the limits in multi-instance deployments.
- 6 min read
Reading PostgreSQL query plans: fixing slow queries with the right index
How to read EXPLAIN ANALYZE output, design composite and partial indexes correctly, and fix slow queries with measurements instead of guesses, with practical examples.
- 5 min read
State ownership in SwiftUI: keeping views simple and data flow predictable
Clarify who owns state in SwiftUI apps: use @State, @Binding, @Observable and environment objects deliberately to avoid needless redraws and tangled data flow.
- 5 min read
Integration tests for .NET with a real database: fast, isolated, reliable
Test ASP.NET Core APIs against a real containerized database instead of in-memory fakes: WebApplicationFactory, test isolation, data resets and a fast CI suite.
- 6 min read
Zero-downtime schema changes: expand, migrate, contract
How to rename columns or split tables while old and new application versions run side by side, using small, reversible steps instead of one risky migration.
- 5 min read
Developer-friendly CLI design: safe defaults and an automation contract
Design command-line tools that work well for people and CI through clear commands, standard output, exit codes, configuration precedence and safeguards for destructive actions.
- 5 min read
Accessibility in React: treating keyboard and focus flow as product behaviour
Design React interfaces that remain usable for everyone through semantic HTML, correct focus management, clear error feedback and repeatable testing.
- 5 min read
Authorization in .NET APIs: from claims to resource-based decisions
Separate authentication from authorization and design access decisions that are consistent, testable and auditable through policies and resource-based controls.
- 5 min read
Web performance budgets: preserving fast sites through measurement
How to sustain a good loading experience in static and React-based sites by setting clear limits for JavaScript, images, fonts and third-party code.
- 5 min read
Safe releases with feature flags: enable, measure and roll back
A practical feature-flag strategy for validating new functionality with targeted audiences, measuring user impact and reversing course quickly when needed.
- 5 min read
Data isolation in multi-tenant applications: treating tenant context as a boundary
A practical approach to reducing data-leakage risk by carrying tenant context consistently from identity to queries, background jobs and audit records.
- 5 min read
Evaluating AI features: measurable quality before a release
How to build a small but trustworthy evaluation pipeline that compares prompt, model or retrieval changes against real tasks before users see them.
- 5 min read
Reliable background jobs: idempotency, retries and dead-letter queues
A practical design framework for handling duplicate delivery, temporary errors and permanent failures safely in systems that use queues and workers.
- 5 min read
Versioning API contracts: managing breaking changes and testing compatibility
A practical approach to compatibility in HTTP and message-based APIs through extensible schemas, deliberate deprecation and contract tests.
- 5 min read
Secure file uploads: quarantine, scanning and the publishing pipeline
How to design the security boundary between accepting a file and making it available through authorisation, object storage, asynchronous scanning and visible states.
- 5 min read
Building a repeatable development environment with Docker Compose
Practical principles for a Compose contract that does more than run a project: it lets a new developer create the same environment safely.
- 5 min read
Distributed tracing: designing logs, metrics and traces together
A practical guide to an observability contract that reveals a request's path across services, the source of latency and the context behind failures.
- 5 min read
Designing asynchronous React interfaces as state machines
Move beyond loading and error flags by modelling every user-visible asynchronous state in an explicit, testable and recoverable way.
- 5 min read
Designing reliable sync for offline-first mobile apps
A practical framework for mobile synchronisation that treats local data as primary, queues changes and resolves conflicts without losing user context.
- 5 min read
Making RAG answers trustworthy: citations, evidence and the refusal path
A practical framework for turning a RAG feature into a reliable product flow that shows the evidence behind every important claim.
- 5 min read
Microservices or a modular monolith? A practical framework for drawing the boundary
A decision framework for evaluating service boundaries through domain ownership, data, team capacity and operational need—not technology fashion.
- 1 min read
Rebuilding this site with Next.js
Notes on moving from a single-page CV site to a bilingual, statically exported portfolio.