Ad
  • Custom User Avatar

    Input parameter should not use PascalCase as names. Especially when one of the parameters is named Stream and collides with System.IO.Stream.

  • Custom User Avatar

    This looks like an unfinished school project rather than an actual kata.

    Please break down the tasks into individual chunks that are unit tested separatedly, rather than the whole class that has all the methods to be implemented coupled together.

  • Custom User Avatar

    This is not the place to ask this question.

    You have to link your account to a GitHub account and it will use your GitHub avatar.

  • Custom User Avatar

    Also, the kata author dodged the question in the discourse below, but maximum string length and possible character set needs to be given.

  • Custom User Avatar

    please tell me how to add an avatar

  • Custom User Avatar

    Trivial map/filter/reduce and simple bit manipulations are not novel kata ideas.

  • Custom User Avatar
  • Custom User Avatar
  • Custom User Avatar

    Tests "TestAdvanced" and "TestRandom" takes function output as expected value. This introduces confusion as it is unclear what test is actually expecting without knowing this fact.

    if (stream.Length == 444){
      return new byte[444] {77,110,114,100,108,32,105,112,114,117,108,32,100,110,109,110,115,33,114,104,116,32,97,108,100,116,45,32,98,110,111,114,101,98,117,100,116,116,115,32,97,100, 255 ,112,104,114,99,104,110,103,32,100,108,104,117,44,33,115,100,100,32,100,111,32,100,104,117,114,108,110,101,32,117,100,109,112,110,114,33,104,111,98,104,100,104,100,117,110,116,33,116,116,32,108,97,98,111,115,100,32,100,116,33,100,110,108,111,114,100,32,109,96,103,110,97,32,96,108,105,112,117,96,46,32,84,116,33,100,110,105,108,32,96,100,33,108,105,111,104,108,32,118,101,110,104,96,109,44,32,112,117,104,115,32,111,110,114,116,115,116,101,32,100,120,100,114,99,104,116,97,116,104,110,110,33,116,109,109,96,108,98,110,33,108,96,98,111,114,104,114,33,110,105,114,105,32,116,116,33,96,109,104,112,116,104,112,33,100,120,33,100,96,32,98,111,108,109,111,100,110,32,98,111,110,114,100,113,116,96,116,47,32,69,116,105,114,32,96,117,116,101,32,104,114,116,114,101,32,100,111,108,110,114,32,105,110,33,115,100,112,114,100,105,100,110,100,101,114,104,116,33,104,111,32,119,110,108,116,113,116,97,116,100,32,118,100,109,104,116,33,100,114,114,100,33,98,105,109,108,116,108,32,101,110,108,110,115,100,32,100,117,32,103,116,103,104,96,116,33,110,117,108,108,96,32,112,97,114,104,97,116,116,114,46,33,68,121,99,100,112,116,100,117,114,32,114,105,110,116,32,111,98,99,96,101,98,96,116,33,98,117,112,104,100,96,116,97,116,32,111,110,110,32,112,115,110,105,101,100,110,116,44,33,114,116,110,117,32,104,110,33,98,117,108,113,96,32,112,117,104,33,110,102,102,104,98,105,96,32,101,100,114,100,114,117,110,117,33,108,110,108,108,105,116,32,96,111,104,108,32,105,100,33,100,115,116,32,108,97,98,111,114,116,108};
    }
    
    // Expected and actual are both <System.Byte[444]>
    //   Values differ at index [42]
    //   Expected: 255   <- returned by function
    //   But was:  105   <- actually expected value
        
    
  • Custom User Avatar

    good at the end you did it

  • Custom User Avatar

    you could enter it there but then I would not oblige you to know the keyword partial. please try another algorithm more efficient, ps said between us the characters that I use the final test are the same as in the basic test.

    the challenge is not impossible, already other people have already finished it

  • Custom User Avatar

    In sample tests - it indeed is. But I think it does not mean that final tests have the same character set and the same constraints. It should be explicitly written in the description IMO. I think that ideally all information should be available before user presses the TRAIN button - otherwise katas which have easy description and challenging/impossible to pass test cases hang there in "Attempted" katas section in the profile. Ideally the code you pasted above should be placed in "Preloaded" section and included in kata description, I think.

    And my first remark (about not passing the test) was just a joke remark on the use of the word "must" ;)

    Just to be clear: I liked the kata, and I think it imposes interesting (albeit quite easy) task - I just think that description should be improved. When description is clear enough, I will definitely change my rating to "very satisfied".

  • Custom User Avatar

    more if you notice the BruteForce class is partial this means that you have access to the following information

    private Func<string, bool> Test; 
    private static string Charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToLower() + "ABCDEFGHIJKLMNOPQRSTUVWXYZ"  + "^.";
    public delegate void OnTrue(String TestPassed);
    public event OnTrue OnTrueEvent = (item) => { }; 
    
  • Custom User Avatar

    if you do not pass the tests it's probably because your algorithm is not performing enough, codewars imposes a certain maximum execution time, if you implement a sufficiently efficient code, you can do it in the required time

  • Custom User Avatar

    I implemented the Work method exactly in the way it must look like, but still tests failed ;)

    Okay, but seriously, are there any boundaries on the problem domain? Or password can contain any (printable?) characters and have any length?

  • Loading more items...