Ad
  • Custom User Avatar

    Thanks!

  • Custom User Avatar

    This is definitely clever (props to you 0lexa!) but who's voting Best Practices on this?

    110 character lines?
    Single char variable names everywhere
    No comments

    Not knocking the code, it's ingenuious (and about 1/6 the size of my solution) but it's more code golf than best practices.

  • Custom User Avatar

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

  • Custom User Avatar

    Well it's certainly succinct but the main argument for using functional methods like reduce is they are supposed to aid code readability and maintainability. This reads like you've run it through a minifier.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    You're right about using an array or object literal but I'll take the ifs over a switch any day. A switch is like an if with extra steps. I'm with Crockford on that one, not even once!

  • Custom User Avatar

    Learn functional programming they said. It's easier to read and maintain they said. You won't even need to comment it they said.

  • Custom User Avatar

    Loving the descriptive variable names, makes your code much easier to read than many of the other, seemingly hand minified, solutions on here!

  • Custom User Avatar

    Hey dude, this is a Javascript Kata, I don't think you're supposed to be using raw machine code here!

  • Custom User Avatar

    Well I'll take well commented code with good variable names over super efficient or clever code without them any day! Doing Kata is fun but the most valuable part, for me at least, is reading everyone else's solutions afterwards - I just wish they would make them more readable instead of trying to show off by using as few lines/chars as possible. I thought we'd left those days behind us. We don't have the memory constraints of yesteryear any more and JS is minified and zipped for production use anyway but many people still like to code like every byte of source costs them money. What's even stranger is how these terse, commentless solutions seem to attract so many best practice votes! Anyway, good on you and good luck in the future! :-)

  • Custom User Avatar

    Dear contributors to this kata, maybe you could explain what Sudoku is and how it works?

  • Custom User Avatar

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

  • Custom User Avatar

    Not the best algorithm on here but props for using descriptive variable names and throwing in some comments. I'm flabbergasted at how many otherwise competent programmers seem determined to avoid meaningful names and commenting their code on here!

  • Custom User Avatar

    Dude this is clever and succinct but what's with all the single char variable names? We got minifiers for that kinda thing you know ;-D

  • Loading more items...