DRY
easy 40 minDon't repeat yourself: every piece of knowledge has one home, and everything else asks that home.
Watch lesson4:18
What each level should show
The same question is judged differently for mid, senior and staff.
Junior
Must show
- Explains the cost of a copy
- Extracts a function and a constant
- Tests the shared part
Will be probed on
- What is WET?
- Is it only about code?
Stands out
Also shares the rounding, and not only the rate.
Mid
Must show
- Asks for the reason to change
- Leaves equal text apart when owners differ
- Uses a value class
Will be probed on
- Rule of three
- Helpers with flags
Stands out
Says aloud why two similar parts stay separate.
Senior
Must show
- Undoes a wrong abstraction safely
- Chooses between library, service, schema, examples
- Names who is in charge of a derived copy
Will be probed on
- Order price
- Version skew
- DRY in tests
Stands out
Plans the switch of a shared rule by date.
Staff
Must show
- Shares across teams only with an owner
- Weighs coupling against copies
- Offers a way out of shared tools
Will be probed on
- Shared model packages
- Mandatory platforms
Stands out
Measures which files change together before merging anything.