Also, you could have structured the "supreme readable ruby code" much more cleanly:
Admittedly I could have come up with a better code example :) I wanted to show code transforms a collect a couple of times.
While it takes longer to read the Java version, it is unambiguous what it does. With Ruby (as nice as the language is) that is not always the case, at least for me.
(Pardon the tabbing, I don't have that much time to waste on uneducated comments like the above)
btw, I've added a sort to mine, what would that look like for yours?
https://gist.github.com/jaydonnell/4735159
Edit: I see you don't have the courage to use your real account.
Since it seems like you're talking about visual activity now instead of visual clarity, I agree that Java will be more "hard to read" under your definition. But aside from the two lines for the class declaration & method declaration and the other two for the ending brackets, there really isn't much bloat.
All that you have to implement for a simple numerical sort is some logic if a > b return 1 else if a == b return 0 else return -1.
Iterable<String> s = Splitter.on(" ").split("Hello World");
Multiset<String> counts = HashMultiSet.create(s);
Multiset<String> sorted = Multisets.copyHightestCountFirst(counts);
Or to sort by counts directly TreeHashSet.create(Splitter.on(" ").split("Hello World"))
Granted this uses guava, but there is nothing really more readable about your ruby code than this guy's java code. To say he 'lacks courage' ... jesus I'm still laughing. "Why didn't you add the sort!" You're too much man.Show the java code that does the same thing and it will be clear that the ruby is more readable.
String[] sents = {"the quick", "the slow", "the blue"};
Iterable<String> s = Splitter.on(" ").split(Joiner.on(" ").join(sents));