Please be more clear about what the tests are expecting.
Edit: Ah, I see it now. For anybody reading, the kata's description is misleading: you are not supposed to print a newline character (at least in Python and JS, maybe in other languages as well).
But still, misleading those trying to solve your kata (unless it's a puzzle) is a very bad practice.
Description does not mention whether the URLs should be handled case-sensitively or the opposite
Description does not mention whether we will be given one global URL or a series of URLs separated by spaces in string form (The latter is expected though...)
Example and sample tests do not present the above cases thoroughly
More fixed tests on a series of URLs string should be given (debugging long series of URLs for random tests is a PAIN)
If your language can handle float binaries assume the array won't contain float or doubles.
That's gibberish. Just say they're integers. Have you spent five seconds considering how your target audience is going to understand this? You are publishing text to the public. Make it freaking readable or keep it to yourself.
It's a white kata. It's here for beginners and/or as some kind of drilling exercise. Don't include incomprehensible text that doesn't mean anything even when you understand what it means. There's zero teaching value in that. What you should be doing for beginners is showing them straight-forward ways to do things that make sense, and without suggesting that mixed types is legitimate practice.
I'll also note that NaN has nothing to do with javascript as the js description suggests. it's a value that the ieee 754 format can represent. but that applies to any language that uses that type. it's certainly not a number. it's specifically not a number. it's in the name. not a number. it matches the type 'number', but it is not a number. and if you're ruling out fractional values, thus only having integers, then why is NaN included? that's not an integer.
and to mention the obvious, the entire kata is a duplicate to the other kata it mentions, with only an insignificant difference. the other kata is already a warcrime in its own right with mixed input types and mixed output types. so I warmly recommend this one for retirement.
addeded? really? again. published text. proof read it.
The description should be crystal clear about which languages do require
\n
and which don't, since e.g. CoffeeScript requires it but PHP and JS don't.PHP: It should be specified in the description that, if the array has a
NaN
element, the function should returnNaN
.This comment is hidden because it contains spoiler information about the solution
Please be more clear about what the tests are expecting.
Edit: Ah, I see it now. For anybody reading, the kata's description is misleading: you are not supposed to print a newline character (at least in Python and JS, maybe in other languages as well).
But still, misleading those trying to solve your kata (unless it's a puzzle) is a very bad practice.
Specs are all over the place in different languages.
( JS )
Tests coerce results, so returning a
String
is actually optional.the description is poorly writen bro!
This kata description
This kata error message
You should change the description so it matches the actual program
This comment is hidden because it contains spoiler information about the solution
Description does not mention whether the URLs should be handled case-sensitively or the opposite
Description does not mention whether we will be given one global URL or a series of URLs separated by spaces in string form (The latter is expected though...)
Example and sample tests do not present the above cases thoroughly
More fixed tests on a series of URLs string should be given (debugging long series of URLs for random tests is a PAIN)
PHP, it should be mentioned in description to return string 'NaN' instead of
NAN
when the tests/solution expects it.That's gibberish. Just say they're integers. Have you spent five seconds considering how your target audience is going to understand this? You are publishing text to the public. Make it freaking readable or keep it to yourself.
It's a white kata. It's here for beginners and/or as some kind of drilling exercise. Don't include incomprehensible text that doesn't mean anything even when you understand what it means. There's zero teaching value in that. What you should be doing for beginners is showing them straight-forward ways to do things that make sense, and without suggesting that mixed types is legitimate practice.
I'll also note that NaN has nothing to do with javascript as the js description suggests. it's a value that the ieee 754 format can represent. but that applies to any language that uses that type. it's certainly not a number. it's specifically not a number. it's in the name. not a number. it matches the type
'number'
, but it is not a number. and if you're ruling out fractional values, thus only having integers, then why is NaN included? that's not an integer.and to mention the obvious, the entire kata is a duplicate to the other kata it mentions, with only an insignificant difference. the other kata is already a warcrime in its own right with mixed input types and mixed output types. so I warmly recommend this one for retirement.
addeded? really? again. published text. proof read it.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
TypeScript: initial solution has
Number[]
as input parameter type, but the tests feed strings into it. This is terrible.Loading more items...