Intermediate Debugging Examples

Posted

I’m thinking about extending this set of debugging examples with the more complex examples described below. I’d be very grateful for feedback: would they be useful? Would they be useful to you? What other examples could be included, or should be included instead of some of the ones I’ve outlined?

Log Ingestion Pipeline

A command-line Python tool that reads application log files, normalizes each line, extracts structured fields, and loads them into SQLite for later querying.

Concurrent Web Crawler

A Python crawler using httpx with a thread or asyncio worker pool that fetches pages, normalizes URLs, deduplicates by content hash, and records pages and links in SQLite.

Library Lending API

A FastAPI application with SQLite persistence and an htmx front end for a small library: books, members, loans, and holds.

Job Queue with Retries

A Python worker pool backed by a SQLite jobs table that claims, runs, and marks jobs done, with retry and exponential backoff.

Checkout Wizard

A multi-step checkout workflow where an Alpine.js front end holds state across steps and a FastAPI backend validates and submits the order.

Report Generator

A Python command-line tool that reads SQLite, groups records into day/week/month buckets, and emits CSV or HTML.

Incremental Backup Tool

A Python command-line tool that walks a source tree, content-hashes files, deduplicates, and copies changed files into a backup directory while recording a manifest in SQLite.

Legacy Data Migration ETL

A Python script that reads a legacy SQLite schema and writes a normalized schema for the same data.

Notification Dispatcher

A Python daemon that polls a SQLite outbox table, sends each pending message (email or HTTP), and marks it sent.

Plugin-Based CLI

A Python command-line tool (argparse or typer) that loads plugins from a directory; plugins register subcommands and share a config object.

Metrics Dashboard

A dashboard where htmx polls a FastAPI endpoint for JSON and Alpine.js renders charts, backed by SQLite sample storage.

Session & Auth Service

A FastAPI application with SQLite and an htmx front end that logs users in, issues a session token, validates it in middleware, and invalidates it on logout.