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.
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! 🤗
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.
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.
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!
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.
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.