6 kyu
ADFGX Simplified
184Caders
Loading description...
Cryptography
Algorithms
Fundamentals
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This comment has been hidden.
python new test framework is required. updated in this fork
Description should be language-agnostic
Example and fixed tests on
j
included inplaintext
andsquare
should be testedThe behavior of j and i is somewhat unclear from the description and example test cases. While you say j should be treated as i, neither the examples in the description nor in the test cases contain a "j" in the square paramater. They do, however, contain i's. Therefore, one might assume that the instruction meant to perform a j to i substitution on the plaintext. This has clearly confused others than just me.
I suggest altering the description to say:
If either an i or j appears in the encryption square text, the corresponding two-letter code should be used to encrypt both i and j.
Furthermore, you should remove all mention of a substitution from the decryption section of the description. It says(PLEASE NOTE, j SHOULD BE TREATED AS i)
, but this is incorrect. If a j appears in the square text for adfgx_decrypt, then if the corresponding two-letter code appears in the ciphertext, your tests expect a j, not an i.This comment has been hidden.
Why this strange behavior about 'j'??? That seems to not make any sense, actually. If not artificial, the reason should be explained in the description. If it is, it should be removed. It's just boring to code and doesn't change anything to the difficulty of the task.
bye,
B4B
This is because the 5x5 nature of the block only allows 25 letters. We have 26 letters in our alphabet. Traditionally this has been solved by using i and j interchangably.
If I hadn't put 'treat i as j', then many would become confused with that inconsistency.
I don't understand how it is boring, it requires an extra line simply converting from one to the other.
I hope this clears up any confusion. :)
thx for the explaination. :)
Moreover, Latin does not distinguish between i and j characters (actually j is a late creation in Romances languages)
I didn't see any tests that validate the handling of the "j should be treated as i" requirement. I submitted a solution that I had messed up that part of the handling, and it still passed all of the tests.
I would recommend adding one example test that exercises this part of the solution, as well as adding the possibility of 'j' showing up in the random test cases.
Other than that, nice kata!
Thanks for bringing this up!
I've added random cases with 'j' mixed in as input, along with one static case. :D