Redowan's Reflections

Recent writing

Colon command in shell scripts

Use the colon : command as a no-op in Bash scripts for cleaner debug output with -x flag. Alternative to echo for section markers and comments.

Faster bulk_update in Django

Accelerate Django bulk_update operations by 4x using multiprocessing to parallelize database writes across chunked record batches.

Auditing commit messages on GitHub

Automate commit message validation with GitHub Actions. Enforce refs and closes patterns to maintain clean Git history and link commits to issues.

To quote or not to quote

Master shell quoting rules: single vs double quotes, backticks vs $(). Learn when to quote variables to prevent spaces and special characters from breaking commands.

Returning values from a shell function

Understand how return values work in Bash functions. Learn exit codes, status evaluation patterns, and proper boolean returns with true/false commands.

Recipes from Python SQLite docs

Practical SQLite recipes for Python: execute statements, batch operations, transactions, row factories, and context managers with sqlite3.

ExitStack in Python

Master Python's ExitStack for managing multiple context managers, conditional callbacks, request rollbacks, and avoiding nested with statements.