Ad
  • Custom User Avatar

    (ps. it does not translate lol)

    x)

    => "being the guy arriving with bad news", sort of

  • Custom User Avatar

    hey that is totally reasonable and i understand that. cheers and thanks for your time. (ps. it does not translate lol)

  • Custom User Avatar

    well, here you'd run into the "PU" trouble (keeping the story short / PU = power users = generally those who solve beta): "we" and more generally codewars are sort of fed up with easy tasks already. Yours, even in "good shape" would still be too close of any "filter/map/reduce" problem, as said by FArekkusu, and there would be actually pretty low chances your kata leaves the beta phase "alive" (there is a second retirement barrier around 12 or 14 votes).

    I know it sounds pretty discouraging, yeah... :/ The idea is that we already have so much of those easy katas that adding one more (unless especially interesting for one reason or another) is strongly disregarded nowadays...

    Sorry to be the crow of the story... ;o (not sure this idiom translates to english :o x) )
    cheers

  • Custom User Avatar

    And what is your view if I'd refactored the messy inputs as per your design, and create a kata that just focus on the problem? Would it still be an interesting 8 kyu question? Just trying to know what standards veterans are looking for in a 8 kyu question

  • Custom User Avatar

    because:

    • the link between the date and the related numbers is "logically" the same if you use either one or the other
    • tuples/lists can be indexed/iterated on typing less code
    • but tuples/lists are lighter in memory and are faster to use (as long as... you don't need the next point:)
    • dicts are interesting if you use random access to the items, and if you cannot identify them by a numbered index. So question is: do you need those features here? obvisouly not

    aside of that:

    • dicts are more annoying to type (when you write your tests)
    • since you don't care about the date, using a dict forces the user to write for vs in d.values() for k,v in vs.items() instead of just for _,vs in d for k,v in vs if d is the list of tuples

    errr... That's what comes to mind right now... (some of those are coming from lazyness (amount of chars, yes... x) )

  • Custom User Avatar

    And hey, what is your rationale behind 'a list of dicts didn't make sense, should be a list of tuples'? What is the reason that it should be a list of tuples?

  • Custom User Avatar

    well, experience is a matter of... experience. So yeah, first things first: start some project on your own (even if simple), solve more kata, but in any case, ask yourself everytime:

    • what kind of datastructure should I use?
    • why did they use that?
    • is there something more appropriate?

    takes some time...

    cheers

    edit: you should unpublish your kata, btw (there are little chances it survives the beta process anyway, so...)
    edit²: sorry for the typos in the messages... :/

  • Custom User Avatar

    great input. Thanks for the lengthy comment, I appreciate it. As a newbie I would love if you could recommend ways for me to improve my design skills, as I don't have much experience building projects but just solving problems on here and Leetcode. Recently am learning on python dictionary so I thought I could build a problem to share on some challenges I had with it like iterating it and accessing nonexistent keys, but obviously you mentioned my blindspot which is that it is setting bad examples to new coders.

    I guess I'll stop creating Katas for now and work on my skills just to do you and the new katas mods a favor! Thanks again.

  • Custom User Avatar

    see my message above, about "interesting/beginners" ;o

  • Custom User Avatar

    Do you mean the one in the description?

  • Custom User Avatar

    The fake answer is that I hope it would interest beginners in learning different ways of handling these data structures and constraints. The real answer is I'm just trying to add complexity to a rather simple problem :p

  • Custom User Avatar

    well, you need to work out your design skills, considering your inputs.

    • in the previous kata the input should have been a list of tuples. A list of dicts didn't make any sense
    • here, the inner dicts are "acceptable" at first seight, but still, considering the values you use, that doesn't even make sense:
      • handling None/[], why not (but "meh" already)
      • handling [None] seems far from a good idea
      • since you can have negative values to, there is absolutely no point to have a dict for each day. A simple list with negatives for expense and positives for incomes would be far better (edit: I actually hadn't read the description yet, so the observation isn't exact, but the argument still stands)
      • and why a dict overall??? In the end this should be a list of tuples (string,list)

    providing a problem with such messy inputs is just an artificial way to increase the amount of work, and not an interesting one. Moreover, this is whowing a bad example to new coders. Any sain programmer would never choose this kind of setup/input to work with. And if by any bad louck he encounter this as an output of a third party tool, the first thing he'll do is cleaning up the whole mess before sending the proper data structure to his function. Hence you're mixing too tasks just to increase the level of your kata, and I guess you read in the docs I gave you that... this is a bad idea... ;)

  • Custom User Avatar

    The current_wallet inclusion adds nothing to the task.

  • Custom User Avatar

    For a transaction record that doesn't exist, it can be represented by its absence, an empty list, a list with a None, or a None i.e:

    Half the task is dealing with the terrible input format... Why?

  • Custom User Avatar

    that's this one, except you're not using it, right now (decorators)

  • Loading more items...