Learning objectives
- Treat every operation as a typed transformation
- Choose operation order from the data layers
- Pause before a suspected failure point
- Recognize when an operation expects text, bytes, a number, or structured data
- Reduce an exploratory workflow to the smallest reproducible recipe
The layer rule
Recipes normally reverse layers from the outside inward. If a compressed value was later Base64-encoded, decoding must happen before decompression:
original text → Gzip → Base64
Base64 text → From Base64 → Gunzip → original textInstall Decode Base64 and Gunzip and reverse the two operations. The failed order is useful evidence: Gunzip expects binary data beginning with a Gzip header, not printable Base64 characters.
Step through intermediate values
Use the workspace step control or add a breakpoint before the operation you want to inspect. At every boundary, record:
- The output type
- A recognizable prefix or structure
- The assumption that justifies the next operation
- Whether the operation could silently normalize or discard data
Compare two similar inputs
Try Decode PowerShell EncodedCommand with and without the Decode text step. The Base64 decoder returns the correct bytes, but the wrong character interpretation makes the output look corrupted. The workflow is incomplete until byte encoding is explicit.
Debugging checklist
- Confirm the first operation matches the outermost representation.
- Check delimiters, alphabets, and character encodings.
- Inspect a short, known sample before processing a large value.
- Disable later operations until the earliest wrong intermediate value is found.
- Add operations back one at a time.
- Replace Magic with the confirmed explicit chain.
Assignment
Build a workflow that converts a compact JSON document to YAML. Add an unnecessary Base64 decoder at the beginning, observe the failure, and then explain why JSON to YAML needs structured text rather than arbitrary decoded bytes.