Redowan's Reflections
Early return and goroutine leak
Lifecycle management in Go tests
Gateway pattern for external service calls
Flags for discoverable test config in Go
You probably don't need a DI framework
Preventing accidental struct copies in Go
Go 1.24's "tool" directive
Capturing console output in Go tests
Deferred teardown closure in Go testing
Three flavors of sorting Go slices
Nil comparisons and Go interface
Stacked middleware vs embedded delegation in Go
Why does Go's io.Reader have such a weird signature?
Go slice gotchas
The domain knowledge dilemma
Hierarchical rate limiting with Redis sorted sets
Dynamic shell variables
Link blog in a static site
Running only a single instance of a process
Function types and single-method interfaces in Go
SSH saga
Injecting Pytest fixtures without cluttering test signatures
Explicit method overriding with @typing.override
Quicker startup with module-level __getattr__
Docker mount revisited
Topological sort
Writing a circuit breaker in Go
Discovering direnv
Notes on building event-driven systems
Bash namerefs for dynamic variable referencing
Behind the blog
Shell redirection syntax soup
Shades of testing HTTP requests in Python
Taming parametrize with pytest.param
HTTP requests via /dev/tcp
Log context propagation in Python ASGI apps
Please don't hijack my Python root logger
The *nix install command
Here-doc headache
The sane pull request
I kind of like rebasing
Protobuffed contracts
TypeIs does what I thought TypeGuard would do in Python
ETag and HTTP caching
Crossing the CORS crossroad
Dysfunctional options pattern in Go
Einstellung effect
Strategy pattern in Go
Anemic stack traces in Go
Retry function in Go
Type assertion vs type switches in Go
Patching pydantic settings in pytest
Omitting dev dependencies in Go binaries
Eschewing black box API calls
Annotating args and kwargs in Python
Rate limiting via Nginx
Statically enforcing frozen data classes in Python
Planning palooza
Reminiscing CGI scripts
Debugging dockerized Python apps in VSCode
Banish state-mutating methods from data classes
Finding flow amid chaos
The diminishing half-life of knowledge
Oh my poor business logic
Pesky little scripts
Footnotes for the win
Dotfile stewardship for the indolent
An ode to the neo-grotesque web
Self-hosted Google Fonts in Hugo
Configuring options in Go
Dummy load balancer in a single Go script
Limit goroutines with buffered channels
Writing a TOTP client in Go
Interface guards in Go
Writing on well-trodden topics
Go structured logging with slog
Notes on exit interviews
Taming conditionals with bitmasks
Using DNS record to share text data
Memory leakage in Python descriptors
Unix-style pipelining with Python's subprocess module
Enabling repeatable lazy iterations in Python
Descending into the aether
Escaping the template pattern hellscape in Python
Python dependency management redux
Implementing a simple traceroute clone in Python
Bulk request Google search indexing with API
Building a CORS proxy with Cloudflare Workers
Fixed-time job scheduling with UNIX 'at' command
Sorting a Django queryset by a custom sequence of an attribute
Periodic readme updates with GitHub Actions
Associative arrays in Bash
Deduplicating iterables while preserving order in Python
Process substitution in Bash
Dynamic menu with select statement in Bash
Simple terminal text formatting with tput
Building a web app to display CSV file stats with ChatGPT & Observable
Pushing real-time updates to clients with Server-Sent Events (SSEs)
Tinkering with Unix domain sockets
Signal handling in a multithreaded socket server
Switching between multiple data streams in a single thread
Skipping the first part of an iterable in Python
Pausing and resuming a socket server in Python
Debugging a containerized Django application in Jupyter Notebook
Manipulating text with query expressions in Django
Using tqdm with concurrent.fututes in Python
Colon command in shell scripts
Faster bulk_update in Django
Installing Python on macOS with asdf
Save models with update_fields for better performance in Django
Python logging quirks in AWS Lambda environment
Dissecting an outage caused by eager-loading file content
Auditing commit messages on GitHub
To quote or not to quote
Returning values from a shell function
Verifying webhook origin via payload hash signing
Recipes from Python SQLite docs
Prefer urlsplit over urlparse to destructure URLs
Pick random values from an array in SQL(ite)
ExitStack in Python
Compose multiple levels of fixtures in pytest
Patch where the object is used
Partially assert callable arguments with 'unittest.mock.ANY'
When to use 'git pull --rebase'
Apply constraints with 'assert' in Python
Automerge Dependabot PRs on GitHub
Stream process a CSV file in Python
Bulk operations in Django with process pool
Read a CSV file from s3 without saving it to the disk
Distil git logs attached to a single file
Safer 'operator.itemgetter' in Python
Guard clause and exhaustiveness checking
Health check a server with 'nohup $(cmd) &'
Return JSON error payload instead of HTML text in DRF
Decoupling producers and consumers of iterables with generators in Python
Pre-allocated lists in Python
In favor of sentence case
Disallow large file download from URLs in Python
Declaratively transform data class fields in Python
Caching connection objects in Python
How not to run a script in Python
Mocking chained methods of datetime objects in Python
Declarative payloads with TypedDict in Python
Parametrized fixtures in pytest
Modify iterables while iterating in Python
Github action template for Python based projects
Self type in Python
Patching test dependencies via pytest fixture & unittest mock
Narrowing types with TypeGuard in Python
Why 'NoReturn' type exists in Python
Add extra attributes to enum members in Python
Peeking into the internals of Python's 'functools.wraps' decorator
Limit concurrency with semaphore in Python asyncio
Amphibian decorators in Python
Go Rusty with exception handling in Python
Variance of generic types in Python
Create a sub dictionary with O(K) complexity in Python
Gotchas of early-bound function argument defaults in Python
Use 'assertIs' to check literal booleans in Python unittest
Static typing Python decorators
Inspect docstrings with Pydoc
Check whether an integer is a power of two in Python
Uniform error response in Django Rest Framework
Difference between constrained 'TypeVar' and 'Union' in Python
Don't wrap instance methods with 'functools.lru_cache' decorator in Python
Cropping texts in Python with 'textwrap.shorten'
String interning in Python
Structural subtyping in Python
Automatic attribute delegation in Python composition
Access 'classmethod's like 'property' methods in Python
Don't add extensions to shell executables
Use __init_subclass__ hook to validate subclasses in Python
Running tqdm with Python multiprocessing
Use daemon threads to test infinite while loops in Python
Use 'command -v' over 'which' to find a program's executable
Write git commit messages properly
Python's 'functools.partial' flattens nestings Automatically
Use curly braces while pasting shell commands
Use strict mode while running bash scripts
Pedantic configuration management with Pydantic
Interfaces, mixins and building powerful custom data structures in Python
Deciphering Python's metaclasses
Implementing proxy pattern in Python
Effortless API response caching with Python & Redis
Untangling Python decorators
Effortless concurrency with Python's concurrent.futures
No really, Python's pathlib is great
Running Python linters with pre-commit hooks
Generic functions with Python's singledispatch
The curious case of Python's context manager
Reduce boilerplate code with Python's dataclasses
2025
2024
About
Blogroll
Docker sidecar communication with Unix Domain Socket (UDS)