7 kyu
All Star Code Challenge #31
231 of 443shaddyjr
Loading description...
Fundamentals
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.
(Python) Most tests fail (not all...) and I can't figure out what is going on. What is an "instruction object"? Is it part of the challenge?
It is related to the 'note' issue below (with current implementation instruction object can be with and without 'note' attribute).
python implementation of the class doesn't make sense about the
note
part: if not given as argument, the note attribute should still be defined, and its value should be None.It's the same as in JavaScript though, so all kata versions have to be fixed, not only the translations (not because of the end result, but because conditional attribute existence is bullshit).
no, because in JS if the attribute isn't present you get undefined. While in python, you get an error "thrown in your face". It's not pythonic at all, to proceed that way.
edit: seems like you edited your message in the meantime. Well, whatever. Fixing that in all languages, even if that works in JS, cannot be bad, yes.
What remains to be done here, then?
just remove the
if note:
in the constructor.Instruction
implementation is not provided in the description for any of the languages except JavaScript.Done.
Python, Ruby and Crystal translations submitted, enjoy :)
Hi,
please, fix the issues above in your translations.
cheers
An array of plain objects are given in example tests, but an array of
Instruction
objects are given in random tests.True! I've included the proper object constructor in descriptions.
This comment has been hidden.
I've taken a different route for the solution, but it shold be fixed now. Please let me know if you're getting the same issue.
Are these tests OK? I am getting a lot of "undefined" notes in the expected results.
Expected: '[\'Pour 18 mL of Liquid Mercury into a Pipette (undefined)\']'
Some objects have
note
property set toundefined
:( Took me a few submissions to figure this out. Not really related, but random tests will give you an array ofInstruction
instances unlike the example tests. I began to think these are not issues and part of the challenge :pOTOH I am just imagining being Jesse reading a list of instructions.
From that perspective having
(undefined)
in the instruction is an issue because it makes no sense.This should be an issue :(
@dinglemouse and @myjinxin2015, I completely agree, it makes no sense so it should be an issue. I usually report even minor issues during beta, but for this series I just couldn't get motivated to :( I've been thinking it's part of the challenge as in "it's not a bug, it's a feature" :|
@dinglemouse and @myjinxin2015, I made it an issue.
Yesterday i made an issue for this point, but i removed it later on because i looked into the object (one solution with "console.log") - thought it was part of this kata;-)...