Redowan's Reflections
Hi, I’m Redowan.
A roving amateur fumbling through software, systems, and sundry.
Recent writing
Complete guide to Python decorators from first principles. Learn closures, higher-order functions, decorator patterns, and advanced techniques.
Master Python's concurrent.futures module for easy threading and multiprocessing. Learn ThreadPoolExecutor and ProcessPoolExecutor with examples.
Replace os.path with Python's pathlib for elegant, object-oriented path manipulation with intuitive operators and unified file operations.
Automate Python code quality with pre-commit hooks running Black, isort, flake8, and mypy before each git commit for consistent formatting.
Replace complex if-elif chains with functools.singledispatch for type-based function dispatch and cleaner polymorphic behavior in Python.
Deep dive into Python context managers. Learn to write custom managers with __enter__/__exit__, use contextlib decorators, and manage resources elegantly.
Master Python dataclasses to eliminate boilerplate code. Learn ordering, immutability, hashing, default values, and post-init processing.