The pattern is not adequately specified ( and no, I should not have to click through to a Youtube video ). It is also not adequately tested. It's entirely unclear who should be handling the actual damage, and if the visitor or the accepter should be passed or called ( surely not both ).
I like this Kana becuase it asks the user to solve a realitic problem.
I dislike it because it specs throwing an exception for normal expected code flow. Exceptions - which can be relatively expensive in C++ - should be thrown only for 'abnormal' circumstances (e.g. OOM, div by zero, container out of range, etc.).
There seems to be a problem with the randomized tests. My solution failed a random test, so I added a print statement to try to debug it without changing anything else, and then it passed all the tests. Unfortunately I'm not sure why it originally failed the random test, as my code seems to pass consistently now.
Would probably be better if it used impl AsRef<str> or something alike for the return type. This would allow the use of String allocation from the format! macro or something else.
For test 3: "should return 1, 3, 4, 5, 10 for 10 pages, at page 4, with +-1 item"...
It's telling me "expected 2 to equal 3." Which is pretty unhelpful as it doesn't say what it's even testing. Using Test.assertDeepEquals would be quicker to write, and also more self-explanatory.
Also, you can add real comments to help the testee.
TS: no random tests
The pattern is not adequately specified ( and no, I should not have to click through to a Youtube video ). It is also not adequately tested. It's entirely unclear who should be handling the actual damage, and if the visitor or the accepter should be passed or called ( surely not both ).
No random tests in Haskell
I like this Kana becuase it asks the user to solve a realitic problem.
I dislike it because it specs throwing an exception for normal expected code flow. Exceptions - which can be relatively expensive in C++ - should be thrown only for 'abnormal' circumstances (e.g. OOM, div by zero, container out of range, etc.).
There seems to be a problem with the randomized tests. My solution failed a random test, so I added a print statement to try to debug it without changing anything else, and then it passed all the tests. Unfortunately I'm not sure why it originally failed the random test, as my code seems to pass consistently now.
C# unnecessary directives in initial solution setup should be removed!
Code below should be removed from initial solution setup of C#
Would add a "// Your Code Here" signal for newbies
Java translation
Add even more information about what the algorithm should be.
As a result of the tests, I get this "error".
'Params: 3, 1, 5'
'Your pages 1....3'
'Expected pages 1..2..3'
Add a test overriding MoveCommand's
canExecute
method to ensure people are checking it.Would probably be better if it used
impl AsRef<str>
or something alike for the return type. This would allow the use ofString
allocation from theformat!
macro or something else.What should be the output when I provideinput (length, currentPage, size) : (10,3,4) ?
For test 3: "should return 1, 3, 4, 5, 10 for 10 pages, at page 4, with +-1 item"...
It's telling me "expected 2 to equal 3." Which is pretty unhelpful as it doesn't say what it's even testing. Using
Test.assertDeepEquals
would be quicker to write, and also more self-explanatory.Also, you can add real comments to help the testee.
What's with
using System.Threading.Tasks;
in the C# solution template? Is this a hint that we're expected to make our solution parallelizable?Loading more items...