Ad
  • Custom User Avatar

    Some feedback:

    1. Return values:

      • Suggestion: Use floating-point numbers instead of strings for return values.
      • Benefit: This eliminates rounding issues and simplifies validation.
      • Improvement: Implement approximate equality checks for more reliable comparisons.
    2. Description structure and formatting:

      • Suggestion: Restructure the description for better clarity and readability.
      • Improvement: Use concise language and clear formatting (e.g., bullet points, numbered lists).
      • Goal: Enhance understanding and reduce ambiguity for participants.
    3. Specification Style Improvement:

      • Replace code-like specifications with clear, human-readable requirements.
      • Use concise language to describe expected inputs, outputs, and behaviors.
      • Avoid verbose or repetitive descriptions.
      • Avoid using your own code as specification for the formulas.
    4. Hue value representation:

      • Issue: Adding 360 to hue and then treating it as 0 is redundant.
      • Suggestion: Simplify by using 0 directly where applicable.
      • Benefit: Reduces confusion and eliminates unnecessary steps.
  • Custom User Avatar

    why did this get retired???

  • Custom User Avatar
  • Custom User Avatar

    Fixed!

  • Custom User Avatar

    I have included the formulas in the description.

    I found some better and easier formulas to understand, so I included them instead and updated my solution accordingly.

    Thank you for the suggestion!

  • Custom User Avatar

    I'm working on it! You should see my reply to your reply.

  • Custom User Avatar

    Sorry for reading this late, I haven't had the time to code in the past few days.

    I will include the formulas and then resolve this question once I do it.

    Thanks for letting me know. I had a feeling I was supposed to include it, but I thought maybe people would figure out. My bad!

  • Custom User Avatar

    Yes! You really should.

    That's the only challenge with this kata, figuring out the formulas. Other than that, it's just switch statements, if/else, variables, math, and rounding.

  • Custom User Avatar

    I feel like the only challenge in this kata is figuring out the formulas for someone like me who has no clue how to convert between RGB and HSL. Other than that, it's just a lot of rounding, if/else, and math.

    Thus, I feel like the formulas should also be listed in the instructions as well.

  • Custom User Avatar

    Thank you so much!

    I copied over what you wrote and continued the rest. I didn't understand that this is what you wanted at first.

    Sorry for the inconveniece. Please let me know if this is good.

  • Custom User Avatar

    Hi Abiyasash12,

    In order to illustrate how I think the description can be clarified, I forked the problem here. I rewrote the beginning of the description in a different way. See if you like what I wrote. If so, you can copy it over into your version, and then rewrite the rest in a similar style.

  • Custom User Avatar

    Those of you who have completed this kata please give feedback and rate the kata (not satisfied, somewhat satisfied, or very satisfied).

    If not satisfied, please let me know in the discourse here.

    Thanks!

  • Custom User Avatar

    Sorry about the invoncenience. As you can see in the description now, you must make the hue to 0 even if it is 360. This will avoid possible confusion.

    I also added the first test case in the random tests above as a fixed test.

    Sorry for the issues!

  • Custom User Avatar

    Sorry, the 10k tests was only when I was testing it. I was a complete goofball and forgot to get rid of it.

    As for the hue values, I'll start working on that now.

  • Custom User Avatar

    Possible reasons for low satisfaction votes I can see are some technical issues:

    • 10k tests is a lot. Why is there this many tests needed?
    • Some tests expect hue of 360. Is this a valid value for hue? If yes, how should I know when to return 0, and when 360?
    Random Tests
      For rgb (234, 41, 42):
        expected '0, 82%, 54%' to equal '360, 82%, 54%'
      For rgb (230, 8, 9):
        expected '0, 93%, 47%' to equal '360, 93%, 47%'
      For rgb (253, 95, 96):
        expected '0, 98%, 68%' to equal '360, 98%, 68%'
      For rgb (177, 52, 53):
        expected '0, 55%, 45%' to equal '360, 55%, 45%'
      For rgb (214, 93, 94):
        expected '0, 60%, 60%' to equal '360, 60%, 60%'
    
  • Loading more items...