Earn extra honor and gain new allies!
Honor is earned for each new codewarrior who joins.
Learn more
  • Profile-pic

    Python translation

    Notes:

    • I kept the tests almost as they are for the moment, except I put the random tests in a loop to make more of them
    • WARNING: your random tests can currently ask for wrong results: the expected answers do not take care of the simplifications so if the random number id 0 or 1, the test with fail even with a correct code. So, I generated numbers between 2 and 99 instead.
  • Profile-pic

    Thank you for your suggestion. I will look at adding more test cases.

    I tried to keep it simple since more complicated expressions will need more simplifying and that can also be challenging to implement.

  • Profile-pic

    Hi,

    Very interesting one, but it needs more complicated test cases to earn his current rank estimation, imo.

    What about things like: 2x + sin(3 * exp(5x)), 3x^-3 + 7x^2 + 25 - ln(2*x^2), ...?

  • Profile-pic

    ok, thx. I believe I'm overkilling the kata with what I'm implementing now... ;-x

  • Profile-pic

    I think that's because it's a subset of Lisp this way. First function, then any number of arguments, allowing implementations with no special cases for unary and binary functions.

  • Profile-pic

    Hi,

    Why the use of parenthesis while "not infix" notations main interest is they DO NOT need parenthesis...? :o

  • Profile-pic

    Thank you. I edited the description and removed the unused method.

    Tests will use IdGenerator.GetId<IPost>() but it is possible to generate id values in a different way in the solution and still pass the tests.

  • 14909989?v=3

    Okay, re-raising these again since obviously they aren't "issues" according to the author ;-):

    • The tests expect you to use exactlyIdGenerator.GetId<Post>(); to pass VerifyPostInformation, but it really should be IdGenerator.GetId<IPost>();, or otherwise other implementations of IPost will cause an ID collision
    • GetPending is not used or tested. In fact, it's unknown what its purpose is given how GetFriends works (which already has a filter). Also, the name of GetPending is confusing: it implies that it also receives all the pending friends, but the comment above suggests that it's actually the friends+pending equivalent of GetFriends (but then it'd also have the incorrect param signature)
  • Profile-pic

    Thank you for the suggestion.

  • Profile-pic

    Thank you for the suggestion. Filter can be used depending on how you want to solve it. The description is clear that it does not need to be implemented.

  • 14909989?v=3

    GetPending is not tested. In fact, it's unnecessary given how GetFriends can be implemented.

    (Even filter is unneeded.)

    (Also, the name of GetPending would be misleading: it implies that it also receives all the pending friends, but the comment above suggests that it's actually the friends+pending equivalent of GetFriends (but then it'd also have the incorrect param signature).)

  • 14909989?v=3

    The tests expect you to use exactly IdGenerator.GetId<Post>(); to pass VerifyPostInformation, but it really should be IdGenerator.GetId<IPost>();. Otherwise other implementations of IPost will cause an ID collision.

  • 14909989?v=3

    The IEnumerable interface and read-only properties are unnecessarily complicating things IMO.

  • Profile-pic

    It's an error in the description, it should be GetId

  • 12846346?v=3

    Hi pln,

    the following error occures by using IdGenerator.Get< Member >():
    error CS0117: 'KataSocialNetwork.IdGenerator' does not contain a definition for 'Get'

    Can you please check it?

    Thanks

  • Loading more items...