Ad
  • Custom User Avatar

    No, this is more on the logic analysis and grammar literacy side of things. So, you as an observer are able to identify four types of dinasors and 3 types of food.

    Based on these info, you know that both brachiosaurus and the triceratops are herbivores (vegetarians), with an exception that triceratops cannot eat leaves. The same goes for omnivores (T-Rex and velociraptor) cannot eat flowers and leaves.

    So, if such an exception happens, you replace the dinosaur with Something as it would not make sense to say a herbivore is eating a dead dino or an omnivore is eating plants.

    However, for the case of vvvvvvvvvvv, you are able to identify the dinosaur being velociraptor, just not what he is eating on. So, your statement of saying A velociraptor is eating something is entirely true, hence you do not need to replace A velociraptor with Something. Hope it makes sense ^^

  • Custom User Avatar
  • Default User Avatar

    The Kata is asking for the possible combinations of one red and two blues, but ONLY cares about the position of the red.

  • Custom User Avatar

    The rules of this kata (and its testing) seem to be inconsistent to me. According to the description, if a known dinosaur [bitemark] is eating an item that it should not be eating or eating an unidentifiable item then the return statement should be "Something is eating xxxxx".

    From the desc: lunchTime("|||uuVuu|||") // => "Something is eating leaves."

    Yet the test expects that "vvvvvvvvvvv" should be "A velociraptor is eating something."

    Why isn't it "Something is eating something"?

    Otherwise shouldn't the example in the description be //=> "A triceratops is eating something"?

  • Custom User Avatar
    [B, R, B, B, R, B, R]
     ^^^^^^^                <-- 1
              ^^^^^^^       <-- 2
    
  • Custom User Avatar

    I'm finding two of the sample tests a bit confusing in how they seem to be calculating the possibilities differently.

    If ['red','blue','blue','red'] results in 2 possibilities, how is ['blue','red','blue','blue','red','blue','red'] resulting in 2 and not more possibilities?

    In the second array, I can form: "blue red blue", "red blue blue", "blue blue red", "blue red blue" ==> 4 possibilities.

    Isn't the Kata asking for the possible number of combinations of one red and two blues? Or is it that each combination has to be unique?

    Would appreciate some clarification.

  • Custom User Avatar

    Might want to include in your description that a string could include whitespace and/or special character(s).

  • Default User Avatar

    Thx. I will update.

  • Custom User Avatar

    But some readers might still easily mis-read the examples. Like I did. After submitting my code and getting errors, I even thought, "oh this must be a mistake--on the kata sensei's part." I had to go back to re-read the description/examples.

    One could make the case that altering the description slightly doesn't make that much of a difference. But, I definitely recommend updating the example.

    Instead of: "-- Normal reversal without spaces is "edocruo". "

    It should actually say: "-- Normal reversal is "edoc ruo". " (Then followed by the correct reversal example.)

  • Default User Avatar

    The examples given are an important part of the description. You don't think they suffice?

  • Custom User Avatar

    The kata description could use a slight modification for improved clarity.

    "...we are going to reverse a string while maintaining spaces..." can easily be misread as keeping the spaces after each string is reversed, when what is actually meant is to keep the "positioning" (or index order) of the spaces.

    I recommend updating the description.

  • Custom User Avatar

    I was able to solve this kata, but I have to agree with previous comments below that this kata could use clearer instructions.

    The condition that would trigger "Something Bad" or "Something Good" (in the random test cases) is not well-described at all. After passing the sample tests then running into errors with the random cases, I read and re-read the instructions multiple times without clear insight available. Eventually after looking for a pattern in the failed tests, I had to take a wild guess at what I suspected/assumed the author might be asking for. #UXfail.

    Another instance of unclear writing: "If there are multiple challenges with the highest toughest amount, the first one presented will be the toughest." Does the instruction mean to say "multiple challenges with the SAME highest amount of licks"? Big difference because going by the given instruction then the outcome for "totalLicks({"dragons": 100, "evil wizards": 110, "trolls": 50})" would be "dragons" because it's the "first one presented".

    This kata shouldn't be difficult to complete, but unclear instructions will make it a frustrating one to solve for some users.

  • Custom User Avatar

    Agreed! At least a 5kyu. Uff....

  • Custom User Avatar

    the error was parsing your code. You should not use function keyword since it's a ES6 class if you want to use ES5 version you should use this template to do the same:

    "use strict";
    
    var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
    
    function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
    
    var FileNameExtractor = function () {
        function FileNameExtractor() {
            _classCallCheck(this, FileNameExtractor);
        }
    
        _createClass(FileNameExtractor, null, [{
            key: "extractFileName",
            value: function extractFileName(dirtyFileName) {
                // your code here
            }
        }]);
    
        return FileNameExtractor;
    }();
    
  • Custom User Avatar

    Would be good to know if/when this is fixed/resolved.
    As for testing the structure vs extracting the url, the match method returns an array with the pattern as the first element, hence my solution.

  • Loading more items...