Java Squeaky Clean Unclear Readme

Squeaky Clean exercise

The readme includes this text:

  1. Convert leetspeak to normal text
    Modify the (static) SqueakyClean.clean() method to convert leetspeak to normal text. For simplicity we will only be using 4, 3, 0, 1 and 7 from the table.

I think it’s needlessly unclear which symbols should map to which (and need we really require clicking another link, looking through a table, etc.). Notably 1 is ambiguous and is used to map to both l and to i. Should 4 and 7 map to a and t or to A and T? I’m not sure the test cases punish either option, but I found myself stuck puzzling over the ambiguity, and I’m sure others will as well.

I propose:

3. Convert leetspeak to normal text

Modify the (static) SqueakyClean.clean() method to convert [leetspeak][leet-speak] to normal text.

For simplicity we will only be replacing 4, 3, 0, 1 and 7 with a, e, o, l, and t, respectively.


SqueakyClean.clean("H3ll0 W0rld");
// => "Hello_World"
SqueakyClean.clean("4 73s7");
// => "a_test"

2 Likes

Yeah, I can see how that table can be confusing. I agree with your suggestion to make it clearer.

Feel free to raise a PR to make the change to the exercise’s instructions.md, otherwise I’m happy to create it later in the week.

@mrDonoghue, thank you for bringing this to our attention! If you’d prefer not to raise the PR, I would be more than happy to take care of it.

1 Like

Sorry. I would submit the PR, but I got swamped at work. If anyone has the time to PR it, please go for it.

If not, I will eventually PR it but it might not be till this weekend.

1 Like

No need to apologize! I was simply asking for permission to submit the pull request, and I will do so as soon as possible.

PR has been submitted, here’s the link- Update instructions squeaky by jagdish-15 · Pull Request #2857 · exercism/java · GitHub

maybe, TDD?