So lately I've been trying to learn to program. It's quite clear that the best way to learn will be by doing. What I find odd is the structure of programming books (or educational materials) don't support this notion. Even the most interactive resources I've found (why's Try Ruby, Eloquent Javascript, etc) follow a structure like this:
- describe concept
- demonstrate application (sometimes)
- 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:
- describe concept
- demonstrate several applications
- provide 30-50 related exercises of increasing difficulty
- provide solutions (with explanations) to most or all of the exercises
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?