Skip to content

Space Age: Give better instructions for what to learn #382

@alexito4

Description

@alexito4

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationComments, Hints, website documentation or Help files.enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions