Ad
  • Default User Avatar

    Overall my program seemed to be okay.
    there were 2 disturbing outputs,
    which I don't understand and where my
    solution fails:

    • testAuthor
      ReflectionException: Class does not exist
      Completed in 0.40ms
    • testStrval
      Object of class class@anonymous could not be converted to string
      Completed in 0.24ms
      this I confirmed by using var_dump(">>> $object_oriented_php <<<");
      What is my mistake here?

    What does this error message indicate?

    FinalTest
    testAnonymity
    testDescription
    testKataList
    testKataCount
    testAuthor
    ReflectionException: Class does not exist
    Completed in 0.40ms
    testAdvertise
    testGetKataByNumber
    testInvalidKataNumber1
    testInvalidKataNumber2
    testInvalidKataNumber3
    testInvalidKataNumber4
    testInvalidKataNumber5
    testComplete
    testStrval
    Object of class class@anonymous could not be converted to string
    Completed in 0.24ms
    testCongratulations
    testCongratulations
    Completed in 0.00ms

  • Default User Avatar

    Hi g964:
    thank you for your reply. I am not sure, whether you had the chance to look at the data (output from my function, which showed in the transaction log, where the squared value was different from the result, which seemed okay plenty of times. I checked the hints other ppl got for the same kata and read the respective FAQ section repeatedly. I am also aware that even though "MY CODE" is just great, I might (likely) have done a mistake as you indicated, but so far I believe there might be an issue. My original solution changed drastically after I adviced a person with similar problems as me. I thought my newly foundsolution was fool proof ... :( and I feel a lot of sympathy with your argumentation (40,000 ppl are possibly right!).

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

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

  • Default User Avatar

    I am referencing the c++ kata solution.
    Most of the answers given don't consider the possibility that wrong parameters are given, though instructed otherwise: "Please keep in mind that the test cases ensure that the number of people in the bus is always >= 0. So the return integer can't be negative."). Wouldn't testing be the place to enforce this instruction?

  • Default User Avatar

    In many solutions the actual used space character is taken care of. Here insted of tracking space characters 0x20 is appended to the read word. I believe this to be a mistake, which should have been caught by kata tests!

  • Default User Avatar

    I checked the Kata Test cases and trust them now, naturally I found the solution, but this one is forfeited :(

  • Default User Avatar

    I believe I got it. Thank you.

  • Default User Avatar

    It seems I don't understand the shown solution for
    indivisibility and Indivisibilities
    Any hint, please?

  • Default User Avatar

    I believe that my algorithm is correct. During random testing 3 numbers had been ignored by my original solution, but now works. A random test with > 70000 numbers was working out well and one of the tests failed. There is no option to duplicate the error, because the data is not showing. So, what can I do to comply with testing?

  • Default User Avatar

    If you are writing a function you have to name the arguments, if your are declaring a function, there is no need for this.
    So this would mean you have to write i.e.:
    int main(int argc, char *argv[]){

    }