Ad
  • Custom User Avatar

    Thank you for the tip! I really need to do some easy Katas 😅

  • Custom User Avatar

    I agree. That's how you learn best and fastest. Carrying out the (more or less) same task over and over until you can do it without thinking. They call it muscle memory, if I'm not mistaken.
    There are plenty of those, though. Check out the filters to the left of your screen and actively search for Kata's that are marked 'Easiest' or 'Most completed', and start with those. You will quickly get the hang of it.

  • Custom User Avatar

    I actually liked it. There aren't many simple katas here, I struggled at my first days because even the ones tagged as "8 kyu" (I think it's a measure of difficulty?) were pretty hard for me, askinf for many things at once, and complicated things. For someone beginning to learn and applying logic, easy and simple tasks like this one is a must to exist, even if it's similar to existing ones.

  • Custom User Avatar

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

  • Custom User Avatar

    Duplicate :

    • as noted below is an exact duplicate of multiply
    • there are other tax kata as well
  • Custom User Avatar

    Random tests added.

  • Custom User Avatar

    "Readable" - is a too vague word. "Best practice"/"Clever" voting is not always objective, but having "Readable" button will lead to newbies upvoting bad code because "I don't know if this solution is efficient but I understand what's happening, so it should be good".

  • Custom User Avatar

    The first one, as I mentioned, is compound. The second one does not show up when you search "tax".

    But I get it... Thanks.

  • Custom User Avatar

    There are already tax calculation katas.

    https://www.codewars.com/kata/tax-calculator
    https://www.codewars.com/kata/calculate-meal-total

    And even then, this kata is basically just multiplying two numbers together, so it's a duplicate regardless.

  • Custom User Avatar

    Thanks for the tip. I couldn't find one that was just a simple percentage/tax calculator. I thought it was a good opportunity to write my first one without diving in too deep.

    I'll look into random tests.

  • Custom User Avatar

    A proper kata needs random tests.

    Also, it's now new either.

  • Custom User Avatar

    Yeah, I can attest to that, in retrospect I shouldn't have voted up things that I did. I have basically stopped voting as I just can't see voting up a solution until I have a much better grasp of the language to be able to judge between solutions, so perhaps in like a decade I will start voting again :). But yeah my idea of what is "best practices" has changed a lot and as I have only been coding for 2 years, will I am sure continue to evolve.

    One of the things I have started doing is going on the leaderboard and finding people on there that are ranked high in the language I'm learning and following them. Then when you get to the solution page after I check out the top rated ones, I click on the "see solutions of people you are following". This way you often get to see quite quickly how someone who is a dan or a 1kyu coded the solution. I hadn't been using the "follow" feature, but it is definitely helpful.

  • Custom User Avatar

    Why are you so resistant on one-liners and code golfs? ;-)

    It's not like we're actually trying to golf most of the time (or you'll be seeing really horrible things). We're mostly just reducing the unnecessary burden and bloat in the code, keeping everything concise and to the point ;-)

  • Custom User Avatar

    The problem is, most people have a bad idea what "readable" is.

    I mean, lots of people complain about short, golfy solutions but it's really the ridiculously long, imperative spaghetti code that should be put more blame on. Short solutions can be bad if by getting shorter they become either relying on tons of obscure tricks or inefficient algorithms, but shorter solutions have a fundamental advantage: they're faster to read. I want to read a 1-line code than reading some 20+ line code some people can write for just a simple thing, just because I can read less.

    (Not like it'd stop people making passive-aggressive disagreements on "best practice" anyways. Acquiring a good taste is arguably even harder than doing katas.)

  • Custom User Avatar

    I think I agree and just suggested a "readability" vote in addition to "clever". I'm tired of seeing the top solution be a one line. This isn't code golf, is it? :(

  • Loading more items...