The notebook index
Earlier notes
Earlier reference notes remain available at their existing addresses. The current blog concentrates on programming languages, protocols and self-hosted software.
310 notes.
- How Can You Compare Two Schedule Feed Versions?
Unpack two feed versions into separate directories, normalize line endings, and diff selected tables before investigating changes.
- How Do You Search Logs for a Failed Refresh?
Narrow logs by source identifier and time window, then read surrounding events to understand the failure sequence.
- How Can a CLI Report Progress Without Corrupting Output?
Send human-facing progress messages to standard error and keep standard output reserved for the command’s data result.
- What Should a Data Import Command Print on Failure?
Report the affected input and the actionable cause, then exit unsuccessfully so scripts do not mistake the import for a success.
- How Can You Check a JSON API Response from a Terminal?
Inspect the HTTP response and parse the body as JSON before relying on fields or values returned by an endpoint.
- How Do You Convert Celsius Readings in a Small Shell Workflow?
Apply the documented Fahrenheit conversion and label both input and output units so transformed readings remain interpretable.
- What Is a Useful Command-Line Exercise for Timestamps?
Parse timestamps with explicit offsets, convert them to a common instant, and compare the result instead of comparing clock text.
- Why Should a CLI Avoid Printing Secrets?
Keep credentials out of command arguments and logs, and redact configuration values before producing diagnostics.
- How Can a Command-Line Tool Support a Dry Run?
A dry run should report the changes a command would make while preventing file writes and external requests.
- How Do You Make a CLI Output Reproducible?
Control sorting, locale, and time-zone assumptions, and record the exact input version used to generate output.
- What Is a Practical Use for Standard Input in a Data Tool?
Accepting piped data makes a small command-line tool easy to compose, while an explicit file option keeps named inputs clear and repeatable.
- How Can You Check Whether a Feed Archive Is Corrupt?
Check an archive’s integrity and identify a damaged member before letting ingestion treat its contents as valid input.
- How Should a CLI Handle an Unknown Option?
Reject unrecognized options with concise guidance and a failing status, rather than silently proceeding under an unintended configuration.
- How Can You Inspect HTTP Cache Headers from the Terminal?
A header-only request can reveal cache directives and validators, helping diagnose freshness behavior without downloading a full response body.
- What Is a Useful Shell Command for Sampling Sensor Data?
Use a time filter to select a manageable interval, retain the header, and verify that timestamps survive the sampling step.
- How Do You Make a Long-Running Import Interruptible?
Handle termination as a controlled stop, and keep partial output clearly separate from a completed import.
- How Can a CLI Explain Its Time-Zone Assumption?
Make the zone behind local-time calculations visible in help and results so the same input does not silently mean different instants.
- What Is a Reliable Pattern for Temporary Output Files?
Build and validate a candidate output beside its destination, then replace the destination only after the candidate is complete.
- How Can You Count GTFS Trips for a Service Date?
Determine which service IDs operate on the requested date, apply calendar exceptions, then count trips assigned to those IDs.
- How Should a CLI Distinguish Warnings from Errors?
Separate recoverable conditions from failed operations in both wording and exit behavior, so people and scripts can respond sensibly.
- How Do You Inspect a Process’s Environment Safely?
Check only the variables needed to diagnose a process, and keep credentials out of shared terminal captures and logs.
- What Is a Useful Command-Line Check for Duplicate IDs?
Parse the identifier column by name and report every repeated value with its source rows, rather than relying on fragile column positions.
- How Can You Make a Data Download Resumable?
Resume from a partial file only when the server supports byte ranges, then verify the completed download before publishing it as usable data.
- How Should a CLI Print Machine-Readable Errors?
Offer a structured error mode with stable codes and concise details, while keeping diagnostics separate from ordinary output.
- What Should a CLI Help Page Explain?
A useful help page explains the command’s inputs, outputs, defaults, exit behavior, and a realistic example that users can adapt.
- What Belongs in a Public Data Source Note?
A useful source note tells readers who publishes the data, how it is retrieved, when it changes, what terms apply, and where interpretation has limits.
- How Should a Field Reference Explain a Timestamp?
A timestamp definition should make clear what event it marks, how it is encoded, which time zone applies, what precision is meaningful, and how absence is represented.
- What Makes a Setup Guide Reproducible?
A reproducible setup guide gives readers a known starting point, commands they can follow, observable checkpoints, and the version assumptions that shape the result.
- How Can Documentation Explain a Data Gap?
Good gap documentation identifies the missing scope, distinguishes missing records from zero values, and explains the limits the gap places on comparisons.
- How Should a Project Document Its License?
License documentation should identify code and data terms separately, point to the complete legal text, and explain which files each notice covers.