112 points · by Open-Juicer · 15y ago · 24 comments
Then again I also feel a little dirty for comparing the likes of Tchaikovsky and Beethoven to Java...
As the author said, this book is NOT about Java. Similarly, SICP is NOT about Scheme.
Interestingly, It's the same author who teaches how to design programs with Racket, a lisp dialect.
That's what it says, but the concepts covered are so java-oriented it may as well be.
It uses generic language to describe most of the concepts, but the underlying assumption seems to be that you need to understand these concepts because you need to program in Java, C#, C++, or some other closely-related language with no dynamic typing, no first-class functions, and explicit java-style semantics for abstract classes, interfaces, public vs private methods, implements vs extends, and such.
Much of that is invisible in a language like Python, and a book that laboriously covers each concept in the context of a language where you have to specify everything explicitly probably isn't going to make you much better at writing classes in python. Or if it is, it's going to be a lot of work for minimal benefit.
> Interestingly, It's the same author who teaches how to design programs with Racket, a lisp dialect.
Indeed, that's partly why I'm surprised the book takes the approach it does. However, it does seem to be a good, thorough book (ignoring the missing sections) if you need to design classes in Java or C# (which covers a lot of people).
Movement 5, while not my favorite, is especially notable for being a canon at the 5th. It's quick, fun, the imitative counterpoint is very easy to hear, and at a minute-forty, hardly overstays its welcome.
Overall though, Western music between Bach's death in 1750 and Beethoven was anything BUT bloated and heavy-handed. Balance, taste, and clarity were highly valued.
EDIT: I seek no arguments. Wikipedia says nocturnes are generally thought of as "expressive and lyrical". Surely that should be of interest to hackers...
Smalltalk is a message-passing language. Java is a method-calling language.
A book about object-oriented programming that doesn't distinguish between message-passing and method-calling fails to express how languages like Ruby and Objective-C work.
I think if I were going to design a book or course in object-oriented programming I would either approach top-down using a dynamic language or bottom-up with C. In the top-down version I would focus on the advantages of OOP as a discipline and why seemingly arbitrary restrictions really are useful (not just some hand-waving about static type checking) Going the other way, I'd have them write method dispatchers and basically implement classes without the features of modern object-oriented languages and then discuss OO languages in terms of the features they provide to simplify that style.
Good coding is not a craft of many secrets; rather it is an art of a few core principles. Mastering them is a matter of direct experience. I believe a good book can point a programmer in the right general direction, but it is up to her to go the distance.
But. Fundamentally, designing classes upfront is simply the wrong way to go about it. The argument may be made that the end result (I now know what good classes look like) justifies the method, but I disagree. It is the journey that is important, not the result. The students will not remember what a good jogging journal class hierarchy is. They will remember how to design classes on paper. In my experience, classes hierarchies written on paper or on fancy UML software, are bound to be "wrong". This is a Bad Thing.
UPDATE: In fact, any tutorial about how to design classes that does not describe an iterative process, and make use of all the refactorings built into Eclipse or IntelliJ, is guaranteed to fail to teach kids what I do every day I program java (or C#).
Why not import some of HtDC best ideas to the Ruby world, for those of you think HtDC is Java biased? Actually, many good ruby books are adapted from the Java land.
A side note: To many rubyists' surprise, Matz is not a language-biased guy who would like to start a language war.