Redowan's Reflections

Recent writing

Strategy pattern in Go

Replace inheritance with the Strategy pattern in Go using interfaces. Achieve composable, testable code without class hierarchies.

Anemic stack traces in Go

Learn how to build custom error types in Go to create stack traces without runtime overhead, inspired by Rob Pike's Upspin error handling.

Retry function in Go

Build retry logic in Go without reflection using generics. Implement exponential backoff and configurable retry strategies with type safety.

Eschewing black box API calls

Why you should define API response structures explicitly. Compare approaches in Python, JavaScript, and Go with Pydantic, Zod, and structs.

Rate limiting via Nginx

Implement rate limiting at the infrastructure layer with Nginx reverse proxy. Protect Go services from DDoS with leaky bucket algorithm.

Planning palooza

Why scattered planning documents across RFCs, ADRs, and multiple tools hinder productivity compared to centralized documentation.

Reminiscing CGI scripts

Build a CGI script from scratch using Go's stdlib and Bash. Understand why Common Gateway Interface fell out of favor for modern web apps.

Finding flow amid chaos

Strategies for achieving deep work and focus time as an engineer drowning in meetings, Slack messages, and corporate interruptions.