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
Ruby version of a Kata fails when Attempting to submit a solution with:
So, apparently, it looks like it's a solution issue rather than the Kata one, but this isn't obviously clear from the error messages and I believe it worth to improve the tests to avoid crashing like this in case of "inappropriate" solution.
There are no test cases with soldier names longer than 256 characters. Many Python solutions parse the
name_length
number wrong. Also there should be test cases where the encodedhealth
matches actual ASCII character codes to break most of the poor regex solutions.It is technically improper in Python to store binary data in a str type, because strings can have varying encodings with varying interpretations. The default, in fact, is generally utf-8 these days, in which certain combinations of bytes are of course illegal, producing malformed sequences. In a real script, this can cause all sorts of problems down the line with display and interoperability. The correct way to represent binary data is as a bytes object, i.e.,
b'...'
.Multiple sample test cases would be nice.
I don't want to verify (I'm drunk when I solving this kata ^^) but it seems to me that most of upvoted solutions using regex and passing tests would fail in case of health will be coded as valid word char for most signifiant byte (such as decimal value 30208 wich will be coded as 'v\x0000')...
This is an unnecessary comment, as in real situation it would probably not be a problem (maybe over 30000 health points doesn't fit real cases), but as kata solving, I think this would deserve some test case against that ;)