6 kyu

Typing series #3 --> copy and paste

Description
Loading description...
Regular Expressions
  • Please sign in or sign up to leave a comment.
  • Kees de Vreugd Avatar

    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!

    • goldenratio161 Avatar

      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).

  • LS2008 Avatar

    Hi, this is a very fun kata but there is something that is unclear to me in the description. You said:

    The number inside the bracket will always be greater than 1.

    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.

  • Blind4Basics Avatar

    Hi,

    Still missing the fixed test with a pattern like [text][6][26]. This has to be tested.

    Cheers

  • HerrWert Avatar

    Super fun! I wish there were a VERY VERY VERY rating!

  • Blind4Basics Avatar

    error in the description:

    [ten ][9]ten -> ten ten ten ten ten ten ten ten ten ten
    

    missing one ten.

    (also, you should do that with three, to make the behavior actually obvious without forcing the user to count...)

    • hobovsky Avatar

      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").

    • Blind4Basics Avatar

      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)

    • goldenratio161 Avatar

      ok, thanks for feedback, fixed description, done.

      Issue marked resolved by goldenratio161 15 months ago
  • Blind4Basics Avatar

    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

  • hobovsky Avatar
    • Sample tests are missing obligatory imports, and @describe and @it blocks.
    • Submission tests do not provide feedback about what is tested and what tests fail.
    • The "copy the text inside and write it" is very confusing and probably a literally translated language construct. It's not immediately clear that the task is about clipboard operation. First thing I thought when reading the description was: "copy the text where?". The meaning of "write it" is confusing too, since the copied part should not actually be written out. Description could be clarified in this regard.