Redowan's Reflections

Hi, I’m Redowan.

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

Recent writing

HTTP requests via /dev/tcp

Make raw HTTP requests with Bash's /dev/tcp file descriptor. Build health check scripts without curl or wget using TCP socket connections.

The *nix install command

Replace mkdir, cp, and chmod with a single install command. Copy files, create directories, and set permissions in one step with GNU coreutils.

Here-doc headache

Avoid here-doc pitfalls when running remote commands via SSH. Learn variable expansion gotchas and simpler alternatives for deployment scripts.

The sane pull request

Make pull requests easier to review. Learn commit organization, diff filtering, annotations, and context that helps reviewers understand changes faster.

I kind of like rebasing

Master git rebase for cleaner commit history. Learn interactive rebasing, squashing commits, and rebasing feature branches onto main with practical examples.

Protobuffed contracts

Define service contracts with Protocol Buffers for non-gRPC systems. Generate serializers, maintain self-documented APIs, and ensure cross-language compatibility.

ETag and HTTP caching

Implement client-side HTTP caching with ETag headers. Learn If-None-Match, 304 Not Modified responses, and weak validation in Go servers.

Crossing the CORS crossroad

Troubleshoot CORS errors with this practical guide. Learn Access-Control-Allow-Origin headers, preflight requests, and domain allowlisting in Go.

Dysfunctional options pattern in Go

Discover a simpler alternative to functional options: method chaining with builder-style configuration that's 76x faster and easier to understand.

Einstellung effect

Why accumulated knowledge can prevent learning new paradigms, and how past expertise becomes the barrier to future growth.

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.