Mixed review
Answer from memory. A pause between study and review makes learning last.
After this page, you can:
- recall the main rules of both tracks without looking at the pages
- find the topics that you need to read again
How to use this review
Wait two or three days after you finish a page. Then answer the questions here. The questions come in mixed order on purpose. Mixing topics makes recall harder, and that makes learning stronger.
- Read one question.
- Say the answer aloud or write it down.
- Open the answer and compare.
- Mark each wrong answer. Follow its link and read that part again.
Round 1: the method
Is Inventory Level Recalculated a good Event?
Answer
No. It is a calculation, so it belongs in a Read Model. Building blocks
A Command is refused because a rule does not hold. What does the system record?
Answer
No Event. Nothing happened. You write the refusal as an example with a reason. Examples
Name the six stages of a session, in order.
Answer
Scope and roles. Events and their order. Screens, Commands, and Automations. Read Models and owners. Scenarios and checks. Slices and reasons. Steps
Why does a todo list have no status field?
Answer
A row means that work is open. An opening Event adds the row, and a completion Event removes it. Patterns
One Screen starts two Commands. What do you do?
Answer
Split it into two Screen states, one for each action. The team calls this shape the bed. It is always a problem. Review
A payment provider sends the same message twice. What must happen?
Answer
The system records the fact once. A translation must be idempotent, which means safe to run twice. Review
Round 2: the tool and the language
Which block writes a Translation?
Answer
There is no translation block. Write an automation that consumes an Event of a bounded context with external = true. Patterns
How do you refer to the Event pet_added of the context pet_management?
Answer
Write event.pet_management.pet_added, without quotes. A quoted value is a string, not a reference. Language
Why is field "pet_name" {} invalid?
Answer
Every field needs a type. The tool does not guess a type from the name. The code is EM009. Language
How many when steps does a State View scenario have?
Answer
None. It has Event given steps and a Read Model then step. Scenarios
What does --profile strict change?
Answer
It turns EM404 (a Command with no reason) and EM406 (an open hotspot) into errors. Core errors are errors in every profile. The tool
Which command checks the format in CI without changing a file?
Answer
emhcl fmt --check. The tool