7 kyu

Broken Collatz

14 of 595LegacyCrono
Description
Loading description...
Debugging
Fundamentals
Recursion
  • Please sign in or sign up to leave a comment.
  • g964 Avatar
    • LegacyCrono Avatar

      The Kata Best Practices says that "Every new kata should ideally teach something different". This kata was designed as an introductory level exercise to teach about some key aspects of the Ruby/Crystal languages (specifically: function syntax, default parameters, the unless keyword, conditional suffixes and conditional expressions). They might use the same topic but I feel that they're fundamentally different.

      Issue marked resolved by LegacyCrono 9 years ago
    • matt c Avatar

      the problem is that you can copy and paste a solution from one kata to this one. To avoid being a duplicate you need to translate exisiting katas because over time people will create translations for this kata and the originals and eventually they support all languages but are the exact same.

    • g964 Avatar

      Sorry but I don't agree. The code from the kata I mentioned passes your kata without any change; it is what I have done. You don't even have to worry about the flaws of the "broken Collatz": copy and paste your old code. You should have, at least, introduce some variant: ie return an array with the values at each step, return an array with the length of the sequence and the penultimate term, return the length as a string, raise an error if some conditions are not fulfilled, etc... Your kata is still in Beta so you could change anything as your imagination wants:-) The solutions of the guys who have passed might be invalidated but that doesn't matter, they will keep their honor, Beta status is done for that! I don't want to fight with you:-)) but the issue is not resolved. Often @JHoffner retires the duplicates.

  • g964 Avatar

    You should add random tests.