Ad
  • Custom User Avatar

    Good kata, Need more tests!!

  • Custom User Avatar

    Testing needs fixing up. As mentioned, Example tests have wrong function name; two fixed tests and no random tests on Submit. That's a bit spare.

  • Custom User Avatar

    As I believe has been noted, the supplied tests use the wrong function name.

    It might be useful to link to a short article on matrix multiplication (such as http://www.mathsisfun.com/algebra/matrix-multiplying.html) for those who aren't familiar with the concept.

  • Default User Avatar

    Description and main tests expect 'matProd', but in user tests 'matrixMultiplication' is expected. Also I think you should add more tests. Maybe test solution for its performance with very huge matrices.

  • Default User Avatar

    You don't use the same name in test case (matrixMultiplication) and final (matProd).

    You may also remove the (mispalced) hint as it is a bad hint, you don't need other functions (I mean you need to avoid using others functions).

    Finally I have to add this is a bit redundant with the square product.

  • Custom User Avatar

    The example test cases use matrixMultiplication as the name of the function, but the actual test cases and solution setup use matProd.

    Also, there apparently are some comments on the bottom as hints, which I guess I completely missed or something (was it below the fold?) I'm not 100% people will see that, and it makes the solution look sort of bad. Maybe moving the hint to the description? Also I'm not sure it's that valid a hint, since most of the solutions so far are all in one method.

  • Custom User Avatar

    This currently doesn't have enough information in the description. It's a good idea for a kata, but it basically links to the existing (different) kata, and provides only the barest description on it's own.

    • You need to explain the same information that is in the other kata, but rewritten to explain non-square matrix case. Pretend this is a standalone product specification; it should be as close to self-contained as reasonable. (I couldn't solve it without resorting to looking up the definition in Wikipedia, which is silly, since I just simply had to tweak my square solution.)

    • You need more than 2 test cases. Right now, someone could "cheat" very quickly simply by returning the correct 2 answers. There should cases that test the most simple form ([1]•[1]), and more complex examples would be a good idea. I always like katas that build up the test cases from simple to more complex, making it easier to find bugs.

      A few randomized cases is also recommended.

    • I recommend using some Markdown to format your example matrices in the description, so they are easier to read. Entering code surrounded with triple backticks like this:

      ```js
      | 1 2 3 |   |  7  8 |   |  58  64 |
      | 4 5 6 | * |  9 10 | = | 139 154 |
                  | 11 12 |
      ```
      

      Will render it like this:

      | 1 2 3 |   |  7  8 |   |  58  64 |
      | 4 5 6 | * |  9 10 | = | 139 154 |
                  | 11 12 |
      

      (Note: I added the js to the backticks, because it highlights the numbers nicely!)

    • The example test case uses matrixMultiplication rather than matProd.