I'd say half the book contained good advice, the other half was mediocre or dubious at best.
I'm curious to hear what others think who've read both books.
I'd say half the book contained good advice, the other half was mediocre or dubious at best.
I'm curious to hear what others think who've read both books.
I would have liked to see Ousterhout make a more thorough argument if he was going to criticise TDD. His central criticism — that TDD results in what he calls tactical programming, prioritising the implementation of specific features over good design — is certainly defensible. However, I think he was too superficial in what he actually wrote on the TDD section, and consequently I don’t think he made a particularly convincing connection with the ideas developed earlier in the book.
I think you’re slightly unfairly misrepresenting his position on large or small classes. He makes a solid case that what he calls deep modules are better for managing complexity than shallow ones. He also identifies a correlation with size because small modules tend to be shallow. That’s not the same as arguing for large classes or against small classes just because of their size, though.
Instead, Ousterhout recommends designing the interface for the abstraction you're building before you start writing a test harness for it, and I can't agree enough with that statement.
If you write a good interface, testing it will be easy. If testing the interface isn't easy, then you have a bad interface. (This is relative to the complexity of the code invovled, obviously)
+ thoughts on complexity and how constant addition of new features adds to complexity + deep vs. shallow modules but at the same time...
- "..classitis": author criticizes the use of many small classes and functions/methods while I think form my experience SOLID principles are there for a reason- every method/class should have one purpose only.
- which leads me straight to my second point of critique so far: nomenclature. for several ideas exist established names already that are not used in the book.
I don't understand how you can be so confident that SOLID means you should have many small classes and functions/methods. The question of when we should carve off a piece of reality (natural or artificial) and call it one thing, or say that it does one thing, is an ancient philosophical question with no single right or easy answer.
I think sometimes people refuse to go past the words naming a practice or past the tldr; and it causes problems.