swift icon indicating copy to clipboard operation
swift copied to clipboard

Space Age: Give better instructions for what to learn

Open alexito4 opened this issue 6 years ago • 1 comments

I sometimes find the exercises focus too much on the problem (sometimes too much math) instead of giving clues about what's suposed to be learned around Swift.

For example, I was doing the Space Age exercise and after finishing it I wondered what was the purpose of it, I don't think that writing so many divisions helps at all understand floating point math. Of course I have years of experience and for me it was just writing divisions, but I wondered what was the point that the exercise was trying to make.

Then I saw

Screenshot 2019-04-28 at 19 05 18

discriminated unions? why would I need to learn about that for this exercise? I thought about it but it didn't occur to me. Then I looked at the community solutions until I found https://exercism.io/tracks/swift/exercises/space-age/solutions/c4b8c3a1589543559c1e3214da234b8d which seems okey but I would have never thought about using enums for that.

I don't think is a bad idea but if we want the students to learn about enums on this exercise we should mentioned it and probably write the tests in relation to that. Changing all the properties on the tests for a single function func age(on planet: Planet) -> Double would probably be a better guide to the student.

as an aside, I'm not sure if it's possible but we should say enums not "discriminated unions", as that's not how they're called in Swift.

alexito4 avatar Apr 28 '19 18:04 alexito4

Could you summit a PR? I am not sure i got an action item from the above. Sometimes it is up to the track to decide what to focus on and how to highlight features in the language to do the problem.

masters3d avatar Apr 28 '19 18:04 masters3d