Live data from Hacker News

Books Programmers Don't Really Read (2008)

billthelizard.com

131–140 of 169 posts

Re: Books Programmers Don't Really Read (2008)

#131
post #56
post #48

Earlier quoted context omitted.

What do you feel it is missing? Better, where has it really been left behind?

- probabilistic algorithms (like all the modern bloom filter variants or skip lists or treaps) - parallel algorithms - cache oblivious (or just aware) algorithms. This made a lot of difference in designing trees or graphs. - modern hashing (like cuckoo or robin hood hashing), or min hashing - data mining algorithms ...

Are you sure those are not covered? I know he covers Bloom's filter. And half his treatment on trees is how frequency of access matters on tree creation. (He specifically does not advise just balanced trees.)

For hashing, he does cover things at arms length.

Re: Books Programmers Don't Really Read (2008)

#132

Earlier quoted context omitted.

The GoF design patterns book has two core, very closely related, problems. The first is that it doesn't make enough of an effort to present "design patterns" as a conceptual framework. Can you program without using design patterns? No, you cannot. You are always using design patterns whether you know it or not, you're just using ad hoc design patterns without realizing it when you don't think you're using patterns. T…

> Additionally, the GoF book doesn't make it clear that each design pattern exists to work around specific constraints, and thus doesn't educate the reader when and why the design pattern should be used, and when not. Quite to the contrary. I don't have my copy handy and haven't cracked it open in years, but I recall clearly that they presented design patterns as reusable solutions to commonly occurring problems. And…

I do have my copy at hand. While they do try to get across the concept that not all patterns are suitable for all cases they do a remarkably poor job of it. The "applicability" section of most described patterns is a simple bullet list of 3 or 4 very vaguely worded sentences. This is, as evidence has proven, wholly insufficient. There should have been much more effort into trying to educate readers on the applicability, and non-applicability!, of each pattern, explaining the constraints that made the pattern necessary or desirable, laying out examples of other ways to achieve the same functionality, and also explaining the costs and extra complexity of relying on a specific pattern.

Re: Books Programmers Don't Really Read (2008)

#133

Earlier quoted context omitted.

The problem with the design patterns books (including the GoF one) is that in the end they didn't have much influence. Think of how few of their patterns have become part of the vernacular of our field: Iterator, Singleton, Factory, Adapter, and maybe one or two more. It's not a long list. If you insist on talking in terms of design patterns, you are going to have to explain nearly all of them to your listeners. Inso…

The GoF design patterns book has two core, very closely related, problems. The first is that it doesn't make enough of an effort to present "design patterns" as a conceptual framework. Can you program without using design patterns? No, you cannot. You are always using design patterns whether you know it or not, you're just using ad hoc design patterns without realizing it when you don't think you're using patterns. T…

> The GoF list of design patterns is very much tightly coupled to the peculiarities of Java at the time the book was written

GoF publication date: 1994; Java launch date: 1995

The patterns are essentially Smalltalk-based, though the authors had been implementing the same ideas in C++ - Gamma in ET++ and Vlissides in InterViews.

Re: Books Programmers Don't Really Read (2008)

#134

Earlier quoted context omitted.

The problem with the design patterns books (including the GoF one) is that in the end they didn't have much influence. Think of how few of their patterns have become part of the vernacular of our field: Iterator, Singleton, Factory, Adapter, and maybe one or two more. It's not a long list. If you insist on talking in terms of design patterns, you are going to have to explain nearly all of them to your listeners. Inso…

The GoF design patterns book has two core, very closely related, problems. The first is that it doesn't make enough of an effort to present "design patterns" as a conceptual framework. Can you program without using design patterns? No, you cannot. You are always using design patterns whether you know it or not, you're just using ad hoc design patterns without realizing it when you don't think you're using patterns. T…

Have you read Design Patterns? The viewpoint you have here is typical of people who have absorbed it osmotically from software culture, but haven't read the work itself. You say:

    > Instead the GoF book largely presents a canonical list
    > of some design patterns, giving people the false
    > impression that these are special and unique versus
    > merely a sampling of ways one might do things.
From the Introduction:

"Despite the book's size, the design patterns in it capture only a fraction of what an expert might know. It doesn't have any patterns dealing with concurrency or distributed programming or real-time programming. It doesn't have any application domain-specific patterns. It doesn't tell you how to build user interfaces, how to write device drivers, or how to use an object-oriented database. Each of these areas has its own patterns, and it would be worthwhile for someone to catalog those too."

    > Additionally, the GoF book doesn't make it clear that
    > each design pattern exists to work around specific
    > constraints, and thus doesn't educate the reader when
    > and why the design pattern should be used, and when not.
"No discussion of how to use design patterns would be complete without a few words on how not to use them. Design patterns should not be applied indiscriminately. Often they achieve flexibility and variability by introducing additional levels of indirection, and that can complicate a design and/or cost you some performance. A design pattern should only be applied when the flexibility it affords is actually needed. The Consequences sections are most helpful when evaluating a pattern's benefits and liabilities."

Literally every single pattern chapter in the book comes with an explicit section describing when you should and should not use it.

    > The GoF list of design patterns is very much tightly
    > coupled to the peculiarities of Java at the time the
    > book was written. Many of the design patterns aren't
    > necessary outside of that environment.
As another commenter noted, Design Patterns is older than Java and makes no mention of it. The patterns are often particular to object-oriented languages, but I don't know what else you would expect from a book titled "Design Patterns: Elements of Reusable Object-Oriented Software".

    > Many of the more advanced "behavioral" patterns from
    > the book are essentially ways to work around the fact
    > that Java didn't have first class function, when that
    > changes the design patterns that you end up with become
    > very different.
The book uses Smalltalk as one of two example languages. Smalltalk not only has first-class functions, but all blocks used for control flow in Smalltalk are essentially closures.

The Command pattern isn't just "how to take first-class functions in a language that doesn't have them". It also talks about commands that are undoable, or that can be logged, or serialized and deserialized. It's as much about the objects that create the command, receive the command, and have the command invoked upon them as it is the command itself.

I do wish it talked more about the relationship between commands and first-class functions (which I do here[1]), but it's not as bad as you make it out to be.

[1]: http://gameprogrammingpatterns.com/command.html

Re: Books Programmers Don't Really Read (2008)

#135
post #131
post #56

Earlier quoted context omitted.

- probabilistic algorithms (like all the modern bloom filter variants or skip lists or treaps) - parallel algorithms - cache oblivious (or just aware) algorithms. This made a lot of difference in designing trees or graphs. - modern hashing (like cuckoo or robin hood hashing), or min hashing - data mining algorithms ...

Are you sure those are not covered? I know he covers Bloom's filter. And half his treatment on trees is how frequency of access matters on tree creation. (He specifically does not advise just balanced trees.) For hashing, he does cover things at arms length.

All these things only came out after 2000. Basic bloom filter is earlier, but modern bloom filters (and varieties like cuckoo filter) have improved quite a bit. The standard paper on modern bloom filters came out in 2006.

It's also true for other areas. Let's take sorting. The best general purpose comparing algorithm is timsort. timsort came out in 2002.

Keep in mind TAOCP was originally published in the early 70ies (first book came out in 68) and even though there were some new editions (upto late 90ies) they didn't really change all that much.

You can just scan over TAOCP's bibliography and see the average year of the cites. It is usually 60ies.

Claiming that CS has not improved since the 60ies is fairly absurd.

Re: Books Programmers Don't Really Read (2008)

#136

> the word "Introduction" leads one to believe that the book is a good choice for beginning programmers. It isn't. The book is as comprehensive a guide to algorithms as you are likely to find anywhere. Please stop recommending it to beginners. Reminds me of the Caltech required 3rd year math course "AMa95 Introductory Methods in Applied Mathematics", that came with the dry comment that "Introductory does not mean ele…

It sounds like they're actually conflating the two words in question. Introductory means an introduction, like the thing that helps you get into a subject. Elementary means basic or foundational. Logic and set theory are elementary to the rest of mathematics. They're not introductory to the rest of mathematics.

Re: Books Programmers Don't Really Read (2008)

#137

Earlier quoted context omitted.

Every C++ front end I know of has at least 10 man years in it. I'm pretty sure it's the hardest language to implement, by far. (The core language.) Ironically, one of the hardest things about a C compiler is the preprocessor. You'd think a text macro processor would be simple, and it should be simple. There's an amazing amount of subtle complexity in just the handful of pages describing it in the Standard. I and many…

I'm pretty sure it's the hardest language to implement Harder than languages that require JIT compilers to achieve reasonable performance? Even scalac and ghc are pretty complex beasts in order to Scala and Haskell reasonably speedy.

You can sink 10 years into just about any software to make it run faster. I wouldn't think that reflects on the inherent difficulty of writing a compiler in the abstract.

Re: Books Programmers Don't Really Read (2008)

#138
post #96

Earlier quoted context omitted.

Are you seriously claiming that you have read both TAOCP and CLRS cover to cover? This is precisely the claim that the original article is talking about. The article is not claiming that TAOCP and CLRS are bad books. The article simply argues that more people claim to have read the books than actually have read them. Most of us have read "some" of TAOCP and CLRS. These are fantastic but rigorous reference works. Gene…

You are taking your personal experience; that apparently you do not read reference books cover to cover and then applying it to others. Personally I DO read reference books cover to cover on a regular basis. I understand not everyone does this, but I don't make judgements or assumptions of others based on this. I'm have almost an obsessive need to read these things cover to cover. When I hit something I don't underst…

True. I'm just reading the Oxford English Dictionary cover to cover, very informative. Just arrived at the chapter on cheeseparing, cheese rennet, cheese renning, and cheesesteak - fascinating, and very useful in my day job.

Re: Books Programmers Don't Really Read (2008)

#139
post #137

Earlier quoted context omitted.

I'm pretty sure it's the hardest language to implement Harder than languages that require JIT compilers to achieve reasonable performance? Even scalac and ghc are pretty complex beasts in order to Scala and Haskell reasonably speedy.

You can sink 10 years into just about any software to make it run faster. I wouldn't think that reflects on the inherent difficulty of writing a compiler in the abstract.

Sure, but a simplistic C++ compiler will still produce code of acceptable speed. The same is not true of simplistic compilers for languages like Javascript.

Meta-tracing a la PyPy is such a revolution because it enables low-cost creation of reasonably performant tracing JIT compilers.

Re: Books Programmers Don't Really Read (2008)

#140

Earlier quoted context omitted.

The GoF design patterns book has two core, very closely related, problems. The first is that it doesn't make enough of an effort to present "design patterns" as a conceptual framework. Can you program without using design patterns? No, you cannot. You are always using design patterns whether you know it or not, you're just using ad hoc design patterns without realizing it when you don't think you're using patterns. T…

Have you read Design Patterns? The viewpoint you have here is typical of people who have absorbed it osmotically from software culture, but haven't read the work itself. You say: > Instead the GoF book largely presents a canonical list > of some design patterns, giving people the false > impression that these are special and unique versus > merely a sampling of ways one might do things. From the Introduction: "Despit…

https://news.ycombinator.com/item?id=12714756
Post reply on HN