Ad
  • Custom User Avatar

    ( See issue below for context )

    The reference solution apparently expects round(dx), and not round(oldX) - round(newX).

    That would expect a wrong answer in a situation like move from ( 0.4, 0 ) to ( 0.8, 0 ), where I would definitely expect a length 1 line to be drawn.

  • Custom User Avatar

    I have a solution that produces visually indistinguisable results from the expected ones. But some values are off by one.

    There are endless possibilities for floating point representation errors in this kata. Unless you specify exactly how to convert from degrees to radians, and when and how to round values that go into the SVG, the onus is on you to compare actual to expected values with a margin for error. Rounding is not an exact science.

    I say "how to round values" because there may even be a difference between round(dx) and round(newX) - round(oldX). ( The latter is probably more correct, but I have no way of knowing if that is (a) the full problem with my solution and (b) what the reference solution actually does. )

    Using floating point values ( even intermediate ones ) in a kata is a can of worms that you have to be prepared for, and handle fully. The only right way to do it is comparing with an error margin, the wrong, wrong, wrong way is rounding final values. If you want to do it the wrong way, be prepared to specify full computations, in order, because solvers are not mind readers and we just don't know against what order of calculation we will be tested. Specifying full computations is, of course, less than ideal, because there's not a whole lot of kata left afterwards.

  • Custom User Avatar

    Your function will receive code something like this. "fd 90 rt 90 fd 90 lt 270 fd 90 lt 90 bk 90 pu bk 20 pd bk 100 rt 60 fd 100 lt 120 fd 100", or more verbosely:

    Is it actually possible we get the verbose variant as input, or will we always just get the string?

  • Custom User Avatar

    Major chords have a third 3 semitones above the root, and a fifth 4 semitones above the third and represented by the root note then m.

    should be "Minor...". And you should use separated bullet points for that part of the description, to make the info easier to catch.

    Note: iirc, you just created a duplicate of a python kata... I'll see if I can find it again (couldn't find it easily. Maybe the one I'm thinking about has been retired...? Someone?)

  • Custom User Avatar

    Please lose the input validation.

  • Custom User Avatar

    RULE III: If III occurs in one of the strings in your collection, you may make a new string with U in place of III.
    RULE IV: If UU occurs inside one of your strings, you can drop it.

    Does it guaranteed not to contains cases with multiple III or UU sub sequences.

    Or how many applications do it take to process on two or more same sequences? Like

    IIIIMIIII => IUMIU // takes one or two steps?
    IUUIUUU => IIU // takes one or two steps?