-
-
Notifications
You must be signed in to change notification settings - Fork 544
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
palindrome-products: improve canonical data #1430
Conversation
I'll wait a little with merging in case Peter has more to say. |
Besides my nit picky comment I think this looks good. Thanks for making these changes @juhlig! |
The changes being proposed: I think the meaningful error message is crucial to have. I am neutral on the empty result change (as long as it's clear that there is no result, I don't really care how it's represented in JSON), so if others want that change, so be it. There are very good explanations for the changes being proposed in the PR description. I think that these changes should go in the individual commit messages as well - no harm in including them there, right? Even though the one-liner is already understandable, why not include the info in I also think each commit message should be prefixed with |
|
The two tests where the range is invalid (min>max) produce a bad error message, stating "invalid input: min is X and max is Y", which is something of a "go figure". Instead, they should specify the expectation that has been violated, namely that min must be smaller or equal to max.
Finding no palindromes in the given range should not be an error, but result in an empty result.
a4871b4
to
fbb3047
Compare
@petertseng: i prefixed the commit messages with "palindrome-products" and added a body text, much what is given in the PR description. |
Thanks for working on this @juhlig! |
The two tests where the range is invalid (
min>max
) produce a bad error message, stating "invalid input:min
is X andmax
is Y", which is something of a "go figure". Instead, they should specify the expectation that has been violated, namely thatmin
must be smaller or equal tomax
.(Addressed by commit dc69569)
Finding no palindromes in the given range should not be an error, but result in an empty result. The descriptions of the two tests in question even state "empty result for...", for that matter.
(Addressed by commit a4871b4)