Draft
Late delivery
4 of 5artiekra
Loading description...
Puzzles
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
This is just a glorified knapsack problem with additional flair wrapping the core task. There are already many published knapsack katas.
Hi,
Cheers
Please use normal 0-based indexing. Why waste a perfectly good number? Just to try and frustrate your solvers? It adds nothing to the task, and it does detract.
let's name them Jake and Elwood
apparently they've fallen on hard times :P
This comment has been hidden.
This comment has been hidden.
Fixed it, update will be published soon.
Tests should explicitly import test framework and user solution:
Missing
test.describe
;Tests should fail without throwing exceptions when the actual result isn't a string with the right format;
There should be some "small" random test (5-15 packages, weight < 100);
There should be at least one "distribution" test in sample and fixed tests;
Fixed it, update will be published soon ( problems 1, 2 and 3 ). Problem №5 has it's own "thread", and I will mark that issue as resolved instead.
Sample and fixed tests should be added for each possible branch you describe in the description.
Thanks! I tried to do this, but encountered some problems with it... How can I put this tests in the preloaded code? And if it's not the best solution, than would it be ok to just put the tests on distribution in the example test cases themselves?
Why you want to put a test in preloaded code? Just add a test case after the existing tests.
This comment has been hidden.
Please, respond to the message above. I really don't want to close this issue, but that is the only thing that I can do, because there is no way of implementing distribution tests into example test cases without putting testing code right there or in preloaded code. As I already said, it will be very hard and unnecesary to list all the possible solutions.
You don't need to list all possibilities. You need to implement a verification method to check on the fly whether the user solution is correct.
close this issue, we'll see later how to handle this
Ok.
It's a nice kata, but I wonder if it's worth redesigning to make the output format a bit simpler/clearer:
Does the 1-indexing really add anything (I understand it may come from source Olympiad question, but are they using Fortran/Julia/APL for their questions O_o ? For Python kata why not just have it 0 indexed ?).
Or maybe why not ask to return the package values themselves? Looking at your solution checker it seems that would work also?
Fair enough, that makes sense - thanks for replying!
My query was from point-of-view of 6-7 kyu Users - when I review Beta kata I just try to anticipate the most likely User's problems, while there is still time to make some modifications (many users don't always read descriptions fully!).
But re-reading tests, I just noticed you have a custom error message in the Tests with
Remember that indexing of packages starts at 1!
so that's a nice idea.In worst case, if you have many Questions in Discourse about 1-indexing, you can always add a reminder in the Solution Setup itself also.
Is this an error in test cases?
returning:
Description says
And by that I meant that you MUST use \n. Maybe that wasn't so clear, so I will change this up a little bit, and probably change the tests so there is no exception.
EDIT: I changed it ;)
You should definately add a sample test for such a case.