• ###### sammakkocommented on "Will there be enough space?" kata

Please add test for if there is space left in Java code;

• ###### sammakkocommented on "Fuel Calculator " kata

Could you please add test cases (sample and submit) that verify the rounding to 2 decimals condition of the Kata.

• ###### sammakkocommented on "Fuel Calculator " java solution

This solution, as the most, do not fullfill the condition of rounding to 2 decimal points.
There is no test input checking for that so no one realice it...

• ###### sammakkocommented on "Printing Array elements with Comma delimiters" java solution

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

• ###### sammakkocommented on "What's a Perfect Power anyway?" java solution

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

• ###### sammakkocommented on "What's a Perfect Power anyway?" java solution

The condition part in the for loop will evaluated on each loop.
So if you need a calculation (with not changing values) like here it's better to do that before loop, save it in a variable and check against that variable.
The compiler may optimize that for you, but thats not guaranteed.

• ###### sammakkocommented on "The Supermarket Queue" java solution

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

• ###### sammakkocommented on "Are they the "same"?" java solution

It's not my Kata so I cannot edit it, but I add a suggestion for adding this tests.

• ###### sammakkocommented on "Are they the "same"?" kata

(it seams that editing is not possible for me/my honor?)
Could you please add this test cases, as there are solutions with sum the values that resulting in false positives. (test11 prevent sqrt sum, test12 prevent pow sum)

@Test
public void test11() {
assertEquals(false, AreSame.comp(new int[]{3, 10, 15}, new int[]{33, 99, 16*16}));
}

@Test
public void test12() {
assertEquals(false, AreSame.comp(new int[]{1, 3, 3, 9}, new int[]{11, 11, 77, 77}));
}

• ###### testfirstcodercommented on "Are they the "same"?" java solution

Great catch! Thanks futhermore for noting about `pow` vs. `sqrt`.

Could you add these tests as additional basic tests for this kata?

• ###### sammakkocommented on "Are they the "same"?" java solution

The commented thesis is correct.
But this solution will have false positives for some inputs e.g.
AreSame.comp(new int[]{1, 3, 3, 9}, new int[]{1*1, 1*1, 7*7, 7*7});

As there is no check of same amount of entries also for e.g.
AreSame.comp(new int[]{3, 4}, new int[]{5*5});

• ###### sammakkocommented on "Are they the "same"?" java solution

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

• ###### sammakkocommented on "Create Phone Number" java solution

Why do you use String.valueOf?
StringBuilder can also add int values.

• ###### sammakkocommented on "Consecutive strings" java solution

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

• ###### sammakkocommented on "Playing with digits" java solution

Because of possible big numbers you should map it to long(or double as returned) not int.
As the result of the function is a long big numbers can be assumed.