Ad
  • Custom User Avatar

    by default will return None nice

  • Custom User Avatar

    Fixed.

  • Custom User Avatar
  • Default User Avatar

    A random tests on negative rounded values failed. Another try with same code has been successfull.
    I saw that it was already previously araised, and recently annouced as solved.
    Still an issue ?

  • Default User Avatar

    bro that is super simple, you just basically need to loop n times, i hope that you asked in a genuinge way and not as a personal issue,

    I did not coded it as intial solution since i had memory and big-o as priority.

  • Default User Avatar

    Why not. Pls could you write a solution corresponding to your proposal

  • Default User Avatar

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

  • Default User Avatar

    Hi ,

    just a remark about the desciption : as you clearly separate 2 cases : a==0 and a!=0, y'are not obliged to repeat if a==0 for the different subcases in the first case

  • Custom User Avatar

    it may not be necessary to specifically generate additional events, since now there are on average 0-2 cases with checking alphabetical order, then checking after each event can significantly increase this number on its own

    I don't understand, sorry. What I did seemed the easiest way to be sure the requirement will be enforced. Keep in mind the extra events only have 1/10 chances to occur at each iteration.

  • Default User Avatar

    By the way, it may not be necessary to specifically generate additional events, since now there are on average 0-2 cases with checking alphabetical order, then checking after each event can significantly increase this number on its own

    I based the python tests on yours

    Yes, in the JS version everything is not so bad, but in the Ruby version, instead of functions, I just put everything in one before, so there I will have to pick it apart

    Python, although somewhat similar to Ruby, looks rather unusual, but I think I’ll figure it out. Thanks for the clarifications

  • Custom User Avatar

    Python updated. About the other languages being out of synch, it's not critical, no. Do it when you have time, then close the issue once it's done.

    Cheers

  • Custom User Avatar

    I also changed the sequence of events in it so that test events with the same damage would occur both after and before, because without this there were incorrect decisions that would leave the weapon by default when the damage was equal.

    Valid concern, yeah, but the order I chose also had a specific reason. Anyway, I think it's better to keep it in your way.

    I don’t quite understand what you mean, increase the number of weapons with the same damage in random tests in order to check more often in alphabetical order?

    Yes, that's it. I enforced situations in the random tests were weapons with equal specs to the current best one will be generated. Tho, for now, they are generated at a random point in all the possible events whil the actual test is only done at the end ot all the events. Hence my suggestion abou adding more tests inbetween events.

    The random tests update isn't that hard to implement, actually. I based the python tests on yours, even if I splited the functions a bit differently, the behavior is still the very same. So you can use them as "model". If you understand python, that is... I'll reupdate the python version, leaving comments for that part, so that you can spot what I do.

  • Default User Avatar

    Hi

    the fixed tests added (test 8) has to be added to all languages

    Added. I also changed the sequence of events in it so that test events with the same damage would occur both after and before, because without this there were incorrect decisions that would leave the weapon by default when the damage was equal. I also changed the name of the character so that the user would not think that this test is interconnected with the tests from the description.

    I enforced the behavior is tested in the random tests. This also must be added in all languages

    I don’t quite understand what you mean, increase the number of weapons with the same damage in random tests in order to check more often in alphabetical order?

    I wonder if the tests shouldn't be modified a bit to make assertions in between the events. Maybe not everytime? Or maybe everytime, to get a better coverage of all requirements?

    Yes, this is a good idea, I think you can check information about the character after each event, and the log only once at the end. True, I’m not sure that I can do this quickly enough, I wrote the side code for the tests rather dirty, and my knowledge of testing is superficial. But there’s probably nothing bad if it doesn’t appear in all languages at the same time, since it doesn’t change the kata itself in any way, but only improves the accuracy of the tests and the readability of the output.

  • Default User Avatar

    Little bit of a slog, but I learnt some things. Thanks!

  • Custom User Avatar

    oops. Issue of mine... But that also means a fixed test about that is missing.

  • Loading more items...