React Query: Server State vs Client State

Redux is great for client state (is the modal open?), but terrible for server state (is this data fresh?). React Query (now TanStack Query) manages caching, background updates, and stale data automaticallly. The Default Stale-While-Revalidate Strategy React Query assumes data is stale immediately (0ms) but keeps it in cache for 5 minutes. When you request […]

Read more β†’

C# 9 Source Generators: Removing Reflection

Reflection is slow. It happens at runtime, bypasses type safety, and prevents trimming. Source Generators solve this by generating code at compile time. In this guide, we build a generator that automatically implements a `MapTo` method for DTOs, replacing AutoMapper. The Goal The Generator Logic Key Takeaways Source Generators enable **Zero-Overhead abstractions**. They are essential […]

Read more β†’

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

Storing Access Tokens (JWT) in LocalStorage is insecure (XSS vulnerability). Storing them in HttpOnly cookies is safer, but SPAs can’t read cookies. The solution? The **Backend for Frontend (BFF)** pattern. The Architecture Using YARP (Yet Another Reverse Proxy) Microsoft’s YARP is the perfect tool to build a .NET BFF. Key Takeaways **Zero Tokens in Browser**: […]

Read more β†’