Event Sourcing flips traditional database design on its head. Instead of storing current state, you store the events that led to that state. It’s not for every project, but when it fits, it’s powerful. The Concept In a typical system, you update records in place. An order goes from “pending” to “shipped” by updating a […]
Read more โAzure Cosmos DB: Partition Keys and Data Modeling
Choosing the right partition key is the most important Cosmos DB decision you’ll make. Get it wrong, and you’ll hit performance issues. Here’s how to think about it. What is a Partition Key? Cosmos DB distributes data across physical partitions based on your partition key. All items with the same partition key value live together. […]
Read more โTypeScript Interfaces and Types: When to Use Which
One of the most common questions I get about TypeScript: should I use an interface or a type? Both can describe object shapes, but they have subtle differences. Here’s when to use each. The Quick Answer Use interfaces for object shapes and public APIs. Use types for unions, intersections, and complex type manipulations. When in […]
Read more โReact Hooks Introduction: useState and useEffect
React 16.8 shipped with Hooks, and they’ve changed how I write React components. No more class components for simple state management. Here’s my introduction to the two most important hooks. The Problem with Classes Class components work, but they’re verbose. You need constructors, binding methods, lifecycle methods spread across the component. Hooks let you use […]
Read more โTerraform Basics: Infrastructure as Code for Azure
I’ve been managing Azure resources with ARM templates for years. They work, but they’re verbose and hard to read. Terraform is a breath of fresh air. Here’s how to get started. Why Terraform? Readable: HCL is much cleaner than JSON/ARM Multi-cloud: Same tool for Azure, AWS, GCP State management: Tracks what’s deployed Plan before apply: […]
Read more โAzure Cosmos DB: Getting Started with the Multi-Model Database
Cosmos DB is Azure’s globally distributed, multi-model database. It’s different from SQL Server in fundamental ways. Here’s what you need to know to get started. Key Concepts Global distribution: Replicate data across regions with a click Multi-model: Document, key-value, graph, column-family APIs Guaranteed latency: <10ms reads/writes at 99th percentile Elastic scale: Throughput and storage scale […]
Read more โ