Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I knew it was too good to be true.
Thanks for pointing that out.
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.
Now that I've completed the Kata, I have a few remarks
Great kata, though. I hope to never do it again.
Best comments so far, go to you.
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.
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.
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).
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Maybe it's because I'm still ranked very low, but I've noticed that most of the (JavaScript) katas have a solution that revolves around some combination of array and/or regex.
Inevitably, I submit a final, cleaned up solution thinking, "yep, this is a really solid 18 lines of code." then I see someone else's solution that was a single line, consisting entirely of some Regex. Similarly, I'll look a solution that I thought was decent in 24 lines, and I'll see that someone just used some method on an array that I didn't even know existed.
On one hand, this is educational. It exposes me to things I wouldn't otherwise no.
On the other, it doesn't teach me much about problem solving. I see a lot of people that have amazing Regex-fu, and that doesn't teach me anything about algorithms or the language.
Could we either label Katas as, "requires regex" or possibly turn off regex features, so that we can expose people to other ways to solve problems?
Id, class, and element are not a kind of "decimal" or "powers of ten", where 100 classes = 1 Id. A single ID always overrides a class, no matter how many classes there are.
though, fun fact, browsers did not implement this correctly: http://www.thecssninja.com/css/extreme-specificity
This is a good exercise.
I would recommend, though, that there be an added "twist" where one should have to work with either 3-digit or 6-digit hex.