Ad
  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

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

  • Default User Avatar
  • Default User Avatar

    I like this because it more likely "functional programming". Nesting maps causes brain overload (as SonarCube says).

  • Custom User Avatar

    Still lots of things to point at in the kata test cases:

    • No random tests
    • The last use of Test.expect is wrong - if you want to show a specific success message after a kata, you need to keep track of the number of successful tests yourself, then use a Test.describe at the end inside an if block.
  • Custom User Avatar

    Really good effort in creating a backstory. However, the actual task gets a bit lost in all the text! This could be made a bit clearer. I would recommend either editing your text or using HTML to tidy up your description a bit.

  • Custom User Avatar

    Interesting background story and a good amount of fixed tests for an 8 kyu Kata but may I suggest that you add a few random test cases? Here's a link that you may find useful regarding how to write them.

  • Custom User Avatar

    Thanks dangerdak ! No, I hadn't seen that guide before. Thanks for sharing it will be very useful in doing my next kata xD . It explains the testing well.

  • Custom User Avatar

    Nice kata. Have you seen this guide for writing your own kata? It's really useful, particularly for tips on writing tests. I think it's really handy being able to see which inputs caused a test to fail, and you could make some random tests too.

  • Custom User Avatar

    Thanks for the heads-up, will try your new Kata soon :D

  • Custom User Avatar

    Hi zruF,

    Although the coding required here is less complicated, part of this test was testing that the user gets used to understanding the task. I tried to achieve this by providing a large and detailed description . I purposley missed out the } as I wanted the user to input it, but to make it more user freindly following your feedback I have now added it and written a ///only edit code above this line section. I look forward to building more complicated kata ! Thanks again ! :)

  • Custom User Avatar

    Hi bowssy88,

    good job!
    Your test seem to be fine now! For this kind of kata, they are ok. But for more complicated kata with a more flexible output, I'd suggest you to build some random test cases. It prevents user from cheating ;)
    You also forgot a "}" in your preloaded solution.

    It's good to learn from such mistakes. The next katas will be better and better ;)

  • Custom User Avatar

    Hi zruF,

    Firstly thank you so much for your feedback, I really appreciate it !

    Based on that, I learnt something new today xD. I have added 11 tests. These tests will check the return value of the function and the resulting output. I have also improved the description on how to calculate the estimated years by specifying:
    'In order to calculate the number of years it will take to build the Great Pyramid, you must add two paremeters, (strength) + (skill).'

    I do hope this resolves the issue and let me know if there is anything else you suggest to improve it ! Many thanks :)

  • Custom User Avatar

    You need to work on your tests :)

    You don't check the return value of the function. Also add some random and example tests.
    And you need a better description how to calculate the estimated years.

  • Loading more items...