• Custom User Avatar

    @Blind4Basics as well as the actual tests which would surely throw an exception for non-existing self.parts, actually (got it myself during completing the kata).
    At least, according to the lore and such, that could've been considered as a slight-ish hint... that, or you can go over it in other ways tbh

    So yeah, honestly I don't think the comparison tests having the MockObject with parts is a big problem, especially with the fixed initial solution (unless I'm missing something at 9 AM...)

  • Custom User Avatar

    I'm more bothered with comparison tests that rely on the existence of the parts attribute, actually. This is not bad per se, but this is totally white box testing.
    I was also annoyed with the _parts vs parts thing, but this is mostly because of the non existence of specifications. A "private" (underscore thing) against a frozen public propety (without the underscore) is quite usual in python.

  • Custom User Avatar

    Yeah, honestly I was considering that as an issue before beta approval but thought it would not be pretty crucial...

    For now changed in the initial solution self._parts to self.parts as more suitable with the actual tests, thanks for your feedback :)

  • Custom User Avatar

    I see there are some sadists on the CW?)

  • Custom User Avatar

    Actually, I prefer for people to think they have a good solution after passing the sample tests only be to shocked that their solution is not complete at all. IMO it gives a good lesson to take more care to read the kata requirements carefully and not be too hasty in thinking you are finished without considering edge cases.

  • Custom User Avatar

    it should definitely be in the specs. examples are not specs.

    the description should be correct, complete and consistent without the examples.

  • Custom User Avatar

    that is in the last example, but it's not in the specs - and it should be. examples are not specs.

  • Custom User Avatar

    fixed

  • Custom User Avatar

    Please describe your solution, specify the language, and also pinpoint what additional fixed or sample tests or random test validation should be added to invalidate your solution.

  • Custom User Avatar

    you are 3 kyu dude, this was 2 loops and stringstream. How the hell was that tricky to implement for you?

  • Custom User Avatar

    eval does feel kind of cheap. I had the opposite experience sort of. I just retraine on this kata and I used eval() and when I went and looked at my first solution I was like, "Holy shit, did I really write this?!" I think i did since it didn't get any variations. Plus eval is almost never a good idea for security reasons.

  • Custom User Avatar

    Okay for that :)

  • Custom User Avatar

    Yes, it's still new so I think it would be best not to post the solution because there's no more fun solving it if you do that, but thanks anyway. (I also think that for other kata it's not really a good idea :)).

  • Custom User Avatar

    This is not a problem for me but there are also other contributors for this kata, and then we have to see if codewars accepts this?