Ad
  • Custom User Avatar

    In the description, the sentence "The initial string will contain at least two words, otherwise an empty string will be returned" is a bit confusing.
    "The initial string will contain at least two words" sounds like you make a statement about the types of string (testcases) that will be input in the function, so that you do not have to check for exceptions. This is somewhat clarified with the "otherwise" part, but an overall better phrasing might be:
    "If the initial string does not contain at least two words, an empty string will/should be returned".
    This special case also does not fit the other results this function returns. When balancing a string that has only one word, should you not just return that word itself instead of an empty string? Or the word follwed by a second, empty line? Might depend on the use case for this function, but at least that way, you would always return every word of the original string without deleting anything. If you did it this way, you could perhaps even omit the whole point, as it would be included in the last one:
    "In case of conflict or doubt, the first line will be the longest."

  • Custom User Avatar

    Ok. I did it.
    Thanks for your suggestions!

  • Custom User Avatar

    point 1: yes, there are in the full test suite, but I meant that this kind of test should also be in the example tests.

  • Custom User Avatar

    I have done points two and three.
    About point one: there are already some example tests. Can you clarify?
    Thank you.

  • Custom User Avatar

    Hi,

    • Missing fixed and (oh, you actually have the equivalent in the full test suite) example tests:

      'aaaaaaa xxxxxxxxxx bb' -> 'aaaaaaa\nxxxxxxxxxx bb'
      'aa xxxxxxxxxx bbbbbbb' -> 'aa xxxxxxxxxx\nbbbbbbb'
      
    • Chai has to be used, not the old test framework (JS)

    • please remove the long useless line of words for the random tests: it breaks code mirror coloring, making the tests harder to read. The random tests don't have to use acutal word (well... 'lorem ipsum' stuff anyway) so ""words"" could just be a random (non nul) number of random letters smashed together

    Cheers

  • Custom User Avatar

    I have made some modification. I hope it's enough.
    Thank you!

  • Custom User Avatar

    Please format the description using the correct code

  • Custom User Avatar

    Thanks for the comment. It's already changing.

  • Custom User Avatar

    Thanks for the comment. It's already changing.

  • Custom User Avatar

    Also, this is not conforming to C# naming convention. C# namespaces should be in camel case, like BalancedTextInTwoLines

  • Custom User Avatar

    Initial code has incorrect namespace: Balanced_Text_In_Two_Lines -> Balanced_Text_Two_Lines for sample tests

    (Actual tests use yet another namespace for some reasons)

  • Custom User Avatar

    For one thing, it does not have random tests, which is often automatic downvote for some reviewers.

  • Custom User Avatar
  • Custom User Avatar

    The kata was retired but I don't why?
    Does anyone know why?

  • Custom User Avatar

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