4 ms·
> When I started learning Rust I made the mistake of following the advice to read The Book first. While it's a great resource, it's pretty overwhelming for a be
by steveklabnik 7y ago
> When I started learning Rust I made the mistake of following the advice to read The Book first. While it's a great resource, it's pretty overwhelming for a beginner to get told "If you'd like to learn this programming language the best way to start is to read this 20 chapter book!" Most people give up before they even get started when they get advice like this. Nobody ever told someone to read a 20 chapter book just to get started with Javascript or Python. Rust's learning curve is no joke but you gotta give the people what they want, and they want to program, not read about programming. Programming is fun and reading about programming is not as fun.
As one of the authors of the book, I wholeheartedly agree that it's not for everyone. Folks should learn in the way that works well for them. I'm glad this resource exists!
- sanderjd 7y agoYes I think that line highlights the "different strokes for different folks" aspect of learning things: my instinct when I learned javascript and python was to pick up and read long books about them! I'm glad there are lots of different kinds of resources that exist, which people can pick and choose from as best suits them.
- cesarb 7y agoTo be fair, when I first saw this advice to read the book first, the book was this one: https://doc.rust-lang.org/1.30.0/book/first-edition/ https://doc.rust-lang.org/1.30.0/book/first-edition/ which is much shorter. That is, the advice "the best way to learn Rust is to read the book" came from when the book was a different one; it's still repeated (perhaps by people who learned from the old book), but it might no longer be as valid. Just for fun, I've been re-reading the book (that is: reading the new book), and it's much more tiring than I remember the old book being (but I've learned a new trick or two, things that didn't exist back in the Rust 1.0 days when I first learned through reading the book).
- steveklabnik 7y agoYeah. I think it comes down to style. The new book is almost exactly twice as long as the old one; the old one had less stuff to explain, and also didn't explain it in as much depth. Some people prefer brevity. Some prefer the extra explanation. It's a constant struggle to keep the book from getting even longer. I think the new book is far, far, far better, but I can understand why some other folks don't agree.
- _bxg1 7y agoI think personally I like it when things go in "layers". Start with a shallow pass, and then do one or more passes of increasing depth
- empath75 7y agoThe rust book is great and I refer to it frequently, but rust never clicked for me until I just jumped in and did the advent of code with it. I think the hard part of just reading the book is that unless you have some problem you’re trying to solve, it’s hard to get motivated to read it. It’d be nice if there was a book that’s a bit less dry —- something like Learn You A Haskell or Why’s poignant guide to Ruby.
- steveklabnik 7y agoI would also love to see a book with some whimsy; when I try to emulate this style, it doesn't work. Oh well.
- dpwm 7y agoI don't usually like programming books. I am usually easily overwhelmed by them and I find that they are at the wrong pace for me. This weekend I read most of the Rust book without much effort and found it really helpful for getting up to speed with the language, especially the more novel bits around safety. It took me to the point where I was able to explore and evaluate the bits of the language I needed with only library docs. I know that the remaining chapters are there for when I am ready for them. My experience with the Rust book as made me more likely to consider starting with a book when approaching programming languages in the future. Reading other comments, I recognize that I was fortunate to have a project in mind that motivated my reading of the book and just happened to be an excellent fit for Rust.
- steveklabnik 7y agoThanks for the kind words!
- eska 7y agoI'm in the same boat. I worked on a pet project while reading the book (still at it). Make some progress, read about how unit tests are done, add some unit tests, learn how modules work, refactor some code into a module.. Inbetween I google some things that I need but haven't mentioned in the book yet but that I need at that moment (e.g. cow strings used in a crate). Works for me!
- _bxg1 7y agoCame here to say this exact thing. I never learn well from programming books, but I did from the Rust book. I think it's because of how bite-sized and focused the different pieces are, as well as how hands-on and example-driven it is.
- wwee 7y agoAs someone who already programs in multiple high-level languages, I feel that the Rust book hits the sweet spot for me. It doesn't go over basic programming concepts which I already know, and focuses on fundamental, unique concepts of Rust. I feel that the scope is pretty close to perfect as well, it doesn't try to cover every single detail. (The Rustonomicon serves as Part 2 for me)
- gilbetron 7y agoI'm about 1/4 of the way through your book, and it is my favorite programming book since the original C book, which I read ... sigh ... almost 30 years ago. Well done!
- steveklabnik 7y agoIf it makes you feel any better, I also read that book... 20 years ago? Regardless, thanks!
- CapriciousCptl 7y agoI've read the book and its iterations 3 times. It may not be for everyone but it's been wonderful for me. When I was first learning Rust some time ago you were also a great resource on IRC. Thank you Steve.
- steveklabnik 7y ago<3
- noxer 7y agoI did like to book. I read it in small steps over like 3 weeks. The only thing that's really missing and makes people get a rough start is, that there is no step-by-step dev environment setup. VS Code + Rust (apparently what most people use) should work "out of the box" but nowhere is an official and maintained recourse how to set it up correctly. Just a bunch of outdated blog posts how someone someday got it to work. If you never used VS Code before you are almost certainly waiting hours to get you rust scratchpad running which you definitely want to have while reading the book. Yes, is may not really fit in the book but then there should be a official place for this. Preferably with different OSes and IDEs covered.
- satvikpendem 7y agoThe book should mention that one should use rust-analyzer rather than RLS as the code completion engine in VSCode. The former is much better.
- steveklabnik 7y agoThis is part of why doing this is tricky, and why we don't. If this section were in the book today, it would say the RLS, because the RLS is the current project from the Rust Project proper. That's about to change, but still, it's a good example of why this is hard.
- noxer 7y agoIt should ofc name both and give all the information needed for a beginner to make a educated decision what to use. But like I said the book may not be the right place for this but there MUST be a place for this and if not then such a place must be created. Many many other languages/frameworks etc. have the same problem.
- JeremyNT 7y ago> As one of the authors of the book, I wholeheartedly agree that it's not for everyone. Folks should learn in the way that works well for them. I'm glad this resource exists! I started off reading your book, and I found it really helpful, even though I didn't make it all the way through. I feel like there are a lot of resources cropping up that are good supplemental material (the "half hour to learn Rust" blog post linked in this document being one of those) which can quickly get people up to speed, but the details in the book are still valuable. Reading through (most of) the book was really helpful when I went to Exercism (another fine resource recommended by the post linked here), and I still use it as a reference when I am fuzzy on a concept.
- j-pb 7y agoCurrently on day 4 of reading it all day and just finished chapter 12. Thanks for writing it!