Redowan's Reflections
Redowan's Reflections
Redowan
Redowan Delowar's reflections on software, systems, and sundry.
Latest Posts
How to wrap a generated gRPC client behind a clean Go API so users never have to touch protobuf types or connection management directly.
In praise of the etcd codebase
Why the etcd codebase is my go-to reference for building gRPC services in Go.
Go errors: to wrap or not to wrap?
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...
Mutate your locked state inside a closure
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...
How Python and Kotlin provide structured concurrency out of the box while Go achieves the same patterns explicitly using errgroup, WaitGroup, and context.
Your Go tests probably don't need a mocking library
Practical patterns for mocking in Go without external libraries. Learn to mock functions, methods, interfaces, HTTP calls, and time using only the standard library
Tap compare testing for service migration
Master shadow testing for large-scale system migrations. Learn to safely rewrite services by comparing outputs between old and new implementations.
Splintered failure modes in Go
Simplify Go error handling by consolidating validation and system errors. Learn when to return boolean vs error for clearer failure modes.
Re-exec testing Go subprocesses
Test Go subprocesses with the re-exec pattern: spawn your test binary as a subprocess to emulate real command behavior reliably.
Revisiting interface segregation in Go
Apply SOLID's Interface Segregation Principle in Go with consumer-defined contracts. Learn why small interfaces and implicit implementation matter.
Avoiding collisions in Go context keys
Master Go context keys with custom types, avoid collisions using empty structs, and learn accessor patterns for safe request-scoped values.
Organize Go tests with in-package, external _test packages, and integration tests. Learn white-box vs black-box testing conventions.
Organize Go subtests with t.Run nesting and parallel execution. Learn patterns for setup, teardown, and readable test hierarchies.
Let the domain guide your application structure
Organize Go apps by domain, not technology. Learn why models/controllers structure hurts and how bounded contexts create better separation.