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.
This one was fun.. but it is borked.
Starting from description (it is confusing) - and ending with tests:
It expects to not allow passing undefined values as arguments. I took that into account of course and added a throw... And the check in my code was done on every function call (as I believe it is reasonable that the deps objects may change on runtime). And.. it failed one of the tests. The correct approach was to not bother at all.
And secondly, it expects that arguments that are not present in the deps objects are... skipped. Completely ruining the order of arguments if some are not present, which makes this pretty useless approach even more useless.
And, of course, back when this kata was created - no such thing as default parameters existed, so it does not take them into account...
The haskell tests are totally broken; there are several solutions that just return a static string that succeed. Please fix!
This was fun, thank you!
Nice kata :)
But the specifics of the testing system do not allow it to be fully revealed.
There is now way to read incoming data from stdin, so there is no reason to write code for several Tb-lenght text ))
(Unless you desied to force yourself read input string byte-to-byte - sort of simulation reading from stdin)
fork here, it's roughly the same as the python one
really enjoyed this one.
@realitant test output has been changed so that it's no longer vague or asking you to comb through large lists for some unspecified problem. The description typo with string/line for a single word has also been fixed.
Approved.
Rewrite to reference solution comparison here: https://www.codewars.com/kumite/664f538ca2b677fe163387ed?sel=664f538ca2b677fe163387ed
note: contains description changes
If only one word fits on a line, it should be left-aligned and no trailing spaces have to be put after it.
The description somewhat assumes that you already have a rough idea how justify alignment works. Maybe I should try to reread it provided no prior knowledge.
Also the high number of issues comes from exceptionally bad assertion messages and the fact that the kata is old and was not fixed (and still is not in many languages) for 10 years.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
oh yeah, and this python non-solution passes: https://www.codewars.com/kata/reviews/54cd5ea807ba216c9e0000a3/groups/664e7e7671e5be4f72efec84
python:
I can use
\r
as delimiter between words instead of space and it passes. This is because tests usesstr.split()
without specifying delimiter, and then never checks for spaces.Similar to haskell, the general issue is that it checks for specific failures and passes if it doesn't find those. That doesn't mean it's correct. This is likely present in other languages as well, as it looks to be a translated pattern.
Bonus issue: python test output is quite poor, in particular I noted the part about showing two lists and saying they're not equivalent, without stating where those lists are or what equivalent means - this is related to how it tests for specific issues as it therefore doesn't show actual/expected.
haskell:
https://www.codewars.com/kata/reviews/54f8b568a58bce1dde000e4a/groups/664e6faff17a79216ed71bac
The general issue here is showing up in other languages as well, but I do not know whether they are wrong, what I know is that I do not like this test pattern one bit. And that general issue is that the tests consist of checking for specific ways the result might be wrong, but doesn't actually bother checking whether the result is right. I would much rather see a line-by-line comparison (or even the whole block at once), and not have any of these remarks. Yeah, I get that having no reference solution is sexy. It's also difficult/complicated/error-prone.
Loading more items...