Ad
  • Custom User Avatar

    Well, seems you got it after all! Hope you had fun :)

  • Custom User Avatar
  • Custom User Avatar

    Your code is not exactly correct, it's not a valid solution of a Codewars kata. See this article for some hints: https://docs.codewars.com/training/training-example#writing-a-solution

  • Custom User Avatar
  • Custom User Avatar

    When you are looking for specifically easy challenges to get familiar with Codewars platform, you can use the search page, filter for only white kata, and sort by "Most completed", like here.

  • Custom User Avatar

    Bug fixing challenges are a bit specific kind of task. It is ranked as 7 kyu, because the final code with all bugs removed is fairly simple. But finding the bugs, getting through the specs, debugging the cause of failures, this can indeed be challenging, especially for people not experienced with working with a non-working (huh) code.

    Remember that what you need to fix is always the "Solution" snippet. You can use the "Example tests" code for your own convenience and testing, but changing it will not bring you closer to solution. And you can always come to Codewars Discord for help with any challenge, not only this one.

  • Custom User Avatar

    Field Incident Report #2024-017

    Agent Involved: Agent K
    Date: 4th October 2024
    Incident Location: Sector 3B

    Summary:

    At 12:45 PM, Agent K took a lunch break during patrol, only to have his sandwich (turkey and cheddar on rye) stolen by a wild cat, identified as "Fluffy." Rather than chasing the cat, K opted to use his stun gun to resolve the situation.

    Malfunction:

    The stun gun malfunctioned, discharging 4 gigavolts (GV) instead of the intended 500 volts. This resulted in severe burns to K’s hand, while the cat was sent flying into the bushes, resembling a toasted marshmallow. The cat’s condition remains unknown, but it’s assumed to be rethinking its dietary choices.

    Agent Status:

    K sustained burns to his right hand and some emotional distress over the loss of his lunch. He is recovering well, though he still mourns the sandwich.

    Collateral Damage:

    The wild cat, though likely stunned, survived and fled the scene. The stun gun is beyond repair, and the sandwich was not recovered.

    Conclusion:

    The malfunction was traced to a recent firmware upgrade. While it performed well in controlled lab conditions, it failed in the field because living organisms don’t throw exceptions—instead, they throw themselves, electrified, into bushes. This raises serious concerns: had this occurred in a real encounter with hostile forces, the result could have been the loss of the entire team of agents, rather than just one charred sandwich. Further testing is critical, especially in scenarios involving threats more serious than lunch-stealing cats.

  • Custom User Avatar

    Added "debugging" tag, I forgot to add it initially.

  • Custom User Avatar

    No, it was a bug in a bug fixing task. Oh, irony! I am sorry, and all I can say is

  • Custom User Avatar

    Oh it might be a bug. I will check, but a bit later. Does it persist after you resubmit? I'll unpublish for now.

  • Custom User Avatar

    Yet another simple(?) bug fixing challenge. Any feedback is appreciated, including downvotes (maybe I am the only one who considers simple bugs with over-the-top theme fun).

    Good luck!

  • Custom User Avatar

    It's a crash. Your solution has a bug and crashes.

  • Custom User Avatar

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

  • Custom User Avatar

    I think the idea is valuable, but the current context makes it pop in a "kinda out of the blue" way. The description focuses a lot on the perf problem, but not really on the fact there is a second bug to find/handle.

    I think this nicely fits into the general 99 little bugs theme of bug fixing and software maintenance. The description also somewhat implies that correctness of the mapping was not thoroughly tested yet. But OTOH I can see how it might not fit well into the form of a coding challenge. I am trying out ideas here and checking out what can be done. What I could try to do better is to more clearly dress up the potentially unsuspected problem as an actual bug, a typo or something, and not just make it appear out of the blue.

    EDIT: maybe some comments would make the typo more plausible? Does it look any better now?

  • Custom User Avatar

    To be honest, I wanted the task to be very simple but still practical, and I meant it to be focused only on the performance aspect. But it looked to me too simple/not interesting enough and I threw in another "tricky" step. I am not bothered by people missing it, but now I have second thoughts and maybe mixing two things is not a right thing to do? Maybe leaving only the performance problem would still keep the challenge interesting enough?

  • Loading more items...