Hacker News new | ask | show | jobs
by floppy-disk 2207 days ago
I would not agree that the bias towards OOP is a problem in the book, since most of the concepts are paradigm-agnostic. Nevertheless, I feel that the author exposes a rather opinionated (sometimes even dogmatic) and narrow view of software design.

Although I think that the book provides a lot of very valuable insights, I missed a more differentiated view of the concepts presented in the book. For example, in chapter 4 ("Modules should be deep") Ousterhout dismisses the use of small classes and methods. He argues that using many small classes and methods makes the system as a whole more complex because many little pieces have to be managed. I completely agree with that statement. But only under the assumption that software systems are static and never-changing. If we consider software systems as ever-changing, I would argue that using smaller pieces often provides the flexibility necessary for maintaining large systems.

3 comments

I've also noticed that point in one of his talks and disagreed with it immediately. My own experiences have found small components easier to test and reason about in higher level components. I do think that navigating through a codebase with a lot of small files would make the codebase seem a lot more complex (especially without a modern code editor where you can't do things like click on an interface method and see all its implementations), but the biggest drawback of having small components, in my opinion, is that a lot of the developers I've observed are very bad at drawing coherent software boundaries
> a lot of the developers I've observed are very bad at drawing coherent software boundaries

That's a very good point. Designing small components probably requires more effort and can also cause a lot of harm if done incorrectly.

When arguing against small classes and methods by default, he's in good company: http://number-none.com/blow/john_carmack_on_inlined_code.htm...

Prior HN discussion: https://news.ycombinator.com/item?id=12120752

There are also numerous people which promote the excessive use of small classes and methods like for example Kent Beck or Robert Martin. As always, there probably is no "right" answer, it really depends on context.
Yes, except Kent Beck and Robert Martin have zero engineering cred and way too much "Agile" cred, for a lack of a better word.
I think that would be better off in a different book rather than as a part of this book.

It is better to provide a clear and memorable picture that is only slightly wrong than a hedging and muddled picture that is still slightly wrong.