-
-
Notifications
You must be signed in to change notification settings - Fork 556
simple-cipher: Update description.md #1653
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Others are welcome to weigh in, but I don't think
lowercaseis implied here. A truly random key would not be limited to lower case letters. Individual tracks are welcome to add test cases of their own and should not be limited to lowercase letters.alphanumericwas added during #1346.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.
The
canonical-data.jsonspecifically has a test for the key being only lowercase letters on line 40, so it isn't track-specific. This actually tripped me up, because I drew my random key fromstrings.ascii_lowercase + strings.digitsin the Python track because the instructions said "alphanumeric."I don't really care which one it is, but if the instructions don't change, then the test in
connonical-data.jsonshould be changed or removed.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.
Agreed that this is a bug. I'm in favour of changing the test to alphanum, instead of changing the description back.
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.
Changing the test will be rejected due to #1560, this is clearly not a bug.
Think of it like this: the canonical-data.json is, by definition, the canon. The description.md is a story about the canon. From the moment #1560 dropped no change, omission, or imperfection in the story can override the canon... the canon can only be (un)fixed where the canon is internally inconsistent or fundamentally wrong and the inputs given in a test should not produce the outputs described in that test.
There is no fundamental, non-personal-preference, reason why uppercase characters must be included — we have artificially constrained many exercises in artificial ways — but if a test exists that enforces that constraint then the canon has spoken and the description is wrong.
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'd vote for (1) for now. Then do (2) once #1560 is released (which will probably be once v3 is launched and all exercises in this repo become practice exercises again)
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 think it's likely obvious from what I said before, but to be explicit I'd also vote for 1 and for an Issue to be created, on hold, for making this case-insensitive in the future.
I wish there was a way for us to simply prevent a PR from being submitted without an Issue already existing and being referenced. I hate the idea of people doing work that will end up stuck.
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.
Me too! But it will get merged eventually.