Ad
  • Custom User Avatar

    I think my solution shouldn't have passed, it failed the first time, and when I tried again it passed the random tests.

  • Custom User Avatar

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

  • Custom User Avatar

    approved by someone.

  • Custom User Avatar
  • Custom User Avatar

    Cool kata to have some fun and to exercise some concepts with.

  • Custom User Avatar

    Ruby version of a Kata fails when Attempting to submit a solution with:

    main.rb:14:in `import': undefined method `unpack' for nil:NilClass (NoMethodError)
    	from main.rb:60:in `block (2 levels) in <main>'
    	from main.rb:59:in `times'
    	from main.rb:59:in `block in <main>'
    	from /runner/frameworks/ruby/cw-2.rb:55:in `block in describe'
    	from /runner/frameworks/ruby/cw-2.rb:46:in `measure'
    	from /runner/frameworks/ruby/cw-2.rb:51:in `describe'
    	from /runner/frameworks/ruby/cw-2.rb:202:in `describe'
    	from main.rb:55:in `<main>'
    

    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.

  • Custom User Avatar

    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 encoded health matches actual ASCII character codes to break most of the poor regex solutions.

  • Custom User Avatar

    Does it create issues with current tests design here? If it does, it's an issue that should be fixed, and if it doesn't it won't be done since it would break the submitted solutions. I didn't solve the kata so I can't tell.

  • Custom User Avatar

    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'...'.

  • Custom User Avatar

    Multiple sample test cases would be nice.

  • Custom User Avatar

    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 ;)

  • Custom User Avatar

    fuck little endian... :troll:

  • 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

    Approved ;-)

  • Loading more items...