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.
This comment is hidden because it contains spoiler information about the solution
Not that there's anything wrong with that answer, but I fail to see why it gets upvoted 7 times as best practice compared to others.
I'd rather have this one (http://www.codewars.com/kata/reviews/53952000369894e4f10007ab/groups/539823dfc729da37a4000374) which is more readable (at least in JavaScript where there's a fair amount of syntactic noise. In other more expressive languages (e.g. a ML), even a one-liner would be acceptable and best practice.
Anyways, just pointing out: while this is perfectly correct (and fine for a trivial exercise like this one), I'd rather not people consider it too "best practice" (same for http://www.codewars.com/kata/reviews/53952000369894e4f10007ab/groups/53952f8ca3ba5f5632000f95).
I second that as well. 6 kyu seems fair.
This comment is hidden because it contains spoiler information about the solution
Think this could be improved or hardened in a number of ways:
Last point it a bit too specific, but the first 2 could make it more difficult yet acceptable (and worthy of 4kyu, which I don't think it is at the moment, I'd rather rate it 5 or 6 in the current state).
I don't think this should be a 4kyu, or even a 5. Maybe a 6.
Maybe it varies on what you background is, but to me that looks like a programming 101 exercise that we'd usually give to students as part of their exams after their first month. It's not entirely straightforward and there are many ways to approach it (but codewars doesn't rate that), but it's not really as difficult as what I'd rate a 4.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
5 kyu seems a bit high for that one. 6 kyu maybe?
I'd recommend changing the test cases to directly be:
It's self explanatory enough, and at least it gives me back the value returned by the hamming function. Doesn't happen with expect().
Yeah I'd agree this should be a general case question.
This seems rather useless as a kata in the current stand, barely more than an intro to calc and programming. Or maybe I missed something...
This comment is hidden because it contains spoiler information about the solution
Actually, I also realized this doesn't support composite names, like "Jean-Pierre", where the P should be capitalized.
This is an intended feature. Knowing the tests would make you directly aware of some of the complexities you wouldn't have thought off otherwise.
I can undertand your request, but I think the idea behind code katas and codewars is not to provide software specs so you comply to them, but to force you to write rather generic code that would hold against sneaky edge cases you might not have thought of.
Of course the success of this approach is debatable, as I see some katas where people do just that: write something that complies to the test and that would be a dreadful piece of code to use in enterprise software.
Maybe the issue lies more with the kata's description than with the tests. I think it's a judgment call, and it'd be hard for them to make it work both ways. It's just too bad that some katas try to have you guess while others try to enforce specs that sometime seem silly.
Loading more items...