Ad
  • Custom User Avatar

    The Elixir test is wrong, perhaps you could update it to reflect the description?

  • Custom User Avatar

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

  • Custom User Avatar

    I actually feel that "hard coding" the scores is a great idea - its simple and easy to understand and update in the future. In my opinion this wins hands down over any "clever" solution for real world coding problems. Great lateral thinking!!

  • Custom User Avatar

    This one actually took me several days and I've learned heaps so thankyou for that. I'm glad I went through the process of learning about Primes and writing my own sieve and generator, but its a quite dissappointing to find out use of the stdlib "prime" class is allowed. In my opinion that drastically reduces the real lessons to be learnt here.

  • Custom User Avatar

    Why did you change these variables to class variables (@@).
    This would mean that all instances of person would share the same values.
    This is clearly not the intent of using a class to define the data.

    Your solution would fail with this following test:

    p1 = Person.new('Yukihiro', 'Matsumoto', 47)
    p2 = Person.new('Keith', 'Salisbury', 40)

    Test.assert_equals(p1.age + p2.age, 87)

  • Custom User Avatar

    I think the tests should be enhanced, because one of the solutions someone has provided uses @@ class variables, which passes tests, but would fail a test like this:

    p1 = Person.new('Yukihiro', 'Matsumoto', 47)
    p2 = Person.new('Keith', 'Salisbury', 40)

    Test.assert_equals(p1.age + p2.age, 87)

  • Custom User Avatar

    Nice one, I like javascript like this!

  • Custom User Avatar

    brilliant, so simple when you know how!

  • Custom User Avatar
  • Custom User Avatar

    First class!!! I was stumbling around this idea but it was staring me right in the face and I just didn't see it. Bravo!!

  • Custom User Avatar

    I've only just joined this website and there was absolutely no mention of "all katas in the series....blah blah blah" so it is in no way clear that the tests may include whitespace. I ended up having to print out codepoints you hid to uncover what you hid in the test. I fully accept that the final solution encourages best practice, but because the failing example is unaccessible I find this Kata to be more trickery than healthy education. Be upfront and honest. Its the fact that you hide this test that makes it sneaky and deliberately deceptive. But thats just my opinion, you obviously have your own opinion.

  • Custom User Avatar

    Nice, didn't realise we could change the Node api, but love your solution.

  • Custom User Avatar
  • Custom User Avatar

    I feel like there's something a little unfair going on with this Kata. My code passes all the example tests, but fails the authors test fixtures with a message

    Expected: null, But was: 123

    I notice other users have experienced the same. It would be acceptable if the failing test data was shown, but as the input is not even visible this seems a little more like a trick than anything useful.