Ad
  • Custom User Avatar

    Clear and concise description, an abundance of input examples for the solver to test against and a few randomly generated text strings in the Submit tests - not bad at all for a first Kata! The only caveats preventing me from voting "Very Satisfied" are the extensive use of I/O (which was actually pretty well done IMO after the description was clarified, but as mentioned earlier isn't standard CW practice) and the novelty of the task itself (some would say it's a duplicate). Keep up the good work @aoliver, looking forward to seeing you author more Kata :D

  • Custom User Avatar

    The revised description is much better, thanks @aoliver for updating it :)

  • Default User Avatar

    There should be tests with \ns or it should be specified that there's always 1 line.

  • Default User Avatar

    From what I see, the focus of the kata is on IO, so there's no problem. It just means that it's not expected to be used when it's unnecesary.

  • Custom User Avatar

    I understand that Katas should not be tailored for a group of people, or as you say, providing instructions IRL instead of on CW. Provided I address these, is it cool I try this?

    Yes. As long as you provide clear instructions (AND additional hints/explanation if there's ambiguity in how to deal the problem, which is the case here) it is fine. But you have to bear in mind that if you're using CW, your content should stand up to CW standards, as creating low quality katas will lead to their retirement.

    Also, as Donald noted, CW lets you write proper functions which can receive inputs and return outputs. Forcing the users to read from System.in and write to System.out is a questionable design.

  • Custom User Avatar

    Hi, I think I didn't explain myself very well.

    While it is true that I designed this kata with my classes in mind, if anybody else finds it useful, I'd be glad to let them use it.

    On the other hand, once they (my students) know how to code, I'd be delighted if they use CW to rank up and practice more using other people's Kata.

    What's more: I can even use (many) of these existing Kata for them to train their skills.

    I understand there are specific tools for private groups (thanks for the links btw), but so far (I've been here just for some weeks) I've got the idea that this approach might work.

    You obviously know way more about the community than I'll ever do.

    So, is using CW as a tool to assign complementary practice in class a bad idea?

    I understand that Katas should not be tailored for a group of people, or as you say, providing instructions IRL instead of on CW. Provided I address these, is it cool I try this?

    Thank you very much ;)

  • Custom User Avatar

    the idea is that these are used by my students

    No, creating a kata means contributing to the site. You can't say "I didn't intend anybody to solve this task except for my students" (or even worse, explain how to solve it IRL, and leave the description underspecified) - this is not how CW works; as soon as you publish a kata it becomes available to all the users.

    If you need some playground to dump programming exercises for some specific group of people, do it on qualified.io, or repl.it, but not here.

  • Custom User Avatar

    Ok, pointer given.

    As I've told you in another thread, the idea is that these are used by my students. Of course there is plenty of ways of reading System.in, and the idea was to use it raw.

    I've had to work around heavily the test process to be able to provide input and collect the output, so maybe there is something broken when using Scanner. Let me check.

    Thank you for your comments! :)

    PS: Ok, I see that Scanner returns tokens delimited by space, so you would be getting an entire word every time. As I told you, the idea is to traverse the character sequence directly from stdin.
    Anyway, I have found the issue and fixed it. May you try again? Thank you for finding this!

  • Custom User Avatar

    Indeed, with so many ways to read console input in Java, it's impossible to tell which solution will or will not work. And searching for the right one feels like a chore.

  • Custom User Avatar

    Qualified should be used for teaching purposes instead of CodeWars.

  • Custom User Avatar
  • Custom User Avatar

    Yeah, I know.

    My idea is to use this in my lectures. That would be Programming 101. And the course begins with character-based I/O.

    They later learn how to use subprograms and functions. This way, they'll be able to use codewars how it should be used.

    Meanwhile, I (think I) have managed to test I/O, so they'll be able to use codewars since day 1 0.

    Why? Because I think motivation is essential, and giving the students a PDF with exercises to solve is dull. This can be a game-changer.

    So, unless you strongly think this should not exist, I think I'm going to try it :)

    Also, I am not sure if this is bad practice, but I don't really need these kata go out of beta process. My goal is that my students can play with them. Although it would be nice if other people can use them too.

    Thank you for your comments!

  • Custom User Avatar

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

  • Custom User Avatar

    Keep in mind that the standard practice on Codewars is to test values returned by (ideally pure) functions, and that it has plenty of facilities to do so. In contrast, an I/O-based Kata is rather counter-intuitive.

  • Custom User Avatar

    Since this is not a debugging Kata, the initial solution should compile.