• 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
PG1 Avatar
Name:Pete
Clan:freeCodeCamp
Member Since:Oct 2015
Last Seen:May 2025
Profiles:
    Following:732
    Followers:1,596
    Allies:711
    View Profile Badges
    • Stats
    • Kata
    • Collections
    • Kumite
    • Social
    • Discourse
    • Conversations (8611)
    • Replies
    • Authored
    • Needs Resolution
    • Custom User Avatar
      • Jlambley
      • commented on "Shortest Word" kata
      • 7 days ago

      Thank you for the validation!

      I managed to wrangle my way around it by discovering the %g character class in lua but for a good hour there I was pulling out my hair...

    • Custom User Avatar
      • hobovsky
      • commented on "Shortest Word" kata
      • 7 days ago

      You are right and the random inputs you see are a result of a sloppy authoring, which was unfortunately very common long time ago. The description should define what a "word" is, or tests should use some intuitive, non-surprising interpretation. One hint can be the rank of the kata, where a 7 kyu task would usually not require you to handle any complex cases, but it's a bit of handwaving the problem away.

    • Custom User Avatar
      • Jlambley
      • commented on "Shortest Word" kata
      • 7 days ago

      Call me pedantic but a random list of characters is not what i would call A WORD.

      But what really gripes me is that your rules for deciding what a "word" is are never defined.

      For example, in one of your tests "Let's" is defined as a whole word and even though the 's' sits after an apostrophe, the test does not qualify this as a single letter word. That seems fair to me.

      But in your random tests I was given apprently this phrase.

      "eQnsghc' xN378hr43hHv1kz O5xF2TuTF 9xN8uJWxQeeH hy'c'jaX6fU ixFBC' 8MT2g '6cdNKKKJwK2Ws9 LVu k4UkP 6sgnrftSHF ba6Xu83mHF6m PWD GcXMUC8Kr1n8GZ qfGknKV4Zcq 1MwvcXRz1e7 V87dPg FKdz7y BW61E7N9 "

      Now my code provided 3 but the expected result was 1...
      So I'm left with only 2 assumptions...

      Either the phrase "hy'c'jaX6fU ixFBC'" wants me to see the 'c' as a single letter word
      OR
      the phrase "8MT2g" is actually two words "MT" and "g"...

      Both conclusions actually contradicts another test: "1Ay4Ke5MsW'Ib" which wants a result of 13!
      Meaning that both numbers and apostrophes count towards a word size!

      This is doing my head in.. Can someone smarter than me please tell me why I'm losing the plot here?

    • Custom User Avatar
      • ejini战神
      • resolved a suggestion on "Count the Monkeys!" kata
      • 14 days ago
    • Custom User Avatar
      • ejini战神
      • created a suggestion for "Count the Monkeys!" kata
      • 14 days ago

      Perl translation

    • Custom User Avatar
      • ejini战神
      • resolved a suggestion on "Beginner - Reduce but Grow" kata
      • 14 days ago
    • Custom User Avatar
      • ejini战神
      • created a suggestion for "Beginner - Reduce but Grow" kata
      • 14 days ago

      Perl translation

    • Custom User Avatar
      • HelloCode707
      • commented on "Beginner - Lost Without a Map" kata
      • 14 days ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • ejini战神
      • resolved a suggestion on "Beginner - Lost Without a Map" kata
      • 15 days ago
    • Custom User Avatar
      • ejini战神
      • created a suggestion for "Beginner - Lost Without a Map" kata
      • 15 days ago

      Perl translation

    • Custom User Avatar
      • OSU.PASS
      • commented on "You only need one - Beginner" kata
      • 16 days ago

      This comment is hidden because it contains spoiler information about the solution

    • Custom User Avatar
      • yousef0_0
      • commented on "Is there a vowel in there?" kata
      • 16 days ago

      NOTE: There seems to be a problem with the test environment or test file (e.g., Test.php has a syntax error),

    • Custom User Avatar
      • ejini战神
      • resolved a suggestion on "Sort and Star" kata
      • 17 days ago

      Approved by someone

    • Custom User Avatar
      • ejini战神
      • resolved a suggestion on "Shortest Word" kata
      • 17 days ago
    • Custom User Avatar
      • ejini战神
      • created a suggestion for "Shortest Word" kata
      • 17 days ago

      Perl translation

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

    Confirm

    • Cancel
    • Confirm

    Collect: undefined

    Loading collection data...