Redowan's Reflections

Redowan's Reflections

Redowan

Redowan Delowar's reflections on software, systems, and sundry.

Latest Posts

How to test unary gRPC services in Go - handler logic, interceptors, deadlines, metadata propagation, and rich error details - all in-memory with bufconn.
Decoupling business logic from storage in Go, adding transaction support without leaking SQL details, and coordinating atomic writes across multiple repositories using a unit of work.
Adding transaction support to a repository interface without leaking storage details.
Why the middleware-to-handler boundary is a special case for context values.
A simple litmus test for when to use context values in Go.
Decoupling business logic from storage with a small interface in Go.
How to wrap a generated gRPC client behind a clean Go API so users never have to touch protobuf types or connection management directly.
Why the etcd codebase is my go-to reference for building gRPC services in Go.
Exploring the tradeoffs between wrapping errors at every return site versus wrapping only at boundaries, with no definitive answer - just honest tradeoffs for the kind of software I write.
Why your mutex wrapper should accept a closure for mutation instead of a plain value, with examples from the standard library and Tailscale.
How Go 1.20's WithCancelCause and Go 1.21's WithTimeoutCause let you attach a reason to context cancellation, plus a gotcha with manual cancel and the stdlib pattern that covers every path.
How Python and Kotlin provide structured concurrency out of the box while Go achieves the same patterns explicitly using errgroup, WaitGroup, and context.
Practical patterns for mocking in Go without external libraries. Learn to mock functions, methods, interfaces, HTTP calls, and time using only the standard library
Master shadow testing for large-scale system migrations. Learn to safely rewrite services by comparing outputs between old and new implementations.
Simplify Go error handling by consolidating validation and system errors. Learn when to return boolean vs error for clearer failure modes.
Search Random