Feedback — Sultan A | DDD Exercise
All 8 exercises: COMPLETE ✅
| Exercise |
Topic |
Status |
Highlights |
| 1 |
Primitive Price |
✅ |
Branded type, rejects negatives + values > 1000 |
| 2 |
Primitive Quantity |
✅ |
Rejects non-integers, zero, negatives, > 100 |
| 3 |
String Confusion |
✅ |
Separate branded types for Email, Phone, Name |
| 4 |
Table Capacity |
✅ |
Entity with private constructor + invariant enforcement |
| 5 |
Identity Crisis |
✅ |
ORD-XXXXX format + Repository pattern for uniqueness |
| 6 |
Temporal Logic |
✅ |
Correctly handles overnight spans (22:00 → 06:00) |
| 7 |
Currency Confusion |
✅ |
Stores money as integer cents, blocks mixed currencies |
| 8 |
Email Validation |
✅ |
"Parse, Don't Validate" — trims, lowercases, rejects 5/6 bad inputs |
Assignment requirements compliance
| Requirement |
Result |
| No negative prices/quantities |
PASS |
| No empty strings (name, email, phone) |
PASS |
| No invalid emails |
PASS |
| No invalid phone numbers |
PASS |
Standout quality
- Branded types used consistently across all exercises — no primitive obsession
- Private constructors + factory methods (
create(), parse()) enforce valid construction everywhere
- Repository pattern in Ex5 is correctly implemented, not just faked
- Overnight hours in Ex6 handled with correct OR logic — many students get this wrong
- Money as integer cents in Ex7 — shows real understanding of the floating-point pitfall
tsconfig.json has strict: true and the code respects it
Minor observations
- Email regex is simple (not RFC 5322) — fine for a teaching exercise
- Order ID generation uses timestamp slicing, low but non-zero collision risk
Grade: 18/20
Everything is done and done correctly, with thoughtful extras (smart constructors, immutability, proper encapsulation). The only thing missing for a 20 would be slightly more robust format validation and comments explaining the business rationale behind specific limits.
Feedback — Sultan A | DDD Exercise
All 8 exercises: COMPLETE ✅
ORD-XXXXXformat + Repository pattern for uniquenessAssignment requirements compliance
Standout quality
create(),parse()) enforce valid construction everywheretsconfig.jsonhasstrict: trueand the code respects itMinor observations
Grade: 18/20
Everything is done and done correctly, with thoughtful extras (smart constructors, immutability, proper encapsulation). The only thing missing for a 20 would be slightly more robust format validation and comments explaining the business rationale behind specific limits.