Ad
  • Default User Avatar

    Local variable 'highest_word' might be referenced before assignment

  • Custom User Avatar

    I didn't know that JS had the "isIteger" method! You changed my future projects so much with that, thank you!

  • Default User Avatar

    The task stated that you're given a valid number and examples also shown that you are in fact is getting only a Number. By converting it to a String in your code you introduced an issue about different separators and now you're solving it :)

  • Custom User Avatar

    The performant comment makes a lot of sense. Can we spell out what the other assumptions are so I can get a better understanding?

  • Custom User Avatar

    This is a fair assessment. This is really just a "harder" take on the same problem that accounts for some very common edge-cases. Personally, I've seen enough "Code Golf" 30-character solutions to these 7 kyu problems and wanted to provide a different perspective. We're all just here to learn, and I believe this solution provides an opportunity to learn that isn't as common here on CodeWars.

  • Custom User Avatar

    It's bad. The programmer assumes things which you should never do. This solution is vastly less performant because of that. It should only be transfored to this when the actual implementation calls for this change, never sooner.

  • Custom User Avatar

    Thanks for adding the code comments. Very helpful when trying to figure out the best practices for this particular solution!

  • Default User Avatar

    So this is what developers call 'production code' ...
    Thank you for this lesson. I mean that.

  • Custom User Avatar

    Thank you for the straightforward, intelligible, efficient O(n) solution. This is the code I would hope to find in a product or an interview.

  • Custom User Avatar

    I agree with many other comments here: easier Katas are flooded with inefficient, upvoted one-line & code golf solutions. There doesn't seem to be enough incentive to write "Best Practice" solutions that are simple, performant, documented, robust, & readable.

    Concise solutions aren't inherently bad, but they're currently overrepresented. I believe Codewars should add more incentive for "Best Practice" solutions, including good runtime & memory performance. As far as I'm aware, Codewars is the best code challenge website for learning programming languages & implementing comprehensive unit testing. There are other websites better suited for concise solutions.

  • Custom User Avatar

    This is a necro, but this is exactly how I feel.

    I believe CodeWars offers more flexibility & knowledge sharing than other code challenge websites, especially for unit testing & learning new programming langauges. I love how this website encourages users to build comprehensive unit tests, which is typically an undervalued skill.

    That said, it's annoying to see the easier Katas flooded with inefficient upvoted one-line & code golf solutions while simple, performant, documented, robust, readable solutions get buried.

  • Custom User Avatar

    I appreciate what moment.js offers and the novelty of this solution, but adding several thousand bytes of JavaScript to accomplish this near-trivial task is the opposite of Best Practice. Or maybe I just strongly disagree with the way users distort the meaning of "Best Practice" on this website.

  • Custom User Avatar

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

  • Custom User Avatar

    This is the most memory-efficient solution. I'm kinda frustrated to see a recursive solution as the Best Practices leader.

  • Custom User Avatar

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

  • Loading more items...