Not recommended.
Rust Brain Teasers is a frustrating book. Working through puzzles is a fantastic way to develop your knowledge of a programming language, but the selection of exercises presented here lacks focus, and I would struggle to recommend it to either novice or experienced programmers.
To its credit, this is a short, well-structured book that lends itself to a quick read. Each of the 24 sections consists of a short Rust code listing for the reader to guess the output of, followed by a few pages describing the solution and some links for further reading.
Unfortunately, the puzzles are generally too simple to provoke deeper thought or discussion for programmers with even a passing familiarity with Rust or another systems language. Whilst it highlights a few points of difference between Rust and other languages, serious learners would be much better served by a more comprehensive text such as The Rust Programming Language (free online at https://doc.rust-lang.org/book/) or the excellent Programming Rust (https://accu.org/bookreviews/2022/jones_1977/).
Taken instead as a book for those new to programming, the puzzles are too random for structured learning. Although several topics that are not specific to Rust are covered, including floating-point representations and Unicode character encoding, the descriptions do not provide any insight that could not otherwise be found in a good ‘Introduction to Programming’ book. Moreover, given Rust’s unusual ownership model, I was particularly disappointed that only a couple of the puzzles related to the borrow checker – this feels like a missed opportunity to shine light on a common area of frustration when learning Rust.
Overall, I think that this book represents a good idea let down by a lack of clarity as to its intended audience.
Website: https://pragprog.com/titles/hwrustbrain/rust-brain-teasers/
Code Site: https://media.pragprog.com/titles/hwrustbrain/code/hwrustbrain-code.zip










