Draft
Train Race
10gfreundt
Loading description...
Physics
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.
the floating point error troubles is actually an issue (see johan's message below). If the kata is approved while it has not been handled, it will become a pain to tackle (for users as well as for future maintainers)
Cheers
Hi,
not enough fixed tests
the assertion message is useless, so it should be either removed or made useful
each with a unique four-digit ID
-> that's incorrect, the IDs are four characters, not four digits (or maybe it's a translation problem?)the trains data could be namedtuples instead of dicts (that specific point is only a suggestion)
Cheers
The use of floating point numbers can be a problem. Normally, you'd fix that by comparing with a margin for error, but sorting things based on floating point results doesn't have that option.
Random tests may fail sometimes, and I wouldn't know how to fix it, except by trying again, or reading your mind what the reference order of operations is. In practice, it may not be a problem, but the design is ( a little ) flawed.
opened as issue
is not the most helpful assertion message imo
I agree, but there really isn't a better way to give more information. The description example covers everything but the step by step process needed to solve it.
posted as issue
description should mention how to handle two trains with same times
also, a test case with two trains having the same finish time can be added
This comment has been hidden.
Done.
Sincerely appreciate the example. Included it as a test, per your suggestion.
so many things that can be done better with the kata:
,
and.
for decimal in the tablei suggest unpublishing this kata, and working on all the flaws, otherwise you're gonna get downvoted to heck, and the kata will never be able to be approved
Personally I don't think it's that bad. Yes the description is a bit hard to understand, but I really like the idea of this kata, and don't think it should be unpublished as the above issues can be addressed rather easily (there's no fundamental issue after all). Apart from the minor issues, I think this kata is really nice.
i don't the kata is bad in itself too... it's just that there are too many (albeit minor) flaws
by the time i typed the suggestion, the main issue was already fixed😂
Hi.
Can we get some clarification on what each of the number in the chart (in the description) refers to? Like which hour number is the acceleration time, constant-speed travel time or deceleration time?
In the current description, I don't think it's clear that the user has to deduce the constant-speed travel duration.
Thanks.
Oh wait there's a table header XD
In dark mode the table headers are not clearly visible. Can you suggest a way to change color to avoid this problem?
See: https://docs.codewars.com/authoring/guidelines/description
@akar-0 This is a regression from the recent dependency update. The kata is not changing the style.
I'll look into it, and fix it as soon as possible.
The table headers are visible now
This comment has been hidden.
Fixed
This comment has been hidden.
Mixed up solution and test, fixed. Thanks