|
||
---|---|---|
src | ||
tests | ||
.gitignore | ||
Makefile | ||
README.md | ||
composer.json | ||
phpunit.xml | ||
psalm.xml |
README.md
TDD Workshop exercise
- Host: FlyerAlarm
- Date: 2019-09-19
- Trainer: Stefan Priebsch (https://thephp.cc)
Task
Write a generator for Roman Numbers (https://en.wikipedia.org/wiki/Roman_numerals).
Rules & expectations
Symbol | Value |
---|---|
I | 1 |
V | 5 |
X | 10 |
L | 50 |
C | 100 |
D | 500 |
M | 1000 |
- Assume that integers between 1 and 3000 are being passed.
- Develop in a test-driven manner, writing a minimal failing test, then just as much code as you need to make the test pass.
- Only refactor on green.
- Do NOT try to think about the structure up front. The design will emerge through refactoring.
- You should probably start with the following test: 1 -> I
Remember:
The goal is not to get as far as possible, but to practice the TDD process. Do not rush to get as much as possible completed, but put a strong focus on the red/green/refactor cycle.
If you get bored:
Try parsing Roman Numbers as well.