Ad
  • Custom User Avatar

    I tried to approve but I'm getting Description cannot be approved, recent changes from related record must be merged first.

  • Custom User Avatar

    Should be fixed.

  • Default User Avatar

    Perhaps this would have been better as a suggestion, and not an issue. I still believe it is important for the kata description to accurately lay out what is expected. I like having to puzzle out solutions too, but this is a case of being asked to solve the wrong thing.

  • Custom User Avatar

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

  • Default User Avatar

    System.out.println("Random tests."); is unnecessary, there already is a test group header.

  • Custom User Avatar

    Hello All,

    I can see that the method names are now OK and tests seem to be fine.

    Can this kata be approved?

    Thanks

  • Custom User Avatar

    Then the Kata is not clear on that. It mentions nothing about being able to shuffle people around. When most people think a line, they think first to last, one after the other.

  • Custom User Avatar

    The data type of the characteristics column is Text.
    column_name data_type
    characteristics text

    So when you try to select the distinct value of that column, the whole text is compared against the other rows.

    id name characteristics
    1 Cyril big, smelly
    2 Tiny small, stinky, smelly

    So give the above, it will check the "big, smelly" against "small, stinky, smelly" which are two different strings, even though the second one has a characteristic that the first one has.

  • Custom User Avatar

    "If you get more than 3, you will be kicked out, for being too smart". There is something in SQL that could be benefical for making sure you don't get kicked out for being too smart.

  • Custom User Avatar

    So I think you are incorrect in how you are generating the numbers.

    Given y = (x * 2 +1 ), you aren't looking to plug n in there, as x is what is in u.

    This sentence might help clear up the issue "1 gives 3 and 4, then 3 gives 7 and 10, 4 gives 9 and 13, then 7 gives 15 and 22 and so on..."

    So you start with 1, y will equal 1 * 2 + 1 = 3, z =4. So now it looks like [1,3,4] The next step is moving to the next item in the sequence. So you do the same y = 3 * 2 + 1 = 7 and z = 10 and so on.
    So you aren't plugging into the y or z formula but are using the numbers in the sequence.

  • Custom User Avatar

    The assert tests could be more verbose on what is being tested

  • Default User Avatar

    Method names should use camelCase in Java.

  • Custom User Avatar

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

  • Custom User Avatar

    Easy way to generate array of random ints, with random even or odd length:

    int[] evenSizedArray = random.ints(0, 20).limit(random.nextInt(50)*2).toArray();
    int[] oddSizedArray = random.ints(0, 20).limit(random.nextInt(50) * 2 + 1).toArray();
    

    Writing from memory though, so check the docs for exact signatures of methods.

  • Custom User Avatar

    Yup, I checked the doc, msg first :)

    Thank you for the advice though, I am working to improve my Java skills and want to continue to improve. I took all of the three points as added more to the translation. There are now random tests for both even and odd sized arrays using random ints, I have corrected the naming conventions (This is the hardest for me, this was never a point when I was in school and it is a bad habit I'm working on breaking). I also added the messages for each test.

    Thanks!

  • Loading more items...