Space Age
(solving an exercism.io problem with metaprogramming)
exercism.io
- (*I am not afilliated with)
- do small things well
exercism.io
Problem
Repetition
Issues
- Repetition (ok in tests (maybe); not ok in non-tests)
- Magic numbers (context kinda makes it ok?)
- Separation of concerns (lack of) - coefficients should be together
- No trailing comma
Issues
- Spacing/formatting
- Planet map is not named
- Hardcoding a value derived from the original numbers, not the original data
Lessons
- Style is important
- There are many ways to write anything