7 kyu
The Barksdale Code
1,335 of 2,751milesflo
Loading description...
Cryptography
Puzzles
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.
Awesome idea!!
as a wire fan i really fell bad 4 looking at the solution
"Jump to the other side of the 5 on the keypad" is ambiguous , initially I replaced 1 <=> 3, 4 <=> 6 and 7 <=> 9 and was wondering what did I do wrong.
i still dont get it right what it means to jump to the side of 5
The output type in C is
char *
but it's never tested that the function actually returns the correct pointer.Not only that, but it isn't tested if output is NUL-terminated either, is it even required or are input and output just arrays of chars? Are they guaranteed to have exactly 10 chars?
Please check now on all points raised.
char *
toint
? This means that I canreturn (int)output_var
which is wrong and pass the tests anyway.cr_assert_str_eq
which I assume relies onstrcmp
which wouldn't work for non-terminated strings. @Unnamed should elaborate on this.char *
instead ofchar[11]
(or evenchar[10]
)?So what? Does that mean that
char[11]
cannot be used to represent a string that is guaranteed to be 10 characters long? I can resolve the issue as is, but I'd rather here your reasoning first.C Translation kumited.
Approved :)
COBOL translation.
approved
Typos:
funciton
should befunction
parenthesies
should beparentheses
fixed
Python: string should not be used as parameter name as it shadows module name.
fixed
no c#??? (crying emoji) i guess ill have to do this in python or js
you can always do it, but do read documentation first, I believe Johan already linked one in a previous post.
Coffeescript
Crystal
Julia
(author inactive)
Ruby 3.0 should be enabled, see this to learn how to do it
fixed
I think some of the random tests could have issues and are not testing for the decoded number. Below is a c/p output.
"Random tests Testing for "0984886861" It should work for random inputs too - Expected: "0984886861", instead got: "5126224249" "
Why no translation for Python 2.7? :-)
code's gotta go red before it goes green!
Awesome idea for a kata, I was just watching The Wire a couple days ago!
A Wire kata? SHEEEEEEEEEET (cit.), I have translated it into both Ruby and Python if you want to approve them, enjoy :)
Thanks for the input. This is my first kata so I'm not very familiar with the system. I'll try and make these changes.
Very nice kata milesflo - especially for a first go! Fix the problems mentioned above and I'll vote ready. Example tests to user - your final curly bracket '}' needs to be '});'
I fixed all the issues with the tests, making a few of them more meaningful, outputting test telling the user what we are actually testing and adjusting syntax a bit, I hope the author did not mind, but he did a quite good work which needed only minor polishing.
Try to use the
.assertSimilar()
method only when comparing arrays or other complex objects; for the rest.assertEquals()
is more than ok; also, in both of them the third parameter is an optional message, no need to put the input :)