Ask HN: Programming books that are more like math books?
1. describe concept
2. demonstrate application (sometimes)
3. provide a related exercise (sometimes) with solution (sometimes)
A typical (basic) math book, and what I'd like to find in a programming book, goes something like this:
1. describe concept
2. demonstrate several applications
3. provide 30-50 related exercises of increasing difficulty
4. provide solutions (with explanations[1]) to most or all of the exercises
[1]Math books usually don't provide explanations, but I think they would be helpful in a programming book.
It may not be pretty, and math books often use terrible exercises (especially the "real-world" exercises), but if you sit down and work through all of them, you will learn.
Programmers often say, "Just start a project." I've found that's a good way to learn how to do a particular project, and a good way to learn how to piece together frameworks and plugins and libraries, but not necessarily a good way to learn how to program (I understand all of that is part of programming, but I think there's a self-sufficiency that I'm looking for that is separate from the piecing together of things).
At any rate, does anyone know of a resource that's closer to the math book style (preferably Ruby or JS)? Is there a reason why programming books aren't written in that format?