Redowan's Reflections
Hi, I’m Redowan.
A roving amateur fumbling through software, systems, and sundry.
Recent writing
Use Python assert statements to apply runtime constraints more succinctly than raising ValueError. Learn the trade-offs and best practices.
Automatically merge Dependabot pull requests using GitHub Actions. Configure branch protection and status checks for safe automated dependency updates.
Process large CSV files without OOM errors by streaming content line-by-line with HTTPX and concurrent.futures for parallel processing.
Speed up Django bulk operations with ProcessPoolExecutor while preserving signals and hooks that bulk_create/bulk_update bypass.
Download and process S3 CSV files in memory using boto3 and tempfile.NamedTemporaryFile without cluttering disk with temporary files.
View git commit history for a single file with git log --follow. Learn to track multiple files with xargs and concatenate their commit logs.
Use operator.itemgetter for faster sorting and element access with graceful KeyError handling via methodcaller for safer operations.
Master TypeScript's never type and Python's NoReturn for exhaustiveness checking. Flatten nested conditionals with guard clauses for cleaner code.
Run background health checks in CI with nohup and ampersand. Test server readiness with retry loops and automatic cleanup on success or failure.
Fix Django REST Framework to return JSON error responses for 403, 404, 500 errors using middleware instead of default HTML pages.
Learn how Python generators decouple data production from consumption, enabling cleaner code for streaming, polling, and pipeline patterns.
Understand CPython list memory allocation: how lists store pointer references, grow dynamically, and when pre-allocation with [None]*n helps.
Embracing sentence case over title case in technical writing eliminates capitalization ambiguity and improves readability.
Prevent excessive file downloads in Python by streaming with HTTPX and limiting file size with chunk-based validation and memory-safe processing.
Leverage Python's __post_init__ hook to declaratively transform dataclass fields. Automatically serialize data with clean, maintainable code.