Ad
  • Custom User Avatar

    Your kata seems really interesting. I will give it a go after I'm done with this one.

  • Custom User Avatar

    Input validation is like doing some actual work.
    I come here to avoid that.

  • Custom User Avatar
  • Custom User Avatar

    Since your function has the parameters in the order h, w, v, I would suggest to also have the assertion messages in that order.

  • Custom User Avatar

    Do you think it's fine how I've done it? What about sacrificing the accuracy for the sake of more bounces?

  • Custom User Avatar

    Yeah, but that put the ball/whatever right in the middle. I found that "less self-explanatory", somehow.

  • Custom User Avatar

    Or make the tower thinner

        |                   |    
        |        Velocity   |___     
        |           <------* ___ / \
        |         *         |     |
        |                   |     |
        |*                  |     |
        |                   |   Height
        |                   |     |
        |                   |     |
        |                   |     |
        |                   |     |
        |         *         |     |
        |                   |     |       
        |                   |     |
        |                   |     |       
        |                   |     |
        |                   |     |
        |                   |     |
        |                   |     |
        |                  *|     |
        |                   |     |       
        |                   |     |
        |                   |     |       
        |                   |     |
        |                   |     |
        |                   |     |
        |                   |     |
        |                   |     |
        |         *         |     |
        <--- Width --------->    \ /
        
    
  • Custom User Avatar

    thing is, to make the drawing easy, you "have" to adapt the width to the velocity, sort of, so the actual way would be to make the tower higher...

        |                           |    
        |                Velocity   |___     
        |                   <------* ___ / \
        |                 *         |     |
        |                           |     |
        |        *                  |     |
        |                           |     |
        |                           |     |
        |*                          |     |
        |                           |     |
        |                           |     |
        |                           |     |
        |                           |     |
        |        *                  |     |
        |                           |   Height
        |                           |     |
        |                           |     |
        |                           |     |
        |                           |     |
        |                           |     |
        |                 *         |     |
        |                           |     |       
        |                           |     |
        |                           |     |       
        |                           |     |
        |                           |     |
        |                           |     |
        |                           |     |
        |                          *|     |
        |                           |     |       
        |                           |     |
        |                           |     |       
        |                           |     |
        |                           |     |       
        |                           |     |
        |                           |     |
        |                           |     |
        |                           |     |
        |                 *         |     |
        |                           |     |
        <----------- Width ---------->    \ /
    

    that begins to be very tall... :/

  • Custom User Avatar

    No-no, keep it out of the kata, plz! ;)

  • Custom User Avatar

    I think its a lot better, but I think ideally make the velocity slightly larger so that you get a good full two bounces?

  • Custom User Avatar
        |                            |    
        |                 Velocity   |___     
        |                    <------* ___ / \
        |                  *         |     |
        |                            |     |
        |        *                   |     |
        |                            |     |
        |                            |     |
        |*                           |     |
        |                            |     |
        |                            |     |
        |                            |     |
        |                            |     |
        |        *                   |     |
        |                            |   Height
        |                            |     |
        |                            |     |
        |                            |     |
        |                            |     |
        |                            |     |
        |                 *          |     |
        |                            |     |       
        |                            |     |
        |                            |     |       
        |                            |     |
        |                            |     |
        |                            |     |
        |                            |     |
        |                           *|    \ /
        <----------- Width ---------->     
    

    ?

  • Custom User Avatar

    Thanks for the feedback! In my opinion input validation is pretty dull so I decided not to include it. I wouldn't mind adding it if everyone thought it was necessary!

  • Custom User Avatar

    It was a fun one with a clear discription and illustration. Not sure if input validation is appropriate for this kata level or not, but nice work regardless.

  • Custom User Avatar

    I assume that if multiple rotors were to be chained, the second part of the output of rotor(n) would be the second argument for rotor(n+1)'s process.

    As I understand, an invalid letter should be "ignored" as if it wasn't input. That's why I think the output False makes sense and this shouldn't be an issue.

    The description however should clarify that, something like :should not affect the internal state of the machine AND output the character unchanged with False as the socond part

  • Custom User Avatar

    Amazing concept for a kata, enjoyed solving it very much. There are some improvements to be made however.

    The mechanism is complicated and difficult to explain, but something like @MMMAAANNN's comment could replace the tables in the description as it was much clearer.

    Just like @Voile mentionned, the rotate argument isn't explained. I thought it would be introduced in a later part of the series until I saw the "Check notching during non-rotation" test cases.

    Also, there are no test cases to validate the inputs other than the wiring.

    The kata was very enjoyable, but it's a shame that it seems to have been abandonned.

  • Loading more items...