Ad
  • Custom User Avatar

    I also agree with you.

  • Custom User Avatar

    Bravo!!!! Well done, this was a great kata. I learned a lot, had never done any web scrapping, so bit of a right of passage. If you are thinking of whether to do this Kata, I could not recommend it more. Also looking at the Kata test cases after solving it is well worth your time, some great code.

  • Custom User Avatar

    I solved it this way, but going down instead of up so it took an extra iteration through the last list, but this is just the definition of elegant. Well done.

  • Default User Avatar

    I had posted this as a separate suggestion and then realized it was basically the same as this one:

    "I'd really like to have the solutions section display the duration that each solution took to execute. I've had to rewrite code a couple times because codewars said it took too long to execute, so it seems to be tracking time.

    I'm very new to coding in general and have only been working my way through Python so far, but I learn a ton by looking at other people's solutions. I've also learned that I can't always trust what is marked as "best practice" or "clever" to actually be GOOD.

    I can determine readability on my own and I think that's a pretty subjective thing. I sometimes go run other people's solutions to see how they work and how efficient they seem. As far as I can tell, readability and efficiency are the two most important things when differentiating valid solutions to a problem. A display of how much time a solution took to execute (or some other metric for efficiency if something else is better) would help me learn a lot."

    Voile, in seeing your answers I still think that a runtime display would be really helpful. Memory usage would be neat as well. Maybe I don't understand what a code length metric would mean, but can't we visibly see how long the code is? You mention difficulty of benchmarking random tests, but couldn't you just display runtime metrics for whatever the set tests happen to be?

  • Custom User Avatar

    hahahaha i have never been more surprised at an answer. nicely played.

  • Custom User Avatar

    Love the "#oh snap", well played.

  • 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

    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? :(

  • Custom User Avatar

    Very clever, well done.

  • Custom User Avatar

    Hey John, funny I came on here as I noticed some of the solutions didn't account for when the triple and the double are different, and I see you already caught it. Nice solution by the way.

  • Custom User Avatar

    Thanks for the reply and completely agree that efficiency isn't everything, but merely one of several factors to consider.

  • Custom User Avatar

    If we're adding in metrics we'll at least add 2 more metrics: code length and memory usage. Even a typical OJ site will have these 3 metrics.

    It seems like you've fallen into the Leetcode trap aka the classical interview problem trap, thinking that efficiency is all that matters. It's not. Besides efficiency, code length and memory usage, there are also readability (yes, being concise is one), elegancy, time required to code a solution, etc. These things are subjective and you can only rely on (educated I guess) people to vote on things that are actually readable and elegant, and not just "things that look like typical Java code".

    Also, a kata is ranked and judged by how the tests are written. If it's written such that even algorithms with a very bad efficiency passes, they pass. Just like in any OJ sites, if you get an AC, nobody cares if you used a brute-force approach ;-)

    p.s But it's all pointless anyways because unlike in other sites, we require random tests, and when you have random tests it takes a lot of time to benchmark to a precision that can resolve one solution from the others if they're very close. (Yes, benchmarking is hard).

  • Custom User Avatar

    Thanks, didn't realize that it was visible outside of solutions.

  • Custom User Avatar

    Even when discussing solutions, mark your post as having spoiler content (when they have it ofc), they're visible in the home page otherwise.

  • Loading more items...