Redowan's Reflections

Redowan's Reflections

Redowan

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

Latest Posts

Test Go subprocesses with the re-exec pattern: spawn your test binary as a subprocess to emulate real command behavior reliably.
Apply SOLID's Interface Segregation Principle in Go with consumer-defined contracts. Learn why small interfaces and implicit implementation matter.
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.
Organize Go apps by domain, not technology. Learn why models/controllers structure hurts and how bounded contexts create better separation.
Avoid brittle AI-generated tests that check implementation details. Write maintainable tests that verify behavior, not method calls.
Prevent goroutine leaks caused by early returns with unbuffered channels. Learn buffering, draining, errgroup patterns, and goleak testing.
Master Go test lifecycle with t.Cleanup(), subtests, and TestMain. Learn per-test, grouped, and package-wide setup patterns effectively.
Search Random