6 kyu
Typing series #3 --> copy and paste
Loading description...
Regular Expressions
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.
Wrote a piece of bug riddled code that took me ages trying to debug. Gave up and tried again next day. Gave up again, started from scratch. Got it done in 10 minutes with a slightly different approach. Either I'm a complete moron, or this thing is a lot harder than it looks.
Loved it!
glad you enjoyed it, and thanks for doing my kata man! Your solution looks really clean btw, and yeah, at least for me, this kata (and the series in general) wasn't as easy as I thought it was. (also partially because I cannot understand regular expressions for the life of me).
Hi, this is a very fun kata but there is something that is unclear to me in the description. You said:
But there are test cases where the number inside the bracket is equal to 1, mind changing it to
greater or equal to 1
? Many thanks.oh, sorry. it was a typo. it meant to say
greater than 0
. Glad you enjoy it though!Edit: I've changed it to
postive integer
instead.Hi,
Still missing the fixed test with a pattern like
[text][6][26]
. This has to be tested.Cheers
ok, done
note that
type_out('[test][2][3]') -> 'test' * 6
can be misleading because it's actually1+2+3
, and not2*3
, So I'd suggest to replace that one with something more obvious, like...[4][3]
ok, changed it
Super fun! I wish there were a VERY VERY VERY rating!
thanks man!
error in the description:
missing one ten.
(also, you should do that with three, to make the behavior actually obvious without forcing the user to count...)
I think it's not an error in counting, but an issue with translation (see the last bullet point in my initial issue). In some languages, the "write" could mean "write (i.e. store) to somewhere (memory, clipboard, etc)" and ont "write to the result". This interpretation is also consistent with the other example (
[repeat me][2]
, where you end up with two copies of "repeat me").no, it's an error: the sample tests output for this input is
"ten " * 10 + "ten"
(and without that, nothing would make sense, when comparing the first and the second example)ok, thanks for feedback, fixed description, done.
Hi,
It's literally impossible to debug the kata. The first failed random test already fills the buffer. Impossible to print the input, impossible to see the full assertion message.
I'm currently passing the sample and fixed tests, but none of the random ones => missing edge cases as fixed tests and missing a batch of small random tests.
Cheers
looks like the buffer issue mostly comes from my code. I'm trying to extract the edge case...
ok, here it is:
[text][6][26]
(a small batch of random test is still needed)
hmm, ok. I've lowered the number inside the bracket and the length of string to display smaller outputs while dubugging. i think it's better now
@describe
and@it
blocks.sorry about that. i have changed the descrpition.