Ad
  • Default User Avatar

    .

  • Default User Avatar
  • Default User Avatar

    .

  • Default User Avatar

    .

  • Custom User Avatar

    Needs random tests

  • Custom User Avatar

    Your test only accept a single way of ordering the letters, which is contrary to what the descriptions says.

  • Custom User Avatar

    Why is the expected result of "" false? It's a valid palindrome by itself.

  • Default User Avatar

    Some sample test cases are wrong

  • Custom User Avatar

    This kata has a lot of problems. Maybe it should be deleted.

  • Custom User Avatar

    If the input is an empty string then it is a valid palindrome string, isn't it?

    Not according to the current example tests:

    Test.assert_equals(palindrome(""), false))
    

    But that's another issue (e.g. the minimal length of a palindrome isn't defined).

  • Default User Avatar

    If the input is an empty string then it is a valid palindrome string, isn't it?

  • Custom User Avatar

    I'm not sure I understand you, isn't the whole point that the answer be dependent on the input?

    In this kata there is no way for an empty string to be returned as a valid palindrome string.

  • Default User Avatar

    The empty string is a positive answer for an empty string. Would you really prefer the meaning of an answer to depend on input?

  • Custom User Avatar

    Returning different data types from a method is bad practice.

    Doesn't Ruby have some kind of error mechanism? Either exceptions, nil or something else to report errors? In Haskell, you would return Nothing or Just … (which are Maybe String).

    Either way, are there some guidelines like PEP8 for Ruby? By the way, PEP8 states None is fine for non-existing data, so the Python stance probably leads to nil. Could be helpful for the Ruby section.

  • Custom User Avatar

    Returning different data types from a method is bad practice.

    Returning an empty string if there is no palindrome would be better than returning false.

  • Loading more items...