Ad
  • Custom User Avatar

    __constructor in pre-filled PHP code should be renamed to __construct

  • Custom User Avatar

    Should add a fixed final test for the following recurring mistake:

     _  _  _  _  _
      ||  |  | || |
    |    || || |  |
    
    should be:
     ?  ?  ?  ?  ?
    and not:
     2  5  6  8  9
    

    In fact, all possible combinations of the 7 segments should be tested at least once.

  • Default User Avatar

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

  • Default User Avatar

    anybody knows what : begin 0, end -1, length 0
    error mean?

  • Default User Avatar

    In order to remove the problem with unexpected occurrences of a signal from detecting obstacles, I propose to make the following addition to the story.

    Unfortunately, obstacle detection is unreliable and signals are possible even when the door is not moving. In this case, these signals should be ignored.

  • Custom User Avatar

    It would be nice to see this kata available in Python as well as A Simple Music Encoder, I hope someone will notice this suggestion. Thanks in advance, guys!

  • Default User Avatar

    I enjoyed the kata, but I feel that it's a bit underspecified what shall happen if there is an obstacle while the door is immobile. And if it cannot happen, it should be mentionned as well.

  • Default User Avatar

    No random tests in java.

  • Default User Avatar

    Thanks everybody for the reviews and the feedback.

    After fixing the defect reported by Hobovsky, runtime is now fairly predictable.

    I have run all visible solutions against the present tests and all run between 7 and 8 seconds, which is aligned with Blind4Basics' recommendation.

    Anything else which needs to be improved? Any suggestions for tags?

  • Custom User Avatar

    Hi,

    The specs are... not specs. At all. => the description needs to be rewritten.

    Cheers

  • Default User Avatar

    in the description, there is whitespace in the compressed examples e.g. "0-4/2, 5, 7-5" even though there are no spaces in the test cases

  • Custom User Avatar
  • Custom User Avatar

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

  • Custom User Avatar

    Please take a look and fix it!

    Input: [35, 35, 31, 30, 164, 141, 136, 131, 126, 126, 3, 84, 87, 90, 93, 155, 158, 161, 164, 167, 133, 128, 123, 118, 113, 153, 156, 159, 2, 131, 130, 86, 87, 88, 89, 90, 196, 187, 105, 52, 198, 190]; :
    '352,31,30,164,141-131/5,1262,3,84-93/3,155-167/3,133-113/5,153-159/3,2,131,130,86-90,196,187,105,52,198,190' should equal
    '35*2,31,30,164,141-126/5,126,3,84-93/3,155-167/3,133-113/5,153-159/3,2,131,130,86-90,196,187,105,52,198,190'
    My decision is correct, because by condition:

    1. A sequence of 2 or more identical numbers is shortened as number*count
    2. Other combinations

    Input: [37, 40, 43, 46, 49, 136, 133, 130, 127, 72, 3, 117, 121, 44, 178, 13, 15, 17, 19, 20, 21]; :
    '37-49/3,136-127/3,72,3,117,121,44,178,13-17/2,19-21' should equal
    '37-49/3,136-127/3,72,3,117,121,44,178,13-19/2,20,21'
    My decision is correct, because by condition:

    1. A sequence of 3 or more consecutive numbers is shortened as first-last. This is true for both ascending and descending order
    2. A sequence of 3 or more numbers with the same interval is shortened as first-last/interval. Note that the interval does NOT need a sign
  • Custom User Avatar

    I'd suggest obstacle detection should only occur when closing.
    If the door is opening it wouldn't matter; in this case if opening and an obstacle occurs it'd start closing and squish a pet. - This sounds like the original problem the company probably wants to solve. ie When an obstacle is detected the door should begin opening if closing. If already opening and an obstacle is detected continue opening.

    An additional intersting additonal would be a double press of the button would reverse direction. And further to that a double press after obstacle would ignore any further obstacles until closed.