I’m in the process of syncing the exercise “series” with problem-specifications. There is a controversial test case in there which I’m planning to remove. I’m asking for feedback if this is the right choice.
A couple relevant links:
- original reason for the test case in the PR which added the exercise
- issue with discussion about why students are confused
- my draft PR (tests.toml contains my reasoning for the removal, but I’ll summarize here)
The controversial test case expects the following:
series("12345", 0) -> ["", "", "", "", "", ""]
There is some mathematical beauty in this, but many find it confusing. The problem-specifications repository actually defines 0
as invalid input! But the exericse interface doesn’t allow error handling, adding that now would be a breaking change.
My goals are:
- Don’t break existing solutions unnecessarily.
- Deviate as little as possible from problem-specifications.
- Don’t confuse students.
I believe there isn’t any significant understanding of the language Rust to be gained from making this test pass. Since I consider its value low (others might have a different opinion), I would just remove the test and leave this edge case undefined.
What do you think?
Alternatives to consider
Add the original, controversial test case as an additional, custom test. This would preserve the original intention and difficulty of the exercise.