6 kyu
A Simple Music Decoder
170 of 356chainsaw-maniac
Loading description...
Algorithms
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
It would be nice to see this kata available in Python as well as
A Simple Music Encoder
, I hope someone will notice this suggestion. Thanks in advance, guys!in the description, there is whitespace in the compressed examples e.g.
"0-4/2, 5, 7-5"
even though there are no spaces in the test casesThis comment has been hidden.
added better assertion messages and Node 14
This comment has been hidden.
Well, fixed tests already have '-2*2' and 1--5/2' (do you mean basic tests?)... More than fixed tests, I would say:
This comment has been hidden.
removed
That kata took me alot of my time building my spaghetti,damn you!
Thanks for the kata,cheers!
You're welcome, buddy ; glad you enjoyed it!
Great kata! One minor suggestion: add more notes about what can have signs. First? Last?
Thanks wthit.
About signs, please see comments below from cyril and dinglemouse. We more or less agreed that omitting them from the description was OK (i.e. cyrils "final boss" test). But please let us know if you disagree.
Hrm... it just seems a bit cheap to me. It just seems unfair, like the spec wasn't complete and you added it at the last minute without telling anyone. I used to work in the development industry, and have become allergic to scope creep ;P
In general, I take a "make it as easy as possible for the coder to understand" stance. We're testing their ability to implement the spec, not their ability to interpret it and guess at what you want...
I understand, I am annoyed myself by incomplete specs. In this case I think the opposite point of view is that we're also testing for ability to understand a spec and not rely solely on examples, incomplete by construction. "Integers" isn't really ambiguous, it includes negative integers ; "both positive and negative integers" can be considered redundant. Anyway, I'm happy either way, but so far it 2 against 1 :-/
Okay, fair enough. ^^
Thanks for the heads-up about the
Java
version :-)~
One small suggestion : Neither the kata description nor the examples show that negative numbers are possible.
Maybe you are leaving that as a deliberate "surprise" for the harder tests, or maybe it should get a mention in the description.
Yes, it's a deliberate omission. If this is considered bad practice, I'll fix it (I'm relatively new here). Let me know!
I like when katas have a "true last boss" that pops when you confidently hit
Submit
as long as it's only a logical feature you did not think of and not a rules inconsistency.Nice kata btw :D
Thanks! I love the "final boss" analogy ; I'm even tempted to rename the tests :-)
OK. Just checking.
BTW, I also think it is a good learning experience to be tripped up by something I forgot to consider... :-)
This comment has been hidden.
Can you try again ? I think it was just a Test.assertEquals() instead of Test.assertDeepEquals(). Example tests apparently aren't run when publishing.
Yes works;-) - thanks! But first i got one random error, so my code contains a bug or your testcases, second submit was ok;-)...
I just checked, it looks like your solution has a bug ; can it handle 1--5/2 ? Anyway I've just added this case in the advanced tests.
This comment has been hidden.