Ad
  • Custom User Avatar

    Whose turn is it first and does placing handicap stones whose turn it is?

  • Custom User Avatar

    It cannot be split into "cats and dog", because there is only one "d", it could have been split into "cats an dog"

  • Custom User Avatar

    Yep!

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I am sorry if I came across as being rude, but I was a bit angry about how much time I've spend trying to pass those side effects tests. I have several points I want to tell you:

    a) I've ment (hash in cache) intead, sorry if it mislead you.

    b) This may be a problem of how I understand Details text, but for me it seems that words "...and memoising it for every single argument." indicate some kind of action that I would need to perform in a loop for every argument this function would recieve, which is not what you need to do. So, basically, it trew me off.

    c) Details indicate that this function would recieve either one argument ("...given a function of one argument, returns a memoised function of one argument."), or several ("Functions of more than one argument can...") but last test section (about side effects) gives you 0 arguments, which was not indicated in Details, or visible tests.

    d) Moreover, only those test would pass for me, and I couldn't debug them because logging would produce millions of other logs (in previous tests), and I can't see code of those tests to copy into my IDE.

    e) While I've used recursion and been aware of memoization, I've never actually used it, so this kata was introductory to the concept for me in particular.

    f) As result of (c-e), in my opinion, this kata has flaws in design, as I needed to try and guess what was wrong in my code, and it was not shown to me clear enough by words "should have at least one side effect".

    In fact, I'm still not sure I know what "side effects" of memoization are exactly, and those words don't appear on for example, wikipedia Memoization page.

  • Custom User Avatar

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