@KirinCupr: just a quick confirmation - you're completely right, the creator of the Kata has defined "input_str" as a constant here, so while we can read its value, we must not change/manipulate it! ... The C++ documentation says about the use of the keyword "const": "an object whose type is 'const-qualified', or a non-mutable subobject of a const object. Such object cannot be modified: attempt to do so directly is a compile-time error ..."
Hello. I'm think we create new variable because "input_str" is is const (const std::string& input_str). So we can't change it. If I'm wrong, please, correct me.
missing sample tests with consecutive uppercase letters.
no actual description of the process
the note about spaces has nothing to do here (or it relies on what the author had in mind for the implementation, which would imply the problem is totally undeerspecified as well as undertested)
This kata is way too easy and loose it's a bad challenge. It also has other problems.
35 chars is so loose it feels like some form of... shitposting? If you're making a code golf kata you'd at least want the limit to be tight enough to pose a challenge
kata doesn't test that every array element should be a distinct array (at least I think it should be)
code length check is wrong; see how others do it properly in other "one line xxx" or "xxx line task" katas
No random tests
Moral of the story: Writing a code golf kata needs experience, so don't try this at home, kids, at least not without appropriate skills to do it well!
Of course there is a shortest solution, probably only one.
Are you interested in getting the shortest possible solution umpteen times, or people challenging their creativity to come up with different short, but not necessarily shortest, versions? Some people might even submit code that sacrifices some shortness for increased readability (though in this case, the shortest solution is quite readable).
ETA: the limit as it is does not really need relaxing. see above somewhere.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
@KirinCupr: just a quick confirmation - you're completely right, the creator of the Kata has defined "input_str" as a constant here, so while we can read its value, we must not change/manipulate it! ... The C++ documentation says about the use of the keyword "const": "an object whose type is 'const-qualified', or a non-mutable subobject of a const object. Such object cannot be modified: attempt to do so directly is a compile-time error ..."
Hello. I'm think we create new variable because "input_str" is is const (const std::string& input_str). So we can't change it. If I'm wrong, please, correct me.
=> unpublishing.
Interesting, a part of the puzzle is in examples and the other part is in testcases
Hello, how i can suggest contribution with kata description?
I think to change alcohol description subject to education relevant and neutral subject.
Thanks.
Fixed.
IMHO figuring out is a major part of this kata. It's tagged
puzzle
.Cool kata, congratulations.
Seems absurd that the average rank for this is 6kyu. This is like a 7kyu, tops.
This kata is way too easy and loose it's a bad challenge. It also has other problems.
Moral of the story: Writing a code golf kata needs experience, so don't try this at home, kids, at least not without appropriate skills to do it well!
I actually had in mind always displaying a message, not just when your code is too long. I've edited the test a little - what do you think?
This also tells dcsmith his code length is not
25
but14
, because the function name isn't counted.Counting like that,
35
characters suddenly seems quite generous BTW.done
Alternatively, you could relax the limit.
Of course there is a shortest solution, probably only one.
Are you interested in getting the shortest possible solution umpteen times, or people challenging their creativity to come up with different short, but not necessarily shortest, versions? Some people might even submit code that sacrifices some shortness for increased readability (though in this case, the shortest solution is quite readable).
ETA: the limit as it is does not really need relaxing. see above somewhere.
Loading more items...