Ad
  • Custom User Avatar

    100 years later, I was still staring at the monitor waiting for the kata to be approved, as cars flew by outside the window, the second technological revolution took place on Mars.

  • Custom User Avatar

    Can you explain to me more clearly what is happening?

    In example tests, there is a test case which looks like this: Assert.That(Kata.Hello(), Is.EqualTo("Hello, World!"));. Notice how Hello() is called without any argument passed in. You have to write your solution in a way which allows it. It should work for both forms: Kata.Hello(someName), and Kata.Hello().

  • Custom User Avatar

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

  • Custom User Avatar

    You'd have to add something to the description along the lines of "In this kata, you are expected to write a function which can take either zero or one parameters." Even then, people tend to be bad about reading the description. I think the main problem is that this kata is introducing a concept that seems to be new to newer programmers, but it's not explicitly calling out what that concept is. A lot of people solving the kata aren't even aware that what it's asking for is even possible, so it doesn't register to them as "this is something I can control". Another idea might be to have the tests catch the exception and print out a more user friendly error message that says something like "Your function doesn't work when called with no arguments." A lot of people reporting this as an issue seem to have a problem comprehending error messages. At the same time, that's a skill they should be working on, it's not really reasonable to expect kata authors to have to do that just because a lot of solvers lack a basic programming skill.

  • Custom User Avatar

    This is not exactly what I wanted to ask. I would be interested to know what to change in the kata (in the description or in examples or something) so users will see their errors as their mistake, and not as a bug with the kata.

    For example what made you think that the kata is buggy? What would help you see your mistake?

  • Custom User Avatar

    For hobovsky's question on how to help with the responses, I suggest instead of saying you are wrong, saying "the Kata is not wrong, if you are having issues tag the post with question".

  • Custom User Avatar

    Angry? I just left some snarky replies to your equally ridiculous comments, while trying to point you to the source of the error.

    And no, we can't just ban you because we want to (I'm not sure about Hob), but the fact you would just blindly imply it is quite disgusting.

  • Custom User Avatar

    You are expected to return a dynamically allocated string.

    You are right that returning internally allocated strings is a poor design choice, it is unfortunately a long established convention for C translations of Codewars challenges, especially the older ones, created by translators who either did not know what are valid patterns, or simply did not care. Fortunately, currently active C translators came up with much saner setups, like preallocated output buffers, mutable buffers, and generally much better and idiomatic setups.

    If you see a C translation which requires you to return a pointer and no explanation how it could be allocated, most probably you have to dynamically allocate the buffer. And still this is not the worst kind of a setup: there are some old setups which require you to return a malloced buffer of... pointers to individually malloced ints. And they do not describe this aspect at all, you need to deduce it from errors. Those are fun.

  • Custom User Avatar

    When using C, the test case expects a pointer type string, the problem with this is that any value you attempt to return will be the address of a local variable that will then be available memory for the program on exit, in other words, the value of the returned string will be erased or changed. I would allocate memory for that purpose, but this will be a bad behavior as I'm not in control of when to free the allocated memory. Has anyone tried it on C? Maybe using ENV variables?

  • Custom User Avatar

    when kata starts adjusting to my decision.

  • Custom User Avatar

    hence why people like me are asking for help.

    The issue I see is that people are not, in fact, asking for help. They are dismissing the setup as incorrect right away. Only few users ask "why is my code wrong?" . Instead, majority of complaints is "this kata is wrong". Why?

  • Custom User Avatar

    Okay so I would say that:

    • "I can't find a way to get around the problematic one" is not a sign of the kata being wrong. The example is there for a reason, and finding a way to solve it is a part of the solution. Intended way is to figure out how to make this test to work, and not to conclude that it is incorrect.
    • I mentioned it somewhere below, and I would repeat here again: the challenge here is to make both forms work: hello() and hello(someName). IF a user solution can handle one way but not the other, tests fail.

    What I would be really interested with, and maybe you could help me, is how to make it clear that failing test is a problem with user solution, and not with tests. It's already mentioned in the description. It is in example tests. What is missing? What sohuld I change to make users aware that it is their task to make things work?

  • Custom User Avatar

    Hello, check it out.
    Translation Dart

  • Custom User Avatar
    1. yes
    2. yes, but I can't find a way to get around the problematic one, hence why people like me are asking for help.
    3. YES, but instead of finding answers, I find replies like this that don't help, and just tell us we are wrong but not what we are wrong about to help solve the problem.

    Sorry if this comes out rude, but I am getting tired of asking for help or looking at other's cries for help and seeing nothing but "Your code is wrong, read the description again", and marking the issue as solved without addressing what they got wrong to begin with, or what they might have gotten wrong.
    This is more of a complaint in general and not with you in particular.
    Please take no offense.

    EDIT: I realize that was an extremely rude rant. I also realize people like me think the issues area is where to go when WE have an issue with OUR code. It is supposed to be for issues with the Kata itself.
    Sorry (Geez, this is embarassing for me)

  • Custom User Avatar

    probably, but i highly doubt that it was so bad that the green pfp guy became angry. i can be angry too, but something tells me if it happens he'll ban me just because he wants. mod guy, thanks for sane answers, i found my mistake.

  • Loading more items...