Posts
SQLite Basics: Insert or Update Rows with UPSERT
UPSERT handles a uniqueness conflict as part of an INSERT. It is useful for imports, counters, and versioned records. These examples require SQLite 3.24.0 or later and use explicit …
October 19, 2026
SQLite Basics: Handle Missing Values with NULL and COALESCE
Missing values need deliberate handling. These examples find absent data, choose a display fallback, and preserve the difference between an unknown amount and zero. Prepare a …
October 19, 2026
SQLite Basics: Break Queries into Steps with Common Table Expressions
An ordinary common table expression (CTE) gives a name to a query result for one statement. Use WITH to make filtering, aggregation, and small lookup sets easier to read. These …
October 19, 2026
Python Basics: Validating Attribute Updates with Properties
A property keeps attribute-style access while running a getter or setter. Route initialization through the setter so new objects and later updates follow the same validation rules. …
October 19, 2026
Python Basics: Preserving Function Metadata in Decorators
A decorator can add behavior around a function call. A small wrapper is easy to write, but preserving the original function name and documentation makes debugging and inspection …
October 19, 2026
Python Basics: Checking Values with Truthiness, any, and all
Python conditions can use values directly. Empty containers and zero are false, which is convenient until zero or an empty value is meaningful. Make the intended test explicit. …
October 19, 2026
Python Basics: Building Useful Sorting Keys
A sorting key turns each item into the value Python should compare. Computed keys help when displayed values, missing data, or mixed sort directions need a specific policy. These …
October 19, 2026
Python Basics: Branching on Data Shapes with Pattern Matching
When input can have several shapes, match and case can unpack it while choosing the branch. These examples use Python 3.10 or newer and keep unknown input handling explicit. These …
October 19, 2026
SQLite Basics: Rank Rows and Calculate Running Totals
A window function calculates across related rows while keeping each detail row in the result. Use one when a report needs both the individual event and context such as its …
October 18, 2026
Python Basics: Giving Iterable Values Names with Unpacking
Unpacking assigns values from an iterable to several names. It can make fixed-size records easier to read and let you separate a first value, a variable middle, and a final value. …
October 18, 2026