Ad
  • Custom User Avatar

    User function should be called inside it blocks. Now all user calls are lumped in front of test cases, which means user logs are also lumped together instead of going into their respective it blocks.

  • Custom User Avatar

    Also, your random test cases sometimes include words with question marks or dashes.

  • Custom User Avatar

    So I gave up and looked at the test cases. :[

    Words in the dictionary are defined by pageArray = SetOfBooks[l][j].split(" ").toLowerCase().replace(/[.,\\/'"\]\[]/g, "").

    So "And fifty ... miles ... up." is split into SIX words, two of which are empty but are counted. Can you imagine my frustration now? That is what I would have liked to hear from you.

    (Also, you are building your dictionary not once, but once for every word in the plaintext.)

  • Default User Avatar

    Hi frustrated Johan :)

    You should read the instructions more carefuly, because they clearly say:

    "Messages you and your contact encode must NOT include commas, punctation, brackets etc (that's what you agree upon)."

    So knowing this, do you still have doubts about how the word is delimited?

  • Custom User Avatar

    Desperately needs clarification of word.

    Is a word delimited by spaces only? What about dashes? Apostrophes? What do I do about periods and commas?

    After an hour of trying to reverse engineer your text handling, invoking various incantations of .match(/[-'a-z0-9]/gi) and .split(/[ ,.\[\]]/) and being NO CLOSER to reading your mind, I'm giving up. Off by one, off by one, off by several. Repeatedly, forever and ever and always.

    Specify this shit!

    (Yes, frustrated. Yes, there are more ways to split text into words than you or I can imagine.)

  • Custom User Avatar

    When the issue it resolved the points get re-added this I assume is an insentive to solve issues on the kata.

  • Default User Avatar

    I've added some random test cases. It was my first time to create such, so I hope this is what you meant.

    BTW - did you know that reporting issues gives -3 to honor to the one the issue is against? Damn man! You disshonored me! Whare's my catana?

  • Custom User Avatar

    Needs random test cases!

  • Default User Avatar

    Thank you very much Zozo. Your remarks make a lot of sense. Do you think that my description doesn't make it clear enough that return format should be [b0 p0 w0] ? I've exaplained it thoroughly and gave some examples. Should I anotate it the way you suggest anyway?

    Also: won't removing the books make it hard for people test and debug? What do you think?

  • Default User Avatar

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