Ad
  • Default User Avatar

    Elegant solution! It is exactly what was floating around in my mind, though I couldn't catch it - so mine is less appealing.

  • Default User Avatar

    roflmao this is identical to mine, evein in spacing (the only dif is that u called a variable "char" while I called it "c"). Good job, I guess xd

  • Custom User Avatar

    I created similar kata this summer. You can check it, if you interested.

    It is called "Concat arguments"

  • Custom User Avatar

    It happens. You can watch some lectures about lambda calculus. Some of them can even be understood by mortals :)

  • Default User Avatar

    Sorry, can't wrap my tiny little brain around this.

  • Custom User Avatar
  • Custom User Avatar

    Is ADDICTION just like ADDITION, except you cant stop? :D

  • Custom User Avatar

    As far as I can see, everything is fine.

    Approved :)

  • Custom User Avatar

    Okay, updated tests and description

  • Custom User Avatar

    I believe so, yes. A correct approach won't see any difference anyway.

  • Custom User Avatar

    Do you think it would benefit from not having any empty fields?

  • Custom User Avatar

    remove the "3 holes" tests and specify that at most 1 field will be missing for one song

    Going along with the backstory, it's not possible for an audiofile to have "" as its duration unless something is wildly wrong (ignoring the fact that the song duration is stored as MM:SS string), and songs should never have empty names either unless you want to greatly inconvenience yourself. The only realistic edge case here is missing artist, and even then it should be represented as None instead of ""; everything else are pointless tests which are present just for the sake of being present.

  • Custom User Avatar

    looks handled

  • Custom User Avatar

    looks handled

  • Custom User Avatar

    Hi,

    • the random tests should generate empty inputs from time to time (currently, it's always at least 1 song)
    • there is a hole in the logic, currently: on one hand you tests inputs with "3 holes": ('','',''). This suggests that any number of fields could be empty. On the other hand, your tests only provide inputs with 0,1 or 3 holes (3 holes appearing only in the fixed tests). So, your ordering specification is actually relying on the fact that no fields with 2 holes will ever exist while it's not specified. So I see several possible courses of action about that:
      1. remove the "3 holes" tests and specify that at most 1 field will be missing for one song
      2. make your random holes generator wilder, provide a compelte specification for ordering, then tests for all kind of edge cases (fixed+sample tests)
    • whatever the option you chose (above), you should add to the sample tests 1 or 2 tests with some empty fields.

    Cheers

  • Loading more items...