Ad
  • Custom User Avatar
  • Custom User Avatar

    Hey that was great. Took a while to understand what was being asked though, I'm not very good at reading long descriptions.

    I've found bitwise operators really useful in the past for storing booleans and it was fun working out how to do this one.

  • Custom User Avatar
    Your code should return nil/None if there aren't enough pixels to conceal the message.
    
    If the message has been fully concealed and there are remaining pixels, the remaining pixels should be left unmodified.
    

    This part should be made clearer with relevant example tests described properly

  • Custom User Avatar

    Yep, if the message is shorter than the pixels, the remaining pixels should be untouched.

  • Custom User Avatar

    Updated the full tests suite to use the same tests from the sample tests

  • Custom User Avatar

    the sample tests should be present at the beginning of the full tests suite.

    Note for further authoring work: never build a test suite without hardcoded tests. The interest of fixed tests is that they are reliable. If you give only random stuff, the user cannot debug the kata in a comfortable way.

    Cheers

  • Custom User Avatar
    • Python initial solution now has a type annotation
    • For the full test, I switched to genereating some of the pixels, rather having them hardcoded
      • Full tests now also re-test the example test cases
    • Python tests use the test framework outlined in the Docs
  • Custom User Avatar

    hi,

    same kind of problems than in part 1, about the tests and initial solution :

    • type annotations instead of default
    • input and output too long
    • the tests do not use the test framework correctly

    cheers

  • Custom User Avatar

    approved.
    I made some changes to the description on my way.

    Cheers

  • Custom User Avatar

    I removed it and put lorem ipsum text there instead for both Go & Python

  • Custom User Avatar

    I just looked at the tests and I have mixed feelings about that very long text. I understand the fun in it, but since 99% of the users won't ever see it and that it makes loading the solutions, discourse and forks pages very slow, I think it's better to remove it or at least to make it shorter. If you need an input that long, better to generate it with some code.

  • Custom User Avatar

    Hi :)

    • Initial solution for Python uses type annotations (msg: str, pixels list[list[int]])
    • Added a note in the Bitmask Array section about thinking of it as bit replacing
    • Kept a few 255 & 0's and added some more random color values in the Hello example and updated the tests to match

    Thanks for all your feedback!

    Cheers

    ps: Hope you give Part 2 a try :)

    edit: I'll make some time to apply some of the same feedback on Part 2 as well

  • Custom User Avatar

    hi again,

    • the initial solution is misleading and contains a bad design: the arguments shouldn't have default values, especially the second one, which makes it a mutable default argument, which is sort of evil in python. If the goal is to give an idea of the types of the arguments, type annotations should be used instead of default values.
    • about the problem below, I finally resorted to retroengineering the example tests to actually find out what was wanted (the user shouldn't have to do that to solve the Kata). And in the end, it looks like this is not about lsb insertion, but lsb replacement. Now, that might very well be on me, not knowing what "lsb insertion" is, but you definitely should:
      • either clarify it
      • or use a more appropriate/simpler wording (ie. "replacement")
      • and use some pixel color values other than 0 or 255 in the examples, to avoid some possible wrong deductions.

    If still needed, you can dm me on discord yes, no problem.

    Cheers

  • Custom User Avatar

    Okay, I cleaned up the extra diagrams and added some more emphasis on insertion, and noted that the bitmask array is applied bit-by-bit to each color value one at a time.

    If this still isn't good enough maybe we can text chat on Discord? I see you in the mods section so I can send you a DM if that's ok?

  • Custom User Avatar

    ps: ha, I finally saw the relevant information, I was missing the insertion thing. so just highlight this somehow, and add the info that the result of the insertion is limited to the 8 lowest bits of the result (not sure how to express that)

    now that I saw this, I realize I just missed the info right from the beginning, which means your description sucettes from the "flood the user syndrom", let's say ;) It is just a matter of clarifying some sentences/ info, and removing useless info that are distracting the reader more than anything.

    edit: well, it looks like it's still something slightly different... actual specs, please...

  • Loading more items...