Ad
  • Custom User Avatar

    Thank you so much for the kata approval!!!

  • Custom User Avatar

    @JohanWiltink Thank you very much for the JS translation and adding progressive sizing there! Just have added it!

  • Custom User Avatar

    Hi! I am sorry for the late reply! Yes, @KayleighWasTaken,please, feel absolutely free to rework the test generation and structure, if you would have time for it, I would be extremely grateful for your help!! You're also completely right that the generators are messy!

  • Custom User Avatar

    Thank you so much!! Added it!

  • Custom User Avatar

    Algorithmically they're not that bad? I more or less transliterated for the JS translation ( with progressive test sizing added ), and it's what ( and how ) I would have done myself.

  • Custom User Avatar

    That was my fault, fixed.

  • Custom User Avatar

    I could tell that's what you were going for but the actual generation functions are really messy and I didn't want to reimplement them in case there was some biasing you were doing intentionally that I might remove.

    If you just want 50% case distribution I can implement it this evening (along with some nice progressive test sizing so that the top assertion messages are easier to read for the user).

  • Custom User Avatar

    Solutions that depend on the hidden number being non-zero pass. Consider if you want this. If you do, the description should probably specify the number will be positive. If you don't, there should probably be a test with a hidden 0. ( Negative numbers are also a possibility, but are less likely to trip up solutions. )

  • Custom User Avatar
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    ( Python )

    Failure test message is constructed from argument that solver has had their dirty hands on. Don't just calculate expected value first, pass solver a ( deep ) copy of the input ( and, just in case the reference solution inadvertently modifies its argument, it too ).

    ( I'd fix it, but I don't know how to make a reliable deep copy in Python. )

  • Custom User Avatar

    Thank you KayleightWasTaken! You we pointing me about this issue of test cases in a different kata but I forgot to change it here :/ . I will go around my other katas shortly and modify it and make sure not to do this mistake again!

    So what happens with the functions that generate structures. I have one for generating bad structures generate_bad_structure which should ideally test for False cases and generate_nested which generate True case structures and 50% chance to select one of them. generate_bad_structure generates random nested arrays and usually they are False structures but I also noticed that ocasionally it does create some true structures ( usually, when the structure is small like [ [],[],[] ]). I think, they should be fine but, if not, please let me know.

  • Custom User Avatar

    Hi! Yes, you are definitely right about antipattern. Just have approved the proposed translation by KayleighWasTaken which tackles the problem

  • Custom User Avatar

    Somewhat refactored the tests here. Didn't touch the test generation code itself though, not currently awake enough to try to parse what exactly it's trying to achieve, though generate_bad_structure seems to generate True cases sometimes, and the inverse for generate_nested?

  • Custom User Avatar

    I'll have a go at cleaning up the tests a little and adding assertion messages etc then.

  • Loading more items...