Beta
Decipher the sentence
24 of 29davilla
Loading description...
Algorithms
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.
Is the JS version of this working? Ive tried some things but it never gets past the test cases.
This comment has been hidden.
Hmm... that's not a bad idea at all, but I doubt it'd be guaranteed to work in the future.
It worked pretty reliably for this kata (Not sure if there are even random tests?) But I agree it's certainly not a scalable solution.
The random tests in python have yet to be translated to javascript. And I am looking to add more anyway.
I did solve it in python, so I must have not noticed the random tests. The nature of this kata means that adding tests will probably break quite a lot of solutions, so if you are going to, I'd suggest doing it soon.
You have wrong test case
expected 'SOMETIMESYOUGWYNETOGITHURTENSOMETIMESYOUGWYNETOGITSICKBUTEVERYTIMEYOUSGWYNETOGITWELLAGIN'
to equal 'MIGYNCGYMSIOAQSHYNIACNBOLNYHMIGYNCGYMSIOAQSHYNIACNMCWEVONYPYLSNCGYSIOMAQSHYNIACNQYFFUACH'
please fix it
Oh goodness, the javascript version tries to solve its own cipher instead of just pulling the original string to test against. No wonder there have been so many complaints. You're using javascript not python, correct? Give me a little time as it's been a while since I've used that.
yes its javascript look at issue from zLuki he also have the same problem)
OK thanks, let me know if you still have any issues.
bad bad bad very bad kata we cannot calculate the offset instead we should be looking for f*cking quotes you dont give us the link of quotes
What are we fortunetellers here for?
if i will complete this kata i will give only bad feedback
I hope you do complete the kata. I'm not looking forward to negative feedback, but I'd be happy to know someone who initially found it difficult was able to think of a solution, maybe after considering a different approach.
i did it, and i changed my opinion, its cool kata
Why the hell are there sentences like "Sometimes you gwyne to git hurt, en sometimes you gwyne to git sick; but every time you's gwyne to git well agin."?! That's not even correct english.
This kata is a duplicate of: https://www.codewars.com/kata/55ff2ca7d49961915600000e
Far be it from me to question recommended literature in the high school curriculum!
The English language has never been formally regulated by an authoritative body in any country. And if it's not English, what language is it?
That said, I'll looking into including more of the surrounding text, if it will ease the difficulty in deciphering it.
expected 'SOMETIMESYOUGWYNETOGITHURTENSOMETIMESYOUGWYNETOGITSICKBUTEVERYTIMEYOUSGWYNETOGITWELLAGIN' to equal 'MIGYNCGYMSIOAQSHYNIACNBOLNYHMIGYNCGYMSIOAQSHYNIACNMCWEVONYPYLSNCGYSIOMAQSHYNIACNQYFFUACH'
What??
Fixed the javascript. Sorry this wasn't addressed sooner.
no problem :))
If you're testing strings with letter frequencies different from English letter frequencies, you should test them consistently. And why are you testing only 99 excerpts out of 147 anyway?
The difficulty is in making random test cases for English text. I had initially intended on having many more, then settled on using random snippits of longer passages. For some reason, those passages don't seem to have been translated to the javascript version, which is yet another issue to deal with. I will fix this particular excerpt per above and mark that as resolved there, then extend and possibly reanalyze all of the test cases before marking this as resolved.
Global variables should be removed in JavaScript sample tests.
expected 'THESTARRYSKYTHESEAANDEVERYSIGHTAFFORDEDBYTHESEWONDERFULREGIONSSEEMSSTILLTOHAVETHEPOWEROFELEVATINGHISSOULFROMEARTH' to equal undefined
I have updated the javascript test code. As far as you can tell, does this fix the issue?
New test framework should be used in Python.
This kind of solution should not pass:
https://www.codewars.com/kata/reviews/5c4054a53b85b80001ed0694/groups/5c414e913b85b8000162f927
I guess if you take the time to hardcode 100 solutions, you deserve your 4 honor points ;-)
I would argue that such a solution is actually harder to write, plus it requires doing most of the work toward the goal anyway. Nonetheless, to reduce the possibility, I have added a couple of cases starting at random spots in a passage.
Pretty close duplicate of this kata: https://www.codewars.com/kata/break-the-caesar/
The only difference is that there is no preloaded list of words...
D'oh! Well, I'm going to have to change this kata and possibly break everyone's solutions. I'm very sorry about that. :-[
OK, the kata has been changed. No one rated it above 6 kyu, so I figured more difficult would be better. Sorry for breaking everything, but at least the other approach works on an existing kata, the duplicate you found.
Sample tests are not updated.
Also, there was another kata that required letter frequency analysis, although I don't seem to find it...
[update] Now it's similar to this one: https://www.codewars.com/kata/crack-the-encrypted-email
as you can see (@davilla), that doesn't change that much the solution
I take it you mean it's still too close to the other kata, given that the word bank solution still works. I just want to be sure it's still suggested that the kata be differentiated before making another change. The change I was considering would use 2 Caesar shifts, alternating between them on every letter. Relying on a word bank would require evaluating 600 possibilities, while the initial approach could potentially be done in 50 by first breaking the input into 2 sets.
To be honest, you could leave it like this. It's only the 2nd "break the Caesar" kata, so it's not that bad ;-)
By the way, 2 alternating caesar shifts could work, but then you can forget the frequency analysis, I guess. And if you want to further complicate the Caesar ciphers, you get the Vignère cipher, for which we already have a few katas...
OK I'll leave it and just fix any minor issues. By the way, am I right to mark so many comments as spoiler, or do the things we've said here not really matter so much?
Don't worry about marking spoilers.