Properties of Good Textbooks
Heuristics for choosing/writing good textbooks (see also here):
Exercises are interspersed in the text, not in large chunks (better at the end of sections, not just at the end of chapters).
Solutions are available but difficult to access (in a separate book, or on the web), this reduces the urge to look the solution up if one is stuck.
Of varying difficulty (I like the approach Concrete Mathematics takes: everything from trivial applications to research questions).
I like it when difficulty is indicated, but it’s also okay when it’s said clearly in the beginning that exercises are not marked for difficulty (making them mystery boxes).
Takes many angles
Has figures and illustrations. I don’t think I’ve encountered a textbook with too many yet. (See Visual Complex Analysis for an example of doing this well.)
Has many examples. I’m not sure yet about the advantage of recurring examples. Same point about amount as with figures.
Includes code, if possible. It’s cool if you tell me the equations for computing the likelihood ratio of a hypothesis & dataset, but it’s even cooler if you give me some sample code I can use and extend along with it.
You can use boldface and italics and underlining for reading comprehension, example here.
Use section headings and paragraphs liberally.
Artificial Intelligence: A Modern Approach has one- to three-word side-notes describing the content of each paragraph. This is very good.
Distinguish definitions, proofs, examples, case-studies, code, formulas &c.
Define terms before they are used. (This is not a joke. Population Genetics uses the term “substitution” on p. 32 without defining it, and exercise 12-1 from Naive Set Theory depends on the axiom of regularity, but the book doesn’t define it.)
If the book has pre-requisites beyond what a high-schooler knows, a good textbook lists those pre-requisites and textbooks that teach them.
Multiple editions are an indicator for quality.
Ditto for multiple authors.
A conversational and whimsy style can be nice, but shouldn’t be overdone.
Hot take: I get very little value from proofs in math textbooks, and consider them usually unnecessary (unless they teach a new proof method). I like the Infinite Napkin for its approach.