java
java copied to clipboard
Rotational Cypher doesn't test non ascii letters.
The Rotational Cypher tests do not include any test for non ascii letters (accented ones in Latin or other alphabet ones) The README file suggest that only letters in the 'a'-'z' and 'A'-'Z' range should be rotated. So the natural implementation should be to avoid rotating characters out of this range.
But because this not tested, implementors use to resort to Character.isLetter, Character.isUpperCase and so on.
IMHO That is giving the wrong message to students, about Character manipulation methods.
My suggestion is to add a test that includes not ascii letters, and may be, improve the exercise instructions (README file).
I can create a pull request if there is consensus.
Thanks for opening an issue about this.
The instructions for practice exercises are defined in the problem-specifications. Having practice exercises handle unicode was discussed before in other problems, but the consensus was to keep the exercises simple and do no have unicode handling by default.
We can however append java-specific instructions and extra tests for unicode and probably those tests should be optional. However, I'm not totally sure how this would work in this exercise without increasing its difficulty massively. I assume you are suggesting students should also rotate non-ascii characters. How would that work?
IMHO That is giving the wrong message to students, about Character manipulation methods.
In what way?
Thanks for opening an issue about this.
The instructions for practice exercises are defined in the problem-specifications. Having practice exercises handle unicode was discussed before in other problems, but the consensus was to keep the exercises simple and do no have unicode handling by default.
I was not thinking about making the exercise complex. My suggestion is Just mention that they only have to rotate ASCIII leters (Letters in the range 'a'-z' , 'A'-'Z').
May be explaining that Java handles other alphabets (through Unicode), so they should not use the Character.isLetter method.
Or at least stating that Java actually handles other alphabets, but they can just ignore them, for this exercise.
Another small error in the description it is stated that: A ROT13 on the **Latin alphabet** would be as follows.
IMO it should said something like: A ROT13 on the **English alphabet** would be as follows.
We can however append java-specific instructions and extra tests for unicode and probably those tests should be optional. However, I'm not totally sure how this would work in this exercise without increasing its difficulty massively. I assume you are suggesting students should also rotate non-ascii characters.
No, No. I was just thinking about stating that Non-ascci character should not be rotated.
IMHO That is giving the wrong message to students, about Character manipulation methods.
In what way?
IMO the message is that you don't have to worry about anything beyond ASCII, and that Character.isLetter is the same that checking the 'a-z' 'A-Z' range.
At least it should be stated, that there is something beyond ASCII but they can ignore it for this exercise.
Oh, I see. I agree on having those extra clarifications. Feel free to open a PR. In this case, these clarifications should live in a file instructions.append.md that should be next to the instructions.md file. The file instructions.md should not be modified, as it is kept in sync with problem specifications.
This issue has been automatically marked as action/stale because it has not had recent activity. Please update if there are new updates to provide.
Closing this due to inactivity.