Ad
  • Custom User Avatar

    The kata needs random tests.

  • Custom User Avatar

    It would be nice if this kata description would be more elaborate and had some examples, especially the part that two different cheat codes should produce two different outputs wasn't exactly obvious.

  • Custom User Avatar

    Somehow I keep not passing the last test. The worst part is not knowing what excatly I got wrong. You should consider adding descriptions to your tests

    Test Passed: Value == []
    Test Passed: Value == []
    Test Passed: Value == undefined
    Not Expected: []
    3 Passed
    1 Failed
    0 Errors
    Process took 76ms to complete
    
  • Custom User Avatar

    Really hard to follow the description. I think it could do with an overhaul so that people (including myself) can actually understand what you're talking about. The kata looks really interesting, but I understood barely anything.

    Here's what I'm guessing might be what this kata is about: You are given a list of triangle definitions (made up of three coordinates each). You need to reduce this list so that any smaller triangles that would make up a larger triangle are combined.

    I think to make this easier to understand, you need to build it up in discrete steps:

    1. What is a triangle (how is it defined)?
    2. An example of how multiple triangles can make up a larger triangle.
    3. Input: the signature of the function; what arguments, and what those arguments will look like.
    4. Output: what should be returned, and what it will look like.

    My reactions as I was reading the description, for reference:

    You mention 3 dimensions, but the coordinates are 2D. Then you explain the three dimensions of the "Array", but don't show us what this actually means; what's the difference between triangle definition and triangle points?

    var triangle = [[0,0][0,1][1,1]] is not valid code. And [1,0] /\ [0,1] [2,1] doesn't seem to represent the same code anyway. And what does the /\ part mean?

    You say this is using the top-left coordinate system, but that actually has no bearing on the math used to calculate each triangle anyway, right? It would have been really useful to see the example triangle coordinates plotted out on this graph to make it clear what we're talking about.

    Then you give us a huge array to look at. Is this the input? The output? How does it relate to anything we've been talking about? What is the significance of "rows"? Then you show us a diagram showing "defined" (understood), "found" (what?), and total (huh?)... The found triangles in this array are the outer most triangle that comprises all of the inner triangles is confusing and I can't make head nor tail of it.

    count the number of triangle regardless of the size of the outer triangle. What?! Doesn't that just mean return the length of the input array?