• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
reinhardtp Avatar
Name:Unknown
Clan:Unknown
Member Since:Apr 2018
Last Seen:Jan 2025
Profiles:
    Following:0
    Followers:2
    Allies:0
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (22)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • trashy_incel
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      approved, thanks for your efforts (note that in the future, if you're going to add messaged to all assertions, you can write a wrapper function to handle that: it gets rid of hardcoding and makes the lines shorter)

    • Custom User Avatar
      • FranzMartyn
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      done ✅

      • Added Messages to every assertEquals
      • Added @DisplayName to both functions in Test Cases
    • Custom User Avatar
      • trashy_incel
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      if a translation has poor coverage you are allowed to do better in your own translation ;-)

      it's especially relevant here because Python's integers are arbitrary-precision, while in Java the output is an int, which means potential overflow errors.

      but fine, let's do it your way

      one last thing: please use the optional JUnit message parameter to display the input to the user in the random tests. it's easy to do and it makes the user experience a lot better on Codewars

    • Custom User Avatar
      • FranzMartyn
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      And the help section for a translation kumite says:

      You should try to keep the test cases as similar as possible to the
      test cases defined for the other, pre-existing, languages that the kata supports.
      
    • Custom User Avatar
      • FranzMartyn
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      Fixed the second point ✅

    • Custom User Avatar
      • FranzMartyn
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      First point:

      My test cases are based off of the Python translation, which generates numbers from 1 to 100:

       for _ in range(100):
              
              a = randint(1, 100)
      

      Second point:

      I'm so used to doing Groovy translations, which are restrained by JDK 11, that I forgot that I sometimes forget that I can use JDK 17 features when using Java. And yes, I have created a GitHub Issue about an updated version

    • Custom User Avatar
      • trashy_incel
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago
      • why is the random tests' range so small ? the input can go from 0 to 1023 (which should be added as a fixed test: assertEquals(1_111_111_111, Kata.toBinary(1023));
      • nextInt() has an overload with 2 parameters, so you can write n = random.nextInt(0, 1024);
    • Custom User Avatar
      • FranzMartyn
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      fixed

    • Custom User Avatar
      • trashy_incel
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago
      • remove the toBinary/to_binary, "write a function" is enough; the solver will know the function name from the initial code.

      • perhaps adding "as an integer" after "binary format" would make the task clearer ? right now, someone could interpret it as returning a string of zeroes and ones

    • Custom User Avatar
      • FranzMartyn
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      Done ✅

    • Custom User Avatar
      • trashy_incel
      • commented on ""Convert to Binary" Java Translation"
      • 9 months ago

      the description is extremely bloated for such a simple task. can you use the opportunity to make it language-agnostic ? remove the mentions of functions' names, and erase all of the code blocks except one.

    • Custom User Avatar
      • KayleighWasTaken
      • commented on ""Jaden Casing Strings" Scala Translation"
      • 3 years ago

      Rejected due to unmergability (description), lack of random tests, and scala 2.x.

    • Custom User Avatar
      • SolitaryHowler
      • commented on "Multiples of 3 or 5" scala solution
      • 5 years ago

      Any particular reason why traversal on Long is used instead of Int which requires only accumulator to be Long type? Is it to force sum to operate on Long?

    • Custom User Avatar
      • Ssstlis
      • commented on ""Jaden Casing Strings" Scala Translation"
      • 5 years ago

      Ok, i'll add it soon)

    • Custom User Avatar
      • xavierguihot
      • commented on ""Jaden Casing Strings" Scala Translation"
      • 5 years ago

      Looks better, thanks.
      I'd suggest including a set of random tests as well.

    • Loading more items...
    • © 2025 Codewars
    • About
    • API
    • Blog
    • Privacy
    • Terms
    • Code of Conduct
    • Contact

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...