Redowan's Reflections

Hi, I’m Redowan.

A roving amateur fumbling through software, systems, and sundry.

Recent writing

You probably don't need a DI framework

Dependency injection in Go doesn't need Dig or Wire. Learn why manual wiring beats reflection magic and how Go's design makes DI frameworks overkill.

Go 1.24's "tool" directive

Pin tool versions in Go 1.24 with the new 'tool' directive. Replace tools.go pattern with native go.mod support for project tooling.

Capturing console output in Go tests

Test functions that write to stdout/stderr in Go by capturing output with os.Pipe. Learn patterns to avoid deadlocks in concurrent tests.

Three flavors of sorting Go slices

Compare three Go slice sorting methods: sort.Interface, sort.Slice with closures, and modern generic slices.Sort with type safety.

Nil comparisons and Go interface

Debug tricky nil comparisons in Go interfaces. Understand dynamic types, type assertions, and use reflect for generic nil checking.

Go slice gotchas

Avoid common Go slice mistakes: shared backing arrays, nil vs empty slices, append behavior, and slice copying pitfalls explained.

The domain knowledge dilemma

Navigating the balance between building valuable domain expertise and avoiding over-specialization that limits career mobility.

Dynamic shell variables

Learn variable indirection in Bash with ${!var} syntax. Build context-aware configs, function dispatch, and dynamic variable name resolution.

Link blog in a static site

Build a link blog without a backend using Hugo and markdown. Track reading, articles, and activities with yearly detail pages and RSS filtering.