Ad
  • Custom User Avatar

    Basic tests use this:
    ['|', 'J', '|', '|'],
    ['|', '|', '|', 'J'],
    ['...', '...', '...', '...'];

    But actual tests use this ("random"):
    ['|', '...', '|', '...'],
    ['...', '...', '|', 'J'],
    ['...', '...', '...', '...'];

  • Custom User Avatar

    Trimmed hair ("...") can also occur in the "curled hair", as well as in "chin hair", right?

    In my initial solution I didn't expect there will be trimmed hair ("...") present in "curled hair",
    but only "J" and "|" since trimmed hair is not included in basic test cases.

  • Custom User Avatar

    Nice kata. Tnx!

    Instructions and Test Cases really should include the requirement of
    beard hair having "trimmed chin hair" as well.
    Was kind of frustrated when my test failed because of the absence
    of specs in the Instructions.

  • Custom User Avatar

    Yeah, likewise!

    Good point. I find that the greatest enemy of progress is not willing to lose and learn from a defeat. It coincides somewhat with what you said. Greatest gains do come from facing situations above our skill level and giving our best in trying to overcome them. That's why I like CW, it gives us a lot of tools for improvement.

    I'm glad it worked out for you. (thumbsup)

    I'm currently focused on doing/learning as much as I can and enjoying it in the meantime. ^^

  • Custom User Avatar

    The more I use it, the more I like it. I'd say that's a mark of a good product. ^^

    In your last sentence you pretty much summarized my current position, although I feel
    confident enough with my current Ruby skillset.

    Thanks one more time. Always happy to chat with a fellow FotNS fan. :D

  • Custom User Avatar

    Thank you for taking the time to answer the question thoroughly. Much appreciated!

    I read only Ruby solutions, since I'm only fluent in it atm.

    I get your perspective, it's a good analogy. :) As far as production code goes, the m.o. you stated is the way it should be done, I agree.

    I just might take you up on that offer. I've seen some of your solutions and like them a lot (hence the first message :) ).

  • Custom User Avatar

    Hi,

    just wondering, if you had to put this solution to production code,
    would you leave it as is, or would you try to make it more readable?

    Thanks.

    D.

  • Custom User Avatar

    +1. I'd rate it as 6th kyu, but wouldn't object if it was classified as 5th kyu as well.
    It's definitely not 7th kyu.

  • Custom User Avatar

    Hi! That's correct as well. ^^ This kata didn't require class vars though.

  • Custom User Avatar

    In Ruby '$' symbol is used for defining global vars. You use '@' when declaring instance variables.

  • Custom User Avatar

    Excellent kata! Thank you very much. Namaste.