Book Review: Programming Rust: Fast, Safe Systems Development 2nd Edition

Since Amazon (suspiciously) won’t let me review this book that I purchased, I will review it here. I would have been kinder on amazon, but blocking reviews is a dirty tactic for a publisher.

This book has a great deal of useful information in it, *BUT*. I have 40 years programming experience from VAX assembly through C# and .NET 6. I have read dozens of programming books and rarely find so many segments that are close to incomprehensible to me after the first or even second pass, both in code and in text. Part of this is rust itself, which seems to use every possible special character in some strange new way, even in combinations (but does not implement the ++ operator, just to offend C++ programmers I think) and has constructs that are likely unfamiliar to a majority of modern programmers. You need to make some investment to understand these things, and that really needs to come before anything else. Other rust books are certainly easier to grok and therefore likely better starting points for anyone not seasoned in C/C++, which are also irrelevant to me, but which the book mentions often, and for which it even provides out-of-context code samples that I cannot understand without additional research.

The authors are clearly trying to demonstrate their individual experience and intelligence rather than educating their audience completely or properly. These are exactly the kind of programmers that make bad development team members – their code may be efficient, but only they can follow and maintain it, and given the level of documentation for the code samples in the book…

Most programmers have nothing to do with complex numbers and fractals, so these problem domains are confusing and irrelevant. Here’s a very closely-guarded secret: for the last 30 years, most programmers have *not* been mathematicians. Honestly, I might fail trig if I tried it again, not because it is hard, but because it is completely irrelevant and not interesting to me and serves me no purpose, and the computer is there to answer those questions anyway. That’s how we build knowledge scaffolding, by focusing on the concepts and leveraging what already exists rather than re-inventing everything. Doesn’t mean I don’t understand trig; it means I don’t do the calculations by hand or with code, as someone wrote trusted libraries for that decades ago.

Nowadays, we are mostly web developers, and there is almost no mention of anything web in this book – barely touches on JSON, HTTP server, HTTP client, or anything else likely to be relevant to a majority of programmers (though rust includes none of this in its standard libraries anyway). It’s almost like a theory book. If you want to target the majority of developers, you have to know who they are and meet them where they are. Trying to convince C/C++ programmers (many of whom know the Linux kernel cannot be rewritten in safe rust and are just waiting for rust to have a huge public security problem, whether from the compiler or the risky tooling combined with critical unregulated third-party library diaspora disaster and such, or otherwise) to switch to rust seems like a non-starter.

At the same time, the authors and their editors were *not* smart enough to find several errors in the text and the code, some of which seem to be failures to update from a previous edition. The result is that, unless you are 100% going into rust and plan to read this book a few times and notate the authors’ errors and omissions, many of the explanations for code examples will seem incomplete and leave out critical details that would help you to understand them. You will almost certainly need to supplant this book with additional books and other resources, which are a better place to start with rust. Definitely not written by educators.

This is not the kind of book that you pick up when you need an answer without having read the entire thing first, at least once. It’s not a beginner book, it’s not a reference…it’s the authors showing off.

So in summary, this book is useful, but it is also insulting, frustrating, and confusing. Additionally, much of its content is likely irrelevant to the majority of its readers. At least for the section on modules, they didn’t use the front of restaurant/back of restaurant paradigm from the real rust book, which also has no relation to any problem domain that I have ever seen. That is about the only section of the default rust book that I found worse than this one.

BTW, I am in no way implying that my book was any better; I admit that it was far worse. I have some understanding of how hard it is to publish a technical book like this, so I forgive the authors somewhat (not for the arrogant and intentionally confusing bits). Relevant examples and a little more explanation of the code is what the readers were likely after, and would have greatly increased the value of this book, which missed the mark for me.

Update: This popped up on amazon the next day, immediately after I had tagged one of the authors on LinkedIn with this review. Most of the reviews of the previous edition are positive, but I don’t know how much we can trust amazon reviews anyway. I found one review that seemed to agree with some of my perspectives. Maybe I am just not smart enough for rust or this book.

One thought on “Book Review: Programming Rust: Fast, Safe Systems Development 2nd Edition

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: