I see some discussion of zero speeds on this forum, but no mention of zero distances. With some great help on the #help-solve forum, I was able to handle those. But I think the instructions should mention that a trip of zero distance should be assigned according to the rules, but does not affect the availability of the taxi to which it is assigned. That taxi becomes immediately available again.(I was making the mistake of not assigning these zero-distance trips at all, figuring you don't need a taxi to go nowhere:-)
Why not. But in any case, the specifiation should be present in the input data section, not hiden in the rules section. It's a special case that is worth being describe there, just as much as negative values (which are discussed).
Cannot a taxi with speed 0 be considered as "I am out of service today"? Maybe it could be interpreted in a way that if for example taxi with ID=2 is broken today and needs maintenance, then it is not removed from the system and readded after fixing, but just marked as not going anywhere today?
I perfectly understood the requirements. What I've been saying is that the 0 speed case does not make sense. That's artificial and unnatural.
About the empty list, yeah, I just saw the tests. Looks like I got misguided somewhere. What is missing from the sample tests is actually a test with speeds of 0.
But again! The best course of action here would be to remove 0 speed values from the whole test suite.
Hello, thank you very much for your feedback. However, I'd like to clarify a couple of points based on the exercise rules:
Speed of 0: As mentioned in the description, "If the speed is zero, the taxi cannot make trips and will not be considered for assignments." Therefore, taxis with a speed of 0 are excluded from any trip calculations.
Empty list of speeds: Similarly, if there are no taxis available (i.e., the list of speeds is empty), no trips can be completed. The program must check this condition first, as described by the rule: "There is a possibility that no one of the distances could get completed by any taxi."
Also there is already one sample test for this case: "Test 4: distances = [120], speeds = []"
Speeds of 0 are provided, this doesn't make sense. Especially when the description states that "no negative speed will be provided" which suggests we won't have to deal with unreasonnable data. But we currently do... => this requirement should be removed.
The list of speeds may be empty, but it's not said in the description. This should be in the sample tests, also.
Why did you approve this kata? Your own solution doesn't even always pass the tests. Didn't you consider that maybe the verification method is not correct?
I still believe depending on how different solutions calculate floating points, some slight changes between solutions can naturally occur. I suggest you change the verification method to include some tolerance. I can't approve this kata with current test verification.
I see some discussion of zero speeds on this forum, but no mention of zero distances. With some great help on the #help-solve forum, I was able to handle those. But I think the instructions should mention that a trip of zero distance should be assigned according to the rules, but does not affect the availability of the taxi to which it is assigned. That taxi becomes immediately available again.(I was making the mistake of not assigning these zero-distance trips at all, figuring you don't need a taxi to go nowhere:-)
Just added a rule in the description to avoid this misunderstanding when speed is
0
Please keep
0
before Johan enters the battle field.Why not. But in any case, the specifiation should be present in the
input data
section, not hiden in the rulessection
. It's a special case that is worth being describe there, just as much as negative values (which are discussed).Cannot a taxi with speed 0 be considered as "I am out of service today"? Maybe it could be interpreted in a way that if for example taxi with ID=2 is broken today and needs maintenance, then it is not removed from the system and readded after fixing, but just marked as not going anywhere today?
I perfectly understood the requirements. What I've been saying is that the 0 speed case does not make sense. That's artificial and unnatural.
About the empty list, yeah, I just saw the tests. Looks like I got misguided somewhere. What is missing from the sample tests is actually a test with speeds of 0.
But again! The best course of action here would be to remove 0 speed values from the whole test suite.
Hello, thank you very much for your feedback. However, I'd like to clarify a couple of points based on the exercise rules:
Speed of 0: As mentioned in the description, "If the speed is zero, the taxi cannot make trips and will not be considered for assignments." Therefore, taxis with a speed of 0 are excluded from any trip calculations.
Empty list of speeds: Similarly, if there are no taxis available (i.e., the list of speeds is empty), no trips can be completed. The program must check this condition first, as described by the rule: "There is a possibility that no one of the distances could get completed by any taxi."
Also there is already one sample test for this case: "Test 4: distances = [120], speeds = []"
I hope this clarifies the logic behind the tests.
(python, at least)
Speeds of 0 are provided, this doesn't make sense. Especially when the description states that "no negative speed will be provided" which suggests we won't have to deal with unreasonnable data. But we currently do... => this requirement should be removed.
The list of speeds may be empty, but it's not said in the description. This should be in the sample tests, also.
Good fix, all previously invalidated solutions pass now.
You can do it, you are a contributor of the kata.
it's a good kata
I found a mistake. Can I fix it or should author do it?
Why did you approve this kata? Your own solution doesn't even always pass the tests. Didn't you consider that maybe the verification method is not correct?
I still believe depending on how different solutions calculate floating points, some slight changes between solutions can naturally occur. I suggest you change the verification method to include some tolerance. I can't approve this kata with current test verification.
Fixed
There is no description in the errors. Information should be provided on what happened.
Loading more items...