Ad
  • Custom User Avatar

    There are many ways to check the conditions in this solution that I didn't even think about while I was solving the kata. I'm a beginner and such solutions really help with learning. Thanks! 🤗

  • Custom User Avatar

    That would be awesome! It seems to me that this option will be interesting to solve, including for those who have already passed this kata.

  • Custom User Avatar

    Make a new version of this kata that throws everything at the user in the tests? Punctuation, numbers, mid-word hyphens, contractions, make them capitalize the new first letter if the original was capitalized (Hello -> Ellohay)

    It would not be as easy as this one.

  • Custom User Avatar

    You're right, I agree that the idea of adding tests is too radical, given the large number of ready-made solutions that have successfully passed existing tests in the current environment.

    But in real life, we don't separate all punctuation marks with spaces, so I was a little upset that a significant part of the solutions stopped working properly with such a change, since the assignment text states that punctuation marks should not affect the result.

    I think it would be nice to specify in the assignment itself that punctuation marks will always be separated by spaces to make it more specific. This can be seen from the example, but the presence of an example with a space does not exclude that in other cases there may not be spaces.

    Thank you for your reply!

  • Custom User Avatar

    Yes, if you notice, all the punctuation in the tests is currently separated by spaces. Even in the description, the example shows the punctuation separated by a space. This is likely intentional to make the kata simpler. The solutions were all built with this in mind, so of course they won't work properly if you change the nature of the inputs. Adding tests as you've suggested would invalidate the vast majority of the 165k+ solutions, and isn't really worth doing.

  • Custom User Avatar

    Thanks for this kata! It was interesting to see the options for implementing the task. But I was a little upset that some part of the published solutions do not pass verification with punctuation marks in the middle of a sentence (and sometimes at the end).

    For example 'Hello, I have a comma!'. When checking some solutions, it gives the following results:

    'ello,Hay Iay avehay aay omma!cay'or 'Hello, Iay avehay aay comma!'

    In my opinion, this is not entirely logical, since 'best practices' get solutions that stop working with small changes. Especially considering that the punctuation marks condition is in the assignment: 'Leave punctuation marks untouched.'

    It would be great to add the appropriate tests.

    English is not my native language, so I apologize if the text is not completely clear.