Redowan's Reflections
Hi, I’m Redowan.
A roving amateur fumbling through software, systems, and sundry.
Recent writing
Implement single-method interfaces with function types instead of structs. Master http.HandlerFunc patterns for middlewares, mocks, and adapters.
Complete SSH setup guide: key pairs, authorized_keys, sshd_config, ssh_config, known_hosts, agent forwarding, and hardening for secure remote access.
Clean up pytest test signatures using @pytest.mark.usefixtures to inject implicit fixtures without autouse or unused parameter warnings.
Catch method override errors at type-check time with Python's @override decorator from PEP 698, preventing typos and signature mismatches.
Speed up Python module imports with __getattr__ from PEP 562 for lazy loading, deprecation warnings, and dynamic attribute access.
Master Docker mount types: volumes, bind mounts, tmpfs, and build cache. Clear syntax comparison between -v and --mount options with docker-compose.
Implement topological sorting in Go to order tasks by dependencies. Process directed acyclic graphs for build systems and scheduling.
Build a production-ready circuit breaker in Go from scratch with closed, open, and half-open states to prevent cascading failures.
Automate environment variables per directory with direnv. Load .envrc files on entry, unload on exit. Integrate with Python venv and uv workflow.
Deep dive into event-driven architecture patterns. Learn publish-subscribe, CQRS, outbox pattern, eventual consistency, and handling microservice coupling.
Master Bash namerefs with declare -n to create dynamic variable references. Build generic functions for arrays and associative arrays without eval.
How this blog is built: Hugo static site generator, GitHub Actions deployment, Cloudflare caching, and R2 storage. Simple, stable, and cost-free.
Complete guide to Bash redirection. Master stdout, stderr, pipes, tee, file descriptors, and shorthand syntax with practical examples for every case.
Test HTTP requests in Python with pytest-httpx for full mocking, respx for pattern matching, or VCR.py for recording real responses.
Write readable parametrized tests with pytest.param for better test names, conditional skips, custom IDs, and structured test data.