Ad
  • Custom User Avatar
  • Custom User Avatar

    I knew it was too good to be true.

    Thanks for pointing that out.

  • Custom User Avatar

    This algorithm is incorrect.
    It passes only because of the limited testing required on submission.
    The 4, 9, 40, 90 etc that you are trying to catch with (p<c) can only be done in the first position.
    Test.assertEquals(solution('CMXCIX'), 999, "Your algorithm gives an answer of 1021 and fails on this test.");

  • Custom User Avatar

    I noticed the same thing, so I just did lessons from http://regexone.com/problem/trimming_whitespace.

    As soon as I finish their problems set, I look forward to redoing many of my lower level katas.

    If I still need regex help, I've got http://qntm.org/files/re/re.html and http://regex.learncodethehardway.org/book/ queued up.

  • Custom User Avatar

    I didn't realize that anonymous functions were getting autonamed. That could be frustrating.

    This really was one of the most chalenging Katas I've ever tried, though. I think if maybe the description was a little more explicit on what would or wouldn't work, that would make it more fun.

  • Custom User Avatar

    Thanks for tHe feedback! I do plan on going some tweats at some point. The kata was written before ES6 support (Babel) was introduced, and as I can't turn it off it broke quite a few things that were perfectly valid before (like anonymous functions, they now get auto named).

  • Custom User Avatar

    Now that I've completed the Kata, I have a few remarks

    1. Make it clear what's been disabled: the Number and String constructors, as well as their literals. Not only that, template strings are disabled, too. So '', "", `` are all disallowed.
    2. The regex that you're using isn't very nice. If you're using a regex at all, and not some sort of demon spawned from the 14th level of obfuscation hell who likes to bitch slap characters for no reason. What I mean, quite specifically, is that it can't discern what I've put in comments, and what I've not put in comments. Also, when I write /I"m not feeling this Kata/, it throws an error because I've decided to use an apostrophe... in a comment!
    3. I couldn't even assign a variable such as __1 . __1 = blah is not a thing I could do. Please make it clear that numbers and strings are disabled in both the left hand, and right hand side of operators.
    4. The whole things starts off with var helloWorld = function () {}, which immediately throws an error. Please either change how this starts off, or provide an explanation for why you want to watch the world burn. I'm fine with either

    Great kata, though. I hope to never do it again.

  • Custom User Avatar

    Best comments so far, go to you.

  • Custom User Avatar

    I get the same result. I just have the thing return itself and I get an error, making me think that the name of the variable is a problem.

  • Custom User Avatar

    Maybe my description wasn't the best. I understood really well what the Caesar was and how it worked. I just wasn't seeing its relationship to the Vigenère. And yeah, "The shift is derived by applying a Caesar shift to a character with the corresponding index of the key in the alphabet." now makes sense.

    I had to look at the example on wikipedia and manually perform an encryption before I understood exactly how the cypher worked. And the best way that it worked in my head was, "oh, it's basic addition and subtraction."

    I didn't realize the difficult was the same across languages. Interesting.

  • Default User Avatar

    After re-reading the description, it seems like it could be made more clear. However, I'm not sure if your suggested changes to the description accomplish that. I'll be sleeping on it, particularly in regard to this sentence and the following example recommended previously "The shift is derived by applying a Caesar shift to a character with the corresponding index of the key in the alphabet."

    Edit: In regard to difficulty, it was determined by the beta process, and it seems to fall in line with other cipher katas. It should also be noted that, although this was published before Python was supported on Codewars, that this kata is much harder in Python because Unicode support sucks in Python 2.x.

  • Custom User Avatar

    this was a really fun Kata. seemed a little easy for a 4 Kyu kata, though.

    The description of the cypher was a little confusing though. I had to go to wikipedia and read the page to really understand how the cipher worked.

    Maybe if it explained the cipher something like:

    A Caesar cipher shifts all letters in the string n spaces.
    A Vigenère cipher shifts each individual letter in the string n space, where n is calculated as "index of the original letter in the string + index of the letter in the key"

    A Caesar encrption can use a shift value of 3, turning 'dog' (3,14,6) into 'grj' (6,17,9)
    But Vigenère uses the key 'pup' (15,20,15) to turn 'dog' (3,14,6) into 'siv' (18,8, 21).

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    It seems to be the current mainstream belief that the power of abstraction required by regular expressions and functional programming displays superior problem solving ability than old-timer loop solutions manually covering edge cases. I happen to strongly share in that belief as an old-timer stateful programmer myself. I believe in doing everything we can to push ourselves to the next level of excellence.

  • Loading more items...