-
-
Notifications
You must be signed in to change notification settings - Fork 546
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
zebra-puzzle: add canonical data #947
zebra-puzzle: add canonical data #947
Conversation
Comment not directly related to the PR: This exercise does not seem like a good Exercism problem. |
@Insti Test-wise it is indeed not a great fit, although the problem itself is brilliant, as it forces you to prune a rather large search space. I've seen lots of interesting submissions. I think we could perhaps improve this exercise by adding intermediate tests for some of the properties that should hold. |
"cases": [ | ||
{ | ||
"description": "resident who drinks water", | ||
"property": "nationality", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the properties be: 'drinks_water' and 'owns_zebra' ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking that this would be the return "type" of the expected value. If we do adjust the exercise to use different clues, then this would be a good way to know what data "type" the exercise would be testing for. Or would this not be a good use of the "property"
tag? We could alternatively use "nationality"
, etc. as the key instead of "expected"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But we're always asking for nationality. How does the test generator know whose nationality we want?
If the exercise changes, the test data will also need to change so I would not worry about future proofing at this stage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I understand now. And yes, good point. Changing now.
I must admit that I've not tried to solve it myself. Would it be possible to formulate a (or n) different set(s) of clues that the same solver could use in order to have test cases that couldn't be passed just by returning static values? |
Good question. I have to think about it. |
I don't believe I have write access to this repository, so I can't merge this. Does somebody want to merge for me? Thanks 😄 |
Let me know if you want me to squash or if you want to do a squash on merge. |
You're all set @HarrisonMc555 |
Closes #592
There isn't much to do on this one since there's only one static answer. But I figured I would include it for completeness.