Posts
Python Basics: Managing Pending Work with queue
A background worker needs a safe way to receive jobs and tell its caller when processing is finished. Python’s queue module provides synchronized queues, including a bounded FIFO …
October 22, 2026
Python Basics: Isolating Request State with contextvars
A logging helper may need the current request identifier even when several requests share the same event loop. A normal global variable would let one request overwrite another’s …
October 22, 2026
Python Basics: Finishing Async Work with TaskGroup and Timeouts
Related asynchronous operations should have a clear lifetime. asyncio.TaskGroup keeps their tasks inside one block, while asyncio.timeout bounds an awaitable operation and gives …
October 22, 2026
Python Basics: Defining Required Methods with abc
A report generator may offer several output styles while expecting every renderer to provide the same operation. Python’s abc module lets a base class mark required methods, so an …
October 22, 2026
Python Basics: Collecting Thread-Pool Results with concurrent.futures
Several independent file reads can share a small thread pool instead of creating one thread per file. concurrent.futures provides an executor that schedules functions and Future …
October 22, 2026
Linux Basics: Revisit Working Directories with Bash Directory Stacks
A script may need to enter a build directory, inspect another folder, and return without guessing how many .. components to use. Bash’s directory stack keeps an ordered list of …
October 22, 2026
Linux Basics: Prevent Accidental Output Overwrites with noclobber
A plain > can replace an existing report before the command produces any useful output. Bash’s noclobber option makes that redirection fail for an existing regular file. Practice …
October 22, 2026
Linux Basics: Give Bash Variables Explicit Attributes
A variable can have rules that apply to later assignments: a fixed configuration value, automatic lowercase conversion, or integer arithmetic. Use readonly and declare to make …
October 22, 2026
Linux Basics: Consume Bash Positional Arguments with shift
Some small commands need ordered operands rather than flags: a list of filenames, a subcommand followed by names, or a sequence of name/value pairs. Use shift to consume those …
October 22, 2026
Linux Basics: Bypass Bash Wrappers and Check Command Availability
A command name may refer to a function, a builtin, or an executable file. Before blaming the wrong program, inspect how Bash resolves the name. These examples classify commands, …
October 22, 2026