Integration Testing with Testcontainers

“It works on my machine” usually means “I have a local SQL Server running”. This breaks in CI. Testcontainers is the solution. Ephemeral Infrastructure Testcontainers spins up a real Docker container for your test, runs the test, and throws it away. This means you are testing against the exact version of SQL Server (or Redis, […]

Read more โ†’
Posted in Uncategorized

React Query: Server State vs Client State

We used to put everything in Redux. API responses, UI flags, Form state. This was a mistake. The Separation Client State: Ephemeral. “Is the modal open?”. Use `useState`. Server State: Persisted remotely. “List of users”. It is asynchronous and stale by definition. Use React Query. React Query handles caching, background refetching (swr), and retries automatically. […]

Read more โ†’
Posted in UncategorizedTagged

C# 9 Source Generators: Removing Reflection

Reflection is slow. It happens at runtime. Source Generators happen at compile time. This is the biggest performance lever in modern .NET. Case Study: AutoMapper AutoMapper historically used reflection/expression trees to map Object A to Object B. This has startup cost. The new generation of mappers (Mapster, Riok.Mapperly) use Source Generators. The generated code is […]

Read more โ†’
Posted in Uncategorized

Visual Studio 2019 v16.9 Released

The latest update to VS 2019 is out. While we wait for VS 2022, 16.9 brings some solid stability fixes. Features Git Tooling: continued improvements to the new Git experience. C++: Address Sanitizer handling improved. .NET Core Debugging: improvements to auto-decompilation of external sources. The biggest news is actually what’s coming next: 64-bit Visual Studio […]

Read more โ†’
Posted in Uncategorized

Terraform vs Azure Bicep: An Honest Comparison

Should you use Terraform or Bicep? This is the most common question in Azure DevOps today. Terraform Wins When… Multi-Cloud: You need to deploy to AWS, Azure, and Datadog in the same pipeline. State Management: You need complex state manipulation (importing existing resources). Bicep Wins When… Azure Native: You only use Azure. Day 0 support […]

Read more โ†’
Posted in Uncategorized

Securing SPAs: The Backend for Frontend (BFF) Pattern

Detailed security audits often flag “Tokens in LocalStorage” as a vulnerability (XSS). The industry standard solution is the Backend for Frontend (BFF) pattern. The Problem with Implicit Flow If your React app holds the Access Token in the browser, any malicious script (XSS) can exfiltrate it. The BFF Solution The Browser never sees the token. […]

Read more โ†’
Posted in Uncategorized