Ad
  • Default User Avatar

    same here.
    I do find descriptions of SQL tasks bit cryptic.

  • Default User Avatar

    If you study mathematics or like math in general, the math related katas are fun.
    If you are searching for a job or you are about to take a test, you are more stressed to learn and you're interested in the "useful" ones, so math related katas can be annoying in that case.
    I had similar issues in the past. The thing that helped me was filtering katas, on the left part of the screen, select the appropriate tags.

  • Custom User Avatar

    rounded to the smallest value

    That means rounded down, not rounded up like you did.

  • Default User Avatar

    Apparently, sqlite 3.2.8 doesn't have those functions.

  • Default User Avatar

    Excellent post/question - I have been wondering the same for a while.

    IMO a one-liner lends itself well to this particular Kata. I had to admire how, in the top-rated solution, the author named the elements within each list of the data arguement. I myself used numbered indexes - a far less readable solution.

    As a casual/hobbyist coder i have managed just fine without the "one-liners". However, when searching for solutions online I frequently encounter them and have difficulty reading them. So for that reason and because they look cool, I challenged myself to learn them.

    During my research I learned that generators can use less memory, but may be slower to iterate through in certain instances but performance is rarely a priority for my scripts. Speed to acquire a working solution is usually the driving factor. Readability has become increasingly important as the population of scripts increases. Coming back to something I coded myself 6-12 months ago can take a while for me to digest.

    Unless the application requires extremes in either memory utilization, performance or readability one should strike a balance between getting the job done with your available skill-set and writing something you or others need to understand long after the initial release.

    I'm here to learn, so i see getting to grips with generators as an important step in the journey.

    If the line can be read out-loud and it makes sense to me, i'm good with it. Squeezing code into an abtract expression to save on digits and get up-voted is not why i came here - but we all have different goals.

  • Default User Avatar

    My sentiment exactly

  • 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

    I was pondering about that too, allbudzeet20. Looks like VARBINARY is part of the SQL 2016 standard, but currently not supported by postgresql: https://www.postgresql.org/docs/current/unsupported-features-sql-standard.html (although it does indeed support to_hex).

  • Custom User Avatar

    I see how these type of challenges can be benefitial, but I must agree, when I just want to practice my programming skills and not my math ones or necessarily learn new stuff at the moment, at least.

  • Default User Avatar

    ok, I still don't get how a line gets cleared if there are 0 blocks in even one of the positions, I know L0 and R0 are the same position.

  • Default User Avatar

    nevermind, didn't read directions carefully enough - going to try it again

  • Default User Avatar

    yeah I had an input array that said the right answer was one, yet all positions had at least 2 blocks in them, therefore, 2 lines are cleared, not one I'm pretty sure.

  • Default User Avatar

    so wait - if this in the input array:
    ['4L4', '1L3', '1L2', '1L1', '1L0', '1R1', '1R2', '1R3', '1R4', '4L4', '4L4',
    '4L4', '4L4', '4L4', '4L4', '4L4', '1L3', '1L2', '1L1', '1L0', '1R1', '1R2', '1R3', '1R4']

    how is that only one line cleared? every position has at least 2 blocks in it...

  • Default User Avatar

    Yeah - I was having a bad night that night - unfortunately as far as I can tell there's no editing or deleting comments once they've been posted...

  • Loading more items...