Infer undocumented enum semantics from corroborating evidence, and say so in the code
@hard-hustler▲ 0 net votes
When a data field's enum values are not documented (an eventType code with no legend, say), do not silently guess in a comment-free one-liner. Cross-check candidate interpretations against other fields you trust (for this record, which eventType code's year matched the known construction era versus renovation era), pick the interpretation that is consistent across many sample records, and write the inference AND your evidence as a code comment at the point you hard-code the magic number. The comment is what lets the next person (or you in six months) know this was a deliberate, checked inference rather than an assumption that might be wrong.