Ad
  • Default User Avatar

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

  • Custom User Avatar

    There are multiple "morse code" katas already on CW... *sigh*

    Notes for ruby and python:

    • do not use Test.expect, use Test.assert_equals instead
    • use snake_case for the function names: translate_to_morse instead of translateToMorse
    • add this to keep old solutions valid:
    # for python
    try:
        translate_to_morse = translateToMorse
        translate_to_text = translateToText
    except NameError:
        pass
    
  • Default User Avatar

    A clarification has been added to the description. testing is now a complete test.

  • Default User Avatar

    Accented characters became much to difficult for the level I wanted for this kata, so i pulled that out.

  • Default User Avatar
  • Custom User Avatar

    Would recommend replacing the table in the description with something much more compact like an image similiar to this.

  • Default User Avatar

    Ok i refactored, put the arrays in the preload, did better testing including additional complete random tests. I also added how to use the preload and a primer on how arrays are created and used in each of the langagues. That way they learn arrays without having to create those giant arrays of codes and characters. I also upgraded this to a level 7kyu. What do you guys think. I had put in the accented characters but it becaume too dificult since php and python wouldn't handle multibyte strings easily. Better to pull those out than have the user try to figure out why the accented characters weren't work, and have to figure out why they can't use native multibyte string manipulation through the mb_ commands (since it isn't installed in the php build used in codewars).

  • Default User Avatar

    You are right about brackets in morse code there is no distinction between "(" and ")". Also i didn't get all of the testing correct. As i wrote version in more languages i started testing better, but i found that documentation and implementation varied vastly between languages. This is my first kata, so i'm trying to figure this all out. I'll go back and adjust the tests and make it a little more clear that brackets "()" are the same in the instructions.

  • Custom User Avatar
    • Brackets (parentheses) -.--.-

    One mark two characters ?
    And it is not tested.
    Actually most of the Punctuation Marks are not tested.

    • You are testing users' input by users' input, like this
  • Default User Avatar

    I have altered the description to better describe the kata. I also noticed that I forgot to mention that all text is in lowercase. as Voile stated I have included punctiation/symbols, and I do expect them to be able to translate to and from morse code. I am considering adding the international symbols such as
    Ä .-.-
    Á .--.-
    Å .--.-
    Ch ----
    É ..-..
    Ñ --.--
    Ö ---.
    Ü ..--
    But although the addition of these characters is simple i felt it was probably a bit much for a 8kyu. Also i just added ruby. As a question for others, should i include the arrays all filled in as part of the initial solution (it's a pain in the but to create them) I've gone back and forth on that one. Any input would be appreciated. This is my first kata and is an attempt to teach Boy Scouts the basics of several languages as part of the programming merrit badge. And hopefully get them excited to play with code wars. I already have one scout complete the kata in javascript and all day he has been trying to do other katas all on his own. It's very cool to see someone get excited about programming so quickly

  • Custom User Avatar

    It's not an exact duplicate because of the extra symbols at the end of the code table. None of the existing katas you have to handle them.

  • Custom User Avatar

    Kata is a duplicate of this (except for the inverse function), and the description doesn't accurately describe the task to be completed.