7 kyu

All Star Code Challenge #31

231 of 443shaddyjr
Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • akar-0 Avatar

    (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?

    • yrprth Avatar

      It is related to the 'note' issue below (with current implementation instruction object can be with and without 'note' attribute).

  • Blind4Basics Avatar

    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.

    • FArekkusu Avatar

      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).

    • Blind4Basics Avatar

      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.

    • GiacomoSorbi Avatar

      What remains to be done here, then?

    • Blind4Basics Avatar

      just remove the if note: in the constructor.

  • FArekkusu Avatar

    Instruction implementation is not provided in the description for any of the languages except JavaScript.

  • GiacomoSorbi Avatar

    Python, Ruby and Crystal translations submitted, enjoy :)

  • kazk Avatar

    An array of plain objects are given in example tests, but an array of Instruction objects are given in random tests.

  • kazk Avatar

    This comment has been hidden.

    • shaddyjr Avatar

      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.

      Issue marked resolved by shaddyjr 9 years ago
  • dinglemouse Avatar

    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)\']'

    • kazk Avatar

      Some objects have note property set to undefined :( Took me a few submissions to figure this out. Not really related, but random tests will give you an array of Instruction instances unlike the example tests. I began to think these are not issues and part of the challenge :p

    • dinglemouse Avatar

      OTOH 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.

    • myjinxin2015 Avatar

      This should be an issue :(

    • kazk Avatar

      @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" :|

    • kazk Avatar

      @dinglemouse and @myjinxin2015, I made it an issue.

      Question marked resolved by kazk 9 years ago
    • smile67 Avatar

      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;-)...