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 a Dashboard Test Detect Stale Data?
Freeze time and test the dashboard's freshness threshold, boundary, and visible stale state.
- What Is a Good Test for Missing Sensor Values?
Give null, absent, zero, and empty inputs separate test cases and documented meanings.
- How Can You Test Unit Conversions?
Use recognizable temperatures, inverse conversions, and a stated rounding tolerance to test both directions.
- What Tests Help Validate CSV Exports?
Round-trip difficult text through the CSV writer and parser, including commas, quotes, Unicode, and embedded newlines.
- How Do You Test a Map’s Coordinate Ordering?
Use a reference point with distinguishable latitude and longitude values and assert each documented output field.
- How Can You Test an API’s Pagination?
Use a deterministic dataset to verify page order, complete coverage, and uniqueness across page boundaries.
- What Is a Useful Test for Retry Logic?
Simulate a recoverable failure and verify bounded attempts, eventual success, and a single intended side effect.
- How Can You Test Duplicate Protocol Delivery?
Deliver one message twice and verify that deduplication prevents repeating the intended application effect.
- What Should a Schema Compatibility Test Check?
Load representative old and new messages and verify how clients handle added fields and preserved data.
- How Do You Test a Feed Refresh Failure?
Simulate a failed refresh and verify that last-known data remains visible with an honest status label.
- What Is a Boundary Test for a Schedule Date Picker?
Test the first and last supported service dates, adjacent dates, and the picker’s visible restrictions.
- How Can You Test a Sensor Spike Rule?
Use ordinary, threshold, and extreme readings to pin down exactly which values trigger a spike flag.
- What Test Verifies Timestamp Time-Zone Handling?
Test that timestamps with explicit offsets resolve to the same expected instant, even when their displayed local times differ.
- How Should You Test a Dashboard with No Results?
Use filters that return no records to verify that empty states explain the result and offer a practical route back to useful data.
- How Can You Test Screen-Reader Labels on a Chart?
Verify that a chart communicates its measures, values, and trend without requiring a reader to interpret its visual marks.
- What Is a Useful Property Test for Time Sorting?
Generate service times around midnight and assert ordering by their service-day values rather than clock-face strings.
- How Do You Test an API Error Without Leaking Internals?
Trigger a controlled failure and check that the public response is useful while omitting stack traces, secrets, and implementation details.
- How Can You Test a Data Export’s Attribution?
Inspect exported files and metadata for the source, retrieval time, license, and dataset version required by the product’s data terms.
- What Tests Catch a Broken Schedule Feed Link?
Validate a feed link in stages, from successful retrieval through archive integrity to the presence of required schedule files.
- How Do You Test Calendar Exceptions Together with Weekdays?
Create a date that is active under the weekday calendar and explicitly removed by an exception, then verify the effective service result.
- What Is a Useful Regression Test for a Sensor Replacement?
Compare station identity and relevant metadata across a documented sensor change so continuity is not assumed from a reused display name.
- What Test Checks Rounding in a Public Metric?
Test documented display precision at values on both sides of rounding boundaries, including negative values if the metric allows them.
- How Can You Test Unknown Protocol Fields?
Add an unfamiliar optional field to a protocol fixture and verify the implementation’s documented forward-compatibility behavior.
- What Is a Good Test for Partial Data Coverage?
Place data gaps at the beginning, middle, and end of a series and verify that coverage reporting identifies each accurately.
- How Should You Test a Command-Line Tool’s Exit Codes?
Exercise success, invalid input, missing source, and processing failure, then check both exit status and user-facing output.
- How Can a Small Fixture Improve Data Pipeline Testing?
A compact representative dataset makes edge cases visible and expected pipeline outputs easy to inspect.
- How Can You Inspect a GTFS ZIP from the Command Line?
List a schedule archive’s contents, extract only the files you need, and check their headers before writing a parser.
- How Do You Find the Largest Files in a Data Download?
Sort a directory listing by size to identify which downloaded files dominate storage, transfer, or processing time.
- How Can a Shell Pipeline Count Missing CSV Fields?
Use a CSV-aware parser to count empty fields accurately, since splitting lines on commas breaks quoted values.
- What Is a Safe Way to Download a Public Data File?
Download to a temporary path, check the response and file contents, then replace the existing copy only after validation.