D.J. Quavern wrote:Dear Ken,
I looked at the table of contents of the book and, in addition to the content (omy I did not know about `fortune`!), I love the typography I have to say.
For a while ago I was trying to put together a small program to "gamify" errors in Rust, displaying a cute graph on which error the programmer made, areas of improvement etc. I would like to pick it up again and I think reading the book would help me. (I did lots of tests, Junilu taught me well )
My question would be about your thoughts behind the book take-aways: if I understand correctly, every chapter have practical exercises where we implement the linux cli. How long do you estimate those little exercises would take to a beginner+ person with some experience with Rust?
You are correct that each of the 14 chapters is a challenge program to implement in Rust. They all exist already--often many versions e.g, BSD and GNU--so there are ample examples of how these programs might work. The programs get progressively harder, so the later chapters will probably take relatively longer than the earlier examples. I've had the good fortune to teach programming skills in the college classroom (at the Univ of Arizona in Tucson where I live), and I would say I might be able to get a class of intermediate programmers through this book in a 16-week semester, averaging one program each week. It depends wildly on your background and determination, of course, but I think a few months could be enough.
Note that my teaching style is to present lots of small challenges that I hope will encourage the reader to put the book down and hack. For instance, in Chapter 4 where you write a Rust version of "head," I want you to write a Rust function that turns a
string into positive (non-zero) integer. I provide and explain the function signature (fn parse_positive_int(val: &str) -> MyResult<usize>) and provide a
unit test along with instructions on how to run the test. One early reader (an undergrad CS student who didn't know Rust at all) dutifully stopped and spent several days to understand how to write this and use all the types involved to not only create the correct result but also to create the correct error. Another reader might figure this out in an hour or a few minutes where another reader might choose to keep reading and use the solution I provide. If a person did nothing other than read the book and type out the source code provided, I still think they'd learn a good deal of Rust (and test-driven development!). If a person really challenges themselves to figure things out by reading documentation and hacking and writing their own solutions, I think they would learn even more.