Ad
  • Default User Avatar

    what do the generations represent ?

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

    Test coverage is very inefficient. Not only is the amount not up to par (only 4 random tests and 1 fixed test), such cases are not covered:

    • Names only consist of [firstname] [lastname] / [Last Name],[First Name] which will invalidate this solution

    • Names only consist of [First Name] [Middle Name] [Last Name] which will invalidate this solution

    • Names only consist of [Last Name],[First Name] [Middle Name] which will invalidate this solution

    • Names only consist of [First Name] [Middle Initial] [Last Name] which will invalidate this solution

    • Names only consist of [Last Name],[First Name] [Middle Name] and [First Name] [Middle Initial] [Last Name] which will invalidate this solution

    I have yet to test other combinations of precedence rules, but I think the random tests should be setup to generate each ruleset in their corresponding groupings. (Links above may look similar, but they are not, any good souls who want to fix this kata may refer to this original solution that covers all cases and compare with above ones)

  • Default User Avatar

    It is not clear from the description if generations can be 0, in which case the user would supposedly still have to trim the universe, i.e.

    gameOfLife([
      [0 0 0 0]
      [0 1 1 0]
      [0 0 0 0]
    ], 0)
    

    should return

    [ [ 1, 1 ] ]
    
  • Custom User Avatar

    There is only 1 random test, which is not enough.

    Also some usages of Test.expect do not give useful feedback.

  • Custom User Avatar

    balk: (Optional) An integer describing the customer's tolerance for long lines. When the customer arrives, if the number of other Customers in the queue is not less than his balk threshold, the customer will simply leave. (E.g. not enter the queue and never receive service.)

    Then a customer with balk = 0 will never enter the queue, because there cannot be -1 other customers in the queue; the tests actually exact the condition to be "greater than" instead of "not less than".

  • Custom User Avatar

    Test needs to stop using global variables for variables used inside for loop, like for(i=0; i<2; ++i){.

  • Custom User Avatar

    Note: Customer arrival times may not be in chronological order.

    Every test case has customer arrival time in choronological order, so this part is pointless.

    But putting that aside, this requirement is incompatible with the kata design: if there's a possibility that a new customer that arrives earlier than latest known arrival time arrives, then all existing calculations can always be invalidated. Calculations are only valid at the time Report is called. Therefore the kata shouldn't even allow Arrival to be added one at a time; it should only be function DMVQueue(numServers, serviceTime, arrivalList) with no superficial classes.

  • Custom User Avatar

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

  • Custom User Avatar
  • Default User Avatar

    Instruction says "If there are no living cells, then return [[]]" yet in Haskell, the expected result in that case is [].

  • Custom User Avatar

    I am passing the sample test case, but failing when I attempt to solve this challenge.

    I'd suggest that a more robust sample test case is added, that factors in things like having to crop around the living cells.

    Even having the output of the attempt be a 2D array of 1's and 0's would be much better than the current html-ized version. It is needlessly cumbersome to count and type in the test arrays by hand.

    If I am missing something, do correct me.

  • Custom User Avatar

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

  • Default User Avatar

    the C prototype is bad :(

    unsigned char *processImage (const unsigned char *imageData, int height, int width, void* weights, int n)
    

    should be

    unsigned char *processImage (int height, int width, const unsigned char imageData[3 * height * width], int n, const float weights[n][n])
    

    sadly it cannot be fixed with backwards compatibility, because of the parameters order. lengths should always precede arrays, even when the compiler does not support C99.

    Also, the conversion in the solution setup

    float (*w)[n] = weights;
    

    is wrong, it should be float (*w)[n][n]

    why even pass weights as void* if you need a cast to VLA type to write sensible code :(

  • Loading more items...