exercism / lfe

Exercism exercises in Lisp Flavoured Erlang (LFE).
https://exercism.org/tracks/lfe
MIT License
25 stars 30 forks source link

Update space-age test suite #225

Closed BNAndras closed 5 months ago

BNAndras commented 5 months ago

There are eight community solutions for this exercise, and seven of them would break if we add the invalid planet test because they only check the eight atoms. That also includes the CI example so I think it's easier to mark the invalid planet test as not included.

kotp commented 5 months ago

And yet there are only 8 solutions. Should we? But then on the other side of the problem, if you want to explore adding another celestial body that orbits, should we stop that from happening?

BNAndras commented 5 months ago

The CI breaks on occasion like this. For a while it was binary, but this time it's phone-number. Erik and I couldn't see anything obviously wrong with the exercises so I think it's some part of the make process that hiccups.

But yeah, I have similar reservations about the sun test case. For starters, the sun isn't a planet but a star so saying "invalid planet" is misleading. Is it invalid because it's not a planet? Is it because it's not on the exercise's list of valid planets? Or is a valid planet just one that orbits the sun like Earth does? Then sun is excluded because it orbits the center of the Milky Way Galaxy and not itself.

Honestly, the canonical test could have used a clearly fictional planet like "Planet X", but I'm not sure it's worth the churn across all the tracks at this point.

kotp commented 5 months ago

The CI breaks on occasion like this. For a while it was binary, but this time it's phone-number. Erik and I couldn't see anything obviously wrong with the exercises so I think it's some part of the make process that hiccups.

But yeah, I have similar reservations about the sun test case. For starters, the sun isn't a planet but a star so saying "invalid planet" is misleading. Is it invalid because it's not a planet? Is it because it's not on the exercise's list of valid planets? Or is a valid planet just one that orbits the sun like Earth does? Then sun is excluded because it orbits the center of the Milky Way Galaxy and not itself.

Honestly, the canonical test could have used a clearly fictional planet like "Planet X", but I'm not sure it's worth the churn across all the tracks at this point.

On another track when I mentor I will sometimes ask how to add "Pluto" which is deemed an "invalid" for any of the reasons listed as it not being on the list, or not classified as a planet any more. It is to exercise a specific language feature, but still, unless this exercise is about input validation, leave it to the mentoring session, in my opinion.