A code-first approach starts by implementing a representation before fully investigating what the data means. Developers often map visible JSON shapes mechanically: text becomes String, numbers become int or double, and the result looks precise before its domain semantics are understood. section 3.1
A measurement with hidden meaning
A drying-oil measurement may contain a sample identifier, elapsed days, and contact angle. A first Java translation is record Measurement(String sampleId, int daysElapsed, double contactAngle) {}. Returning to the data then exposes unanswered questions: elapsed days include zero and may be sparse, while contact angle has a bounded degree range and hundredth-degree precision. section 3.1
Use the approach as a starting point, then interrogate each representation:
- Ask “what does this mean?” repeatedly, beginning with the most basic question about each domain idea. section 3.1
- Record discovered constraints explicitly instead of leaving them hidden behind primitive fields. section 3.1
Listing 3.2 A mechanical translation from JSON to Java
record Measurement(
String sampleId, #A
int daysElapsed, #A
double contactAngle #A
) {}Inspect the mechanical JSON-to-Java translation, then compare each field with the domain notes to find missing semantics. section 3.1




