The author conveniently glosses over the type-casting from pre-generics Java and instead compares to Ruby. Duh...of course Ruby is a cleaner read. But compare learning a new API:
// pretty evil
List<Thing> getTheThings();
// really evil
List getTheThings();
Or iteration: // pretty evil
for (Thing t: getTheThings()) {...}
// kill me now
for (Iterator it = getTheThings().iterator(); it.hasNext()) {
Thing t = (Thing) it.next();
...
}If the OP wanted readability, he could use iterators. It's amazingly clear:
private void printCollection(Collection c) {
Iterator<String> i = c.iterator();
while(i.hasNext()) {
System.out.println("Item: "+i.next());
}
}If you want to complain about things that make code harder to understand, I wonder why the author doesn't rant about annotations.