ORIGINAL COMPANY-CONTEXT PRACTICE
Compare manufacturing recipes with meaningful numeric tolerances
Original practice scenario: A hypothetical equipment-software tool compares two processing recipes stored as structured documents. Field order, units and numeric precision differ. Design a useful comparison.
Written for independent practice using company context; this is not a verified question from a company interview.
A REASONED APPROACH
Model answer.
Separate representational differences from meaningful parameter changes using a versioned schema. A raw file hash detects changed bytes but cannot explain whether two recipes specify equivalent values.
Work through it
- Parse and validate required fields, parameter identity, units and ordered versus unordered collections, preserving the original documents for traceability.
- Canonicalize only under approved rules, applying per-parameter absolute or relative tolerances with explicit handling for zero, missing and non-finite values.
- Return a structured difference with original and normalized values, testing boundaries, reordered steps and unsupported schema versions instead of just a Boolean match.
Tradeoffs to discuss
- Semantic normalization reduces noisy differences but can hide real changes if its assumptions are too broad; raw differences remain useful supporting evidence.
Common pitfalls
- Do not sort a sequence when processing order matters.
- Passing a numeric tolerance is not authority to substitute a manufacturing recipe without the required reviewed approval.