Why can't (more) textbooks be written like this? There's no need to make CS dry -- as long as the technical details are correct, it can and should be fun to follow the work.
Well, maybe it's about taste. But I personally can't stand these kind of books. Take this paragraph for example:
> What's this? There are two types of Internet sockets? Yes. Well, no. I'm lying. There are more, but I didn't want to scare you. I'm only going to talk about two types here. Except for this sentence, where I'm going to tell you that "Raw Sockets" are also very powerful and you should look them up.
There are quite a few books written like this, including most online tutorials, and other resources.
What I don't like about it is that more than 50% of the content is filled with the author's anecdotes (some of them have better sense of humor than others), while the actual content being discussed is barely touched.
You'll never see this kind of content on advanced mathematics, or field that require intense concentration, advanced thinking, because it's difficult to switch the context of your thinking from the author's silly jokes to the actual thing you're trying to learn.
In this case, it's simply touching the very simple bsd socket api, so of course it's very easy to follow. But imagine that you removed all the unnecessary jokes and anecdotes, you'd end up with 50% of the text and 100% of the useful information. I'm pretty sure information density is a good quality to have for any piece of writing.
To compare to one of those advanced mathematics textbooks you're making an example of, D&F is one of the canonical texts for an introductory graduate algebra course, but it is one of the least user-friendly works I've come across on the topic (I own 3-4 other graduate algebra texts at various levels, printed in various decades, and I found it probably most difficult to wade through, of all of them).
Note that this is merely an example and not a personal attack on the authors or something. Having to re-read a chunk of text 5-10 times on average to extract pertinent information is something I really don't enjoy; I don't usually have to do it with journal/conference papers (usually 2x is enough to grasp the details of the idea being presented) or with other textbooks.
I would rather the information being presented be somewhat 'spaced out' to give my brain time to process it without having to go back over it. Having to re-read a denser text takes rather longer, imo, than having to read text with slightly less dense content just once or twice.
So, yes, it is likely a matter of taste. But my point was, I suppose, that information presented in a dense manner takes rather longer to digest.
Beej (despite numerous anecdotes and so on) manages to present his information in a straightforward fashion that doesn't require multiple readings to grasp. Algebra could also be presented in a similar (if probably less jokey) fashion. A lower amount of entropy per sentence means I have to do less work just to get through the explanations and can spend more time on working through the examples. Given that the time I have to spend studying is finite, a more direct approach to explaining material before letting a student practice does seem more efficient.
That's why I like this tutorial. It doesn't take itself seriously, which is rather more approachable than some works, and the pertinent information is directly presented but not in such a way that I have to re-re-re...-re read to grasp the details.
I like the style. He draws attention to things that would get lost if he just stated them in the most concise form possible.
I also find it easier to ingest; I wish I had known about this guide a few years ago. I learned socket programming from man pages. It's an experience I don't want to recommend.
Agreed. I call this "flowery language" and I try to ensure it is omitted in guides, api documentation, source code comments, etc. Humor, frustration, anecdotes, complaints, etc. do not belong in a technical guide. Maybe in a blog, maybe in a talk.
Richard Stevens certainly found the right balance, I've read almost all of his material, yet I don't have any sense of his personality or personal history other than that he is very professional.