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.
JS fork (author gone)
complete overhaul with random tests, sample tests, edge cases (1-letter words), chai assertions
Python:
initial solution setup's function parameter is shadowing a built-in
Would also be nice to add some useful assertion messages
I am seeing π many people upvoting π³οΈ the single-line solutions.
Whereas It not a recommended practice where there are many operations are going on.
Because it compromises the code readability.
What do other people think β
single line solution should be supported and recommended or deserve downvote β
Needs a fixed test
Test.assertEquals( f("AAA"), "a_a_a" )
.Fixed tests are too weak.
No random tests.
Hello, Olga! Thanks for the nice kata! Need add into test cases two-digit numbers or more.
to_underscore(42)
;to_underscore(111)
, etc.I believe the test suite and description miss an important PascalCase -> snake_case scenario: multiple capital letters in a row.
As I understand it, 'ThisHHHasManyCapitals' should yield 'this_hhhas_many_capitals', not 'this_h_h_has_many_capitals'. Along the same lines, 'CSSSelector' -> 'css_selector.'
As it stands right now, all of the top voted Ruby solutions fail to translate 'CSSSelector' et al. correctly.